Self-Hosting
While we offer a hosted, encrypted and secure server at Atuin, we also provide a self-hosted version of the Atuin server.
Requirements
Section titled “Requirements”- You need to be able to run a binary or Docker container on a server.
- You must have either a PostgreSQL, MySQL or SQLite database.
Quick Start
Section titled “Quick Start”The server is distributed as a separate binary, atuin-server, pre-built and
available on Github releases.
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/latest/download/atuin-server-installer.sh | shYou must configure the database path in your
~/.atuin/server.toml:
db_uri="postgres://user:password@hostname/database"Then, start the server with:
atuin-server startWe strongly urge you enable TLS with Atuin. Without TLS, passwords are sent plaintext, which is wildly insecure.
For TLS/HTTPS support, we recommend using a reverse proxy such as nginx, Caddy, or Traefik in front of the Atuin server.
Administration
Section titled “Administration”atuin-server supports some administration tools.
User Management
Section titled “User Management”While open_registration is true, anyone who can reach the server can
register. To keep a server private, leave it false and create accounts on the
server instead:
You can also delete users as well as change their passwords.
atuin-server admin user set-password aliceatuin-server admin user delete aliceSee atuin-server admin.
Configuration
Section titled “Configuration”The server’s config lives at ~/.atuin/server.toml, separate from the client’s
config.
It looks something like this for PostgreSQL:
host = "0.0.0.0"port = 8888open_registration = truedb_uri="postgres://user:password@hostname/database"You must configure the database as Atuin can’t proceed without one. You
can do so either in server.toml or via the environment variable:
Using server.toml:
db_uri="postgres://user:password@hostname/database"Using server.toml:
db_uri="sqlite:///config/atuin.db"Note that atuin will create this file if it does not exist.
Using server.toml:
db_uri="mysql://user:password@hostname/database"Configuration Options
Section titled “Configuration Options”| Parameter | Description |
|---|---|
db_uri |
A valid database URI, for saving history (required, no default) |
db_password_file |
A file holding the database password, kept out of db_uri (default: none) |
host |
The host to listen on (default: 127.0.0.1) |
port |
The TCP port to listen on (default: 8888) |
open_registration |
If true, accept new user registrations (default: false) |
path |
A path to prepend to all routes of the server (default: empty) |
trusted_proxies |
Reverse proxies whose client address header is trusted (default: empty) |
trusted_proxy_header |
The header those proxies report the client address in (default: X-Forwarded-For) |