2021-05-07 17:58:57 +02:00
|
|
|
# `atuin server`
|
|
|
|
|
|
|
|
Atuin allows you to run your own sync server, in case you don't want to use the
|
|
|
|
one I host :)
|
|
|
|
|
|
|
|
There's currently only one subcommand, `atuin server start` which will start the
|
|
|
|
Atuin http sync server
|
|
|
|
|
|
|
|
```
|
|
|
|
USAGE:
|
|
|
|
atuin server start [OPTIONS]
|
|
|
|
|
|
|
|
FLAGS:
|
2022-11-02 21:40:20 +01:00
|
|
|
-h, --help Prints help information
|
2021-05-07 17:58:57 +02:00
|
|
|
-V, --version Prints version information
|
|
|
|
|
|
|
|
OPTIONS:
|
2022-11-02 21:40:20 +01:00
|
|
|
--host <host>
|
2021-05-07 17:58:57 +02:00
|
|
|
-p, --port <port>
|
|
|
|
```
|
|
|
|
|
2021-11-13 23:45:50 +01:00
|
|
|
## Configuration
|
|
|
|
|
2021-05-07 17:58:57 +02:00
|
|
|
The config for the server is kept separate from the config for the client, even
|
|
|
|
though they are the same binary. Server config can be found at
|
|
|
|
`~/.config/atuin/server.toml`.
|
|
|
|
|
|
|
|
It looks something like this:
|
|
|
|
|
2021-11-13 23:45:50 +01:00
|
|
|
```toml
|
2021-05-07 17:58:57 +02:00
|
|
|
host = "0.0.0.0"
|
|
|
|
port = 8888
|
|
|
|
open_registration = true
|
|
|
|
db_uri="postgres://user:password@hostname/database"
|
|
|
|
```
|
|
|
|
|
2021-11-13 23:45:50 +01:00
|
|
|
Alternatively, configuration can also be provided with environment variables.
|
|
|
|
|
|
|
|
```sh
|
|
|
|
ATUIN_HOST="0.0.0.0"
|
|
|
|
ATUIN_PORT=8888
|
|
|
|
ATUIN_OPEN_REGISTRATION=true
|
|
|
|
ATUIN_DB_URI="postgres://user:password@hostname/database"
|
|
|
|
```
|
|
|
|
|
|
|
|
### host
|
|
|
|
|
|
|
|
The host address the atuin server should listen on.
|
|
|
|
|
|
|
|
Defaults to `127.0.0.1`.
|
|
|
|
|
|
|
|
### port
|
|
|
|
|
2022-05-01 10:25:12 +02:00
|
|
|
The port the atuin server should listen on.
|
2021-11-13 23:45:50 +01:00
|
|
|
|
|
|
|
Defaults to `8888`.
|
|
|
|
|
|
|
|
### open_registration
|
|
|
|
|
|
|
|
If `true`, atuin will accept new user registrations.
|
|
|
|
Set this to `false` after making your own account if you don't want others to be
|
|
|
|
able to use your server.
|
|
|
|
|
|
|
|
Defaults to `false`.
|
|
|
|
|
|
|
|
### db_uri
|
|
|
|
|
|
|
|
A valid postgres URI, where the user and history data will be saved to.
|
2021-11-17 12:41:55 +01:00
|
|
|
|
2022-07-26 09:05:34 +02:00
|
|
|
### path
|
|
|
|
|
|
|
|
A path to prepend to all the routes of the server. Any empty string means that nothing will be prepended.
|
|
|
|
|
|
|
|
Defaults to `""`
|
|
|
|
|
2022-06-26 20:40:36 +02:00
|
|
|
## Container deployment instructions
|
2021-11-17 12:41:55 +01:00
|
|
|
|
2022-06-26 20:40:36 +02:00
|
|
|
You can deploy you own atuin server in a container:
|
2022-04-22 10:41:55 +02:00
|
|
|
|
2022-06-26 20:40:36 +02:00
|
|
|
* See [docker](docker.md) for a sample docker configuration.
|
|
|
|
* See [k8s](k8s.md) for a sample kubernetes configuration.
|