Ansible role: Atuin shell history sync server via Docker Compose
- Jinja 100%
| Filename | Latest commit message | Latest commit date |
|---|---|---|
The Postgres 18 image keeps PGDATA in /var/lib/postgresql/18/docker and its entrypoint only chowns PGDATA, so a mount owned by UID 1000 with mode 0750 left the postgres user unable to reach it and the container crash-looped. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> |
||
| defaults | ||
| handlers | ||
| meta | ||
| tasks | ||
| templates | ||
| README.md | ||
atuin
Deploy an Atuin shell history sync server, with a Postgres sidecar, via Docker Compose. Based on the official compose reference.
Requirements
- Docker with the compose plugin already installed (e.g. via
geerlingguy.docker). community.dockercollection (needs thepython3-dockerapt package's bindings - this role installs it).
Role Variables
| Variable | Default | Description |
|---|---|---|
atuin_version |
18.24.1 |
ghcr.io/atuinsh/atuin image tag. Pin a tagged release (no v prefix). |
atuin_postgres_version |
18 |
postgres image tag. |
atuin_bind_address |
0.0.0.0 |
Host address the server port is published on. |
atuin_port |
8888 |
Host port mapped to the server. |
atuin_base_dir |
~/local/atuin |
Compose file, .env, config and Postgres data. |
atuin_config_dir |
<base>/config |
Server config dir, owned by UID 1000 (the image's atuin user). |
atuin_db_dir |
<base>/postgres |
Postgres data, mounted at /var/lib/postgresql; owned by UID 999 (the image's postgres user). |
atuin_open_registration |
false |
Accept new user registrations. |
atuin_db_username / atuin_db_name |
atuin |
Database user and name. |
atuin_db_password |
"" (required) |
Database password; A-Za-z0-9, keep in an encrypted vars file. |
atuin_tz |
Etc/UTC |
Container timezone. |
atuin_restart_policy |
unless-stopped |
Compose restart policy. |
Tags
config,container,verify- the usual run.upgrade- pull images (after bumpingatuin_version) and recreate. Read the release notes first; Atuin doesn't guarantee every upgrade applies cleanly.
Example Playbook
- hosts: razorback
vars:
ansible_python_interpreter: /usr/bin/python3
atuin_open_registration: true # first run only
vars_files:
- vars/secrets.yml # atuin_db_password
roles:
- role: atuin
Notes
- Register your account(s) with
atuin_open_registration: true, then set it back tofalseand re-run; other machines useatuin login. atuin_db_diris the only server state to back up. History is end-to-end encrypted, so also keep each account's key (atuin key) somewhere safe - the server can't recover it.- The server speaks plain HTTP; put TLS in front of it with a reverse proxy.