Skip to content

Self-host an Atuin sync server

Shell history and agent sessions that follow you to every VM.

Deploy on exe.dev

Shelley handles the setup. About 10 minutes.

Prefer a terminal?
curl -fsSL https://exe-staging.dev/deploy/atuin/prompt.txt | ssh exe.dev new --prompt=/dev/stdin

Atuin replaces your shell history with a searchable, synced database, and since version 18.24 it does the same for coding agents. Atuin Threads records your Claude Code, Codex, Pi, OpenCode and other agent sessions, end-to-end encrypted, and atuin resume picks one up on any machine, in the same agent or a different one. Atuin's author lists where her sessions were scattered before, including "ephemeral instances on exe.dev".

Sync needs a server that is always there. This recipe runs Atuin's own sync server on one small exe.dev VM, with its data on the VM's persistent disk. Your laptop and every other VM sync through it: start a task in Claude Code on a throwaway VM, delete the VM, and resume the session from your laptop or the next VM.

What you get#

  • atuin-server 18.24.8 on port 8000 with SQLite in ~/atuin-server, started again after a reboot
  • Registration closed, and one account, me, with a random password in ~/atuin-server/password
  • A login to that account that succeeds through the server's API
  • A nightly SQLite backup in ~/atuin-server/backups
What's running, and where
Public https://my-atuin.exe.xyz/ the sync API; only your account can log in, and records arrive already encrypted
my-atuin.exe.xyz exe.dev VM
atuin-server atuin-server 18.24.8, the official binary, managed by systemd :8000~/atuin-server
SQLite end-to-end encrypted records; the server can't read them ~/atuin-server/atuin.db
Nightly backup a systemd timer that keeps a week of SQLite copies ~/atuin-server/backups

Deploy with Shelley#

Click Deploy and Shelley will set up Atuin on a new VM, then check that it works. No config-file wrangling required.

Prefer a terminal?
curl -fsSL \
  https://exe-staging.dev/deploy/atuin/prompt.txt \
  | ssh exe.dev new --prompt=/dev/stdin

When it's done, run this on your computer (only you can):

ssh exe.dev share set-public my-atuin
What Shelley is told
Set up Atuin on this VM by following the exe.dev recipe at https://exe-staging.dev/deploy/atuin.md from top to bottom.

The recipe's example VM name is my-atuin. This VM's name is the output of `hostname`: use it wherever the recipe writes my-atuin. Skip the step that creates the VM; you are on it.

You are done when all of these are true. Check each one yourself:
- atuin-server 18.24.8 on port 8000 with SQLite in `~/atuin-server`, started again after a reboot
- Registration closed, and one account, `me`, with a random password in `~/atuin-server/password`
- A login to that account that succeeds through the server's API
- A nightly SQLite backup in `~/atuin-server/backups`

Run the VM-side steps of "Set up the server" and "Back up and restore"
(the timer only), skipping VM creation. Install exactly the pinned
version. If `~/atuin-server` already has a database, keep it and don't
create the account again. Never print the password: say where it is.
Verify with the checks in those sections. You can't make the VM public;
finish by telling the owner to run `ssh exe.dev share set-public <vm>`
on their computer and then follow "Connect your computer" and "Join
every new VM". Don't install the Atuin client on this VM.

Finish with the URLs I should open and these commands, which only I can run, from my own computer (with this VM's name in them):
  ssh exe.dev share set-public my-atuin

Also at /deploy/atuin/prompt.txt. The recipe it follows is /deploy/atuin.md.

Set up the server#

On your computer, create the VM and connect. Pick any free name:

ssh exe.dev new --name=my-atuin
ssh my-atuin.exe.xyz

On the VM, install the server with Atuin's installer for this release. It puts atuin-server in ~/.atuin/bin:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/download/v18.24.8/atuin-server-installer.sh | sh

Configure it to listen on port 8000, where exe.dev's HTTPS proxy sends https://my-atuin.exe.xyz/, with SQLite for storage and registration closed. Run it under systemd:

mkdir -p ~/atuin-server && chmod 700 ~/atuin-server
cat > ~/atuin-server/server.toml <<EOF
host = "0.0.0.0"
port = 8000
open_registration = false
db_uri = "sqlite://$HOME/atuin-server/atuin.db"
EOF
sudo tee /etc/systemd/system/atuin-server.service >/dev/null <<EOF
[Unit]
Description=Atuin sync server
After=network-online.target
Wants=network-online.target

[Service]
User=$USER
Environment=ATUIN_CONFIG_DIR=$HOME/atuin-server
ExecStart=$HOME/.atuin/bin/atuin-server start
Restart=on-failure

[Install]
WantedBy=multi-user.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now atuin-server
until curl -sf localhost:8000/ >/dev/null; do sleep 1; done

Once it answers, create your account, me, with a random password. The email is only stored; the server sends no mail:

(umask 077; openssl rand -base64 24 | tr -d '/+=' > ~/atuin-server/password)
ATUIN_CONFIG_DIR=~/atuin-server ~/.atuin/bin/atuin-server admin user create \
  --email me@example.com me < ~/atuin-server/password

Check it. The server answers with its version, refuses to register anyone, and logs me in (the answer has a session):

curl -s -w '\n' localhost:8000/
curl -s -w '\n' localhost:8000/register -H 'Content-Type: application/json' \
  -d '{"username":"x","email":"x@example.com","password":"xxxxxxxx"}'
jq -n --arg p "$(cat ~/atuin-server/password)" '{username:"me",password:$p}' |
  curl -s localhost:8000/login -H 'Content-Type: application/json' -d @- | jq keys
{"homage":"\"Through the fathomless deeps of space swims the star turtle Great A'Tuin, ...","version":"18.24.8"}
{"reason":"this server is not open for registrations"}
[
  "auth",
  "session"
]

Make it reachable#

The Atuin client talks HTTPS to its server from your terminal, so it can't sign in to exe.dev the way a browser does. Make the server public. On your computer:

ssh exe.dev share set-public my-atuin
curl -s https://my-atuin.exe.xyz/

This is the setup Atuin is built for, the same as its hosted server: everything is encrypted on your machines before it is sent, nobody can register, and the one account has a long random password. To keep the server off the internet instead, see the FAQ on Tailscale.

Connect your computer#

Your computer is the first machine, and its encryption key becomes the account's key. Install Atuin on it if you haven't, pointed at your server (it asks a few questions about key bindings and importing history):

curl --proto '=https' --tlsv1.2 -LsSf https://setup.atuin.sh | sh -s -- --sync https://my-atuin.exe.xyz

If Atuin was already installed and syncing elsewhere, run atuin logout and then atuin config set sync_address https://my-atuin.exe.xyz instead.

Log in with this machine's key, so the history you have stays readable, and sync. The password is the one on the server; -p - reads it from standard input:

ssh my-atuin.exe.xyz cat atuin-server/password | atuin login -u me -p - -k "$(atuin key)"
atuin sync
atuin status

atuin status shows Address: https://my-atuin.exe.xyz/ and Username: me. If the installer turned Threads on (it asks), your agents' sessions on this computer are captured from now on; atuin threads import adds the ones from before.

Join every new VM#

A new VM needs Atuin, the server's address, the password and your key. join.sh does that, and first connects Claude Code and Codex to exe.dev's LLM integration, so a session resumed there runs with no API key. On your computer, put it together with your credentials in one file only you can read:

mkdir -p ~/.config/atuin-exe
(umask 077; {
  echo '#!/bin/bash'
  echo 'export ATUIN_SYNC=https://my-atuin.exe.xyz ATUIN_USERNAME=me'
  echo "export ATUIN_PASSWORD='$(ssh my-atuin.exe.xyz cat atuin-server/password)'"
  echo "export ATUIN_ENCRYPTION_KEY='$(atuin key)'"
  curl -fsSL https://exe-staging.dev/deploy/atuin/join.sh
} > ~/.config/atuin-exe/setup.sh)

Make a VM with it as the setup script, which runs once at first boot (and is deleted from the VM afterwards):

ssh exe.dev new --setup-script /dev/stdin < ~/.config/atuin-exe/setup.sh

To join every VM you create from now on, make it your default setup script. exe.dev then stores your password and key with your account settings, so use this only if you're comfortable with that:

ssh exe.dev defaults write dev.exe new.setup-script < ~/.config/atuin-exe/setup.sh

A VM you already have joins the same way, by running the file on it:

ssh other-vm.exe.xyz bash < ~/.config/atuin-exe/setup.sh

On a joined VM, atuin status names your server, and atuin threads list shows the sessions from your other machines.

Resume a session somewhere else#

On a joined VM, start Claude Code in a project and give it some work. Atuin's daemon records the session as it goes and syncs it every few minutes; atuin sync sends it now.

Then, on your computer or another joined VM:

atuin sync
atuin resume

The picker lists every session, with the machine it ran on. Enter twice resumes it in its own agent: Atuin writes the transcript out from the synced records first. The list under it offers the other agents installed here, which continue the same conversation as a new session. From a script, name the session (an id prefix is enough) and the agent:

atuin threads list
atuin resume b3d629a2 --in codex

Agents can search old sessions too. atuin setup adds Atuin's MCP server to Claude Code and Codex when they're installed (atuin mcp install <agent> adds it later), so a new session can find how an earlier one solved something.

Back up and restore#

The server's data is ~/atuin-server/atuin.db, already encrypted with your key. Every logged-in machine also keeps its own full copy, so a lost server is a nuisance rather than a loss; your key (atuin key) is what you must never lose. Keep a week of nightly copies on the VM:

mkdir -p ~/atuin-server/backups
sudo tee /etc/systemd/system/atuin-backup.service >/dev/null <<EOF
[Service]
Type=oneshot
User=$USER
ExecStart=/bin/sh -c 'sqlite3 $HOME/atuin-server/atuin.db ".backup $HOME/atuin-server/backups/atuin-\$(date +%%F).db" && find $HOME/atuin-server/backups -name "atuin-*.db" -mtime +7 -delete'
EOF
sudo tee /etc/systemd/system/atuin-backup.timer >/dev/null <<EOF
[Timer]
OnCalendar=daily
Persistent=true

[Install]
WantedBy=timers.target
EOF
sudo systemctl daemon-reload
sudo systemctl enable --now atuin-backup.timer
sudo systemctl start atuin-backup.service
ls ~/atuin-server/backups

To keep one off the VM, copy it to your computer: scp my-atuin.exe.xyz:atuin-server/backups/atuin-$(date +%F).db .

To restore, stop the server, put a copy in place, and start it:

sudo systemctl stop atuin-server
rm -f ~/atuin-server/atuin.db-wal ~/atuin-server/atuin.db-shm
cp ~/atuin-server/backups/atuin-YYYY-MM-DD.db ~/atuin-server/atuin.db
sudo systemctl start atuin-server

Update#

Read the release notes first: Atuin asks self-hosters to follow tagged releases. Then install the new version's server and restart it:

curl --proto '=https' --tlsv1.2 -LsSf https://github.com/atuinsh/atuin/releases/download/vX.Y.Z/atuin-server-installer.sh | sh
sudo systemctl restart atuin-server
curl -s -w '\n' localhost:8000/

Clients update themselves with atuin update, or by running the install command again.

Troubleshooting#

  • The server doesn't start. journalctl -u atuin-server -n 50 shows why; a typo in ~/atuin-server/server.toml is the usual cause.
  • error sending request on login. The VM isn't public yet (ssh exe.dev share show my-atuin), or you're on the server VM itself, which can't reach its own public address: use http://localhost:8000 there.
  • A session doesn't show up on another machine. Run atuin sync on both. If atuin threads list is still empty, check that capture is on (atuin config get threads.capture) and the daemon is running (atuin daemon status); atuin threads enable turns both on.
  • Login fails with a key error. Every machine must use the same key. Run atuin key on a machine that syncs, and log in with -k and those words.
  • Forgot the password. On the server, ATUIN_CONFIG_DIR=~/atuin-server ~/.atuin/bin/atuin-server admin user set-password me sets a new one; machines that are logged in stay logged in.

Frequently asked questions#

Why self-host instead of using Atuin's hosted sync?

Atuin's hosted server is end-to-end encrypted too, so either works. Self-hosting keeps even the encrypted records, and the record of when your machines sync, on a machine you control. It is also the only option if your company doesn't allow a third-party sync service.

Is it safe to make the server public?

It is how Atuin is designed to run, and how its hosted server runs. Records are encrypted with your key before they leave a machine, so the server only stores ciphertext. Registration is closed, and the only account has a long random password. What an attacker can reach is Atuin's login and sync API, over HTTPS from exe.dev's proxy.

Can I keep the server off the internet?

Yes, with Tailscale: leave the VM private, put it and every client on your tailnet (the Tailscale integration joins VMs without keys), and use http://my-atuin:8000 as the sync address. The price is that each new VM must join the tailnet before it can sync. exe.dev's own login can't sit in front: it is made for browsers, and the Atuin client can't sign in to it.

Which agents does Atuin Threads capture?

Claude Code, Codex, Copilot, Grok Build, Hermes Agent, Kiro, opencode, Pi and Amp, according to Atuin's docs. Capture is on after atuin setup, and the Atuin daemon records sessions as the agents write them. atuin threads import brings in older ones.

Can a session move to a different agent?

Yes. In the atuin resume picker, pick another installed agent, or run atuin resume <id> --in codex. The conversation and its tool calls carry over into a new session of that agent.

Should I use PostgreSQL?

Not for one person: SQLite is one of Atuin's two first-tier databases, and it needs nothing else running. For a server shared by a team, Atuin also supports PostgreSQL; set db_uri to a PostgreSQL on exe.dev database.

What does it cost?

Atuin is free and open source (MIT). The server is small: it runs next to anything else on a VM in your exe.dev plan. Agents you resume on a VM through exe.dev's LLM integration are billed to your exe.dev account.

Updated Nov 13, 2026 · tested end to end Nov 13, 2026 · Markdown · manifest.json · Something wrong? Tell us