---
title: "Deploy Atuin"
description: "Self-hosted Atuin shell history sync server with Postgres"
category: "Other"
url: https://railway.com/deploy/atuin-1
---

# Deploy Atuin

Self-hosted Atuin shell history sync server with Postgres

**[Deploy Atuin on Railway](https://railway.com/template/atuin-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/atuin-1/manifest.json

- **Creator:** Agaz Self-Host
- **Category:** Other

## Template content

### Atuin https://cdn.jsdelivr.net/gh/homarr-labs/dashboard-icons/png/atuin.png

- **Source:** https://github.com/aalfath/atuin-railway-template
- **Health check:** /healthz
- **Public domain:** Yes

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

## Documentation

# Deploy and Host Atuin on Railway

Atuin replaces your shell history (bash, zsh, fish, nushell) with a searchable database that also records the directory, exit code and duration of each command. It syncs that history between your machines, encrypted on each machine before upload. This template runs your own Atuin sync server, version 18.24.8.

## About Hosting Atuin

The template deploys two services. Atuin is the sync server, built from a public GitHub repo on top of the official image (pinned by version and digest), with a public HTTPS domain and a `/healthz` health check. Postgres stores accounts and encrypted history on a volume, reachable only over the private network. Registration stays closed: on first boot the server creates one account, `atuin`, with a generated password you read in the Atuin service's Variables tab. After deploy, set `sync_address` in each client's config to your Railway domain, run `atuin login`, then `atuin sync`. Updates arrive as Railway update notices when the repo's version is bumped.

## Common Use Cases

* Sync shell history across your laptop, desktop and servers
* Keep encrypted command history on infrastructure you control instead of a hosted service
* Search past commands by directory, host, exit code or time on any machine

## Dependencies for Atuin Hosting

* Atuin sync server (`ghcr.io/atuinsh/atuin`, MIT)
* PostgreSQL (Railway Postgres)

### Deployment Dependencies

* Atuin source and releases: https://github.com/atuinsh/atuin/releases
* Self-hosting docs: https://docs.atuin.sh/self-hosting/server-setup/
* Template repo (Dockerfile, start script, changelog): https://github.com/aalfath/atuin-railway-template

### Implementation Details

On each machine, after installing the Atuin client:

```toml
# ~/.config/atuin/config.toml
sync_address = "https://YOUR-DOMAIN"
```

```sh
atuin login -u atuin        # password: ADMIN_PASSWORD from the Atuin service's Variables tab
atuin import auto
atuin sync
```

On the first machine leave the encryption key prompt empty; on the others paste the output of `atuin key`. The server can't read or recover your history without that key. To let other people sign up, add `ATUIN_OPEN_REGISTRATION=true`; to add accounts by hand, run `atuin-server admin user create NAME --email EMAIL` in a shell on the Atuin service.

## Why Deploy Atuin on Railway?


Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.

By deploying Atuin on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/atuin-1
