Ansible role: Atuin shell history sync server via Docker Compose
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
Paul Provost a83d31a1ea Own the postgres mount as UID 999 so Postgres 18 can reach PGDATA
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>
2026-10-18 17:19:24 -04:00
defaults Initial atuin role, modelled on the immich role 2026-10-18 15:56:28 -04:00
handlers Initial atuin role, modelled on the immich role 2026-10-18 15:56:28 -04:00
meta Initial atuin role, modelled on the immich role 2026-10-18 15:56:28 -04:00
tasks Own the postgres mount as UID 999 so Postgres 18 can reach PGDATA 2026-10-18 17:19:24 -04:00
templates Initial atuin role, modelled on the immich role 2026-10-18 15:56:28 -04:00
README.md Own the postgres mount as UID 999 so Postgres 18 can reach PGDATA 2026-10-18 17:19:24 -04:00

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.docker collection (needs the python3-docker apt 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 bumping atuin_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 to false and re-run; other machines use atuin login.
  • atuin_db_dir is 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.