[{"data":1,"prerenderedAt":185},["ShallowReactive",2],{"seo-verification":3,"blog-self-host-atuin-on-a-vps-to-sync-your-shell-history-en":6},{"google":4,"bing":5},"EycwPY2XMyTkVzas3n1ygeNJFGAH513qrMjfDljzsMQ","",{"key":7,"data":8},"blog-self-host-atuin-on-a-vps-to-sync-your-shell-history-en",{"id":9,"slug":10,"slugs":11,"title":15,"excerpt":16,"readTime":17,"views":18,"isPinned":19,"publishedAt":20,"updatedAt":21,"category":22,"categories":27,"featuredImage":29,"bgImage":30,"posterImage":31,"relatedSolution":29,"intro":32,"sections":33,"ctaTitle":116,"ctaBody":117,"ctaButton":118,"ctaUrl":119,"relatedPosts":120},444,"self-host-atuin-on-a-vps-to-sync-your-shell-history",{"fr":12,"en":10,"ar":13,"es":14},"self-host-atuin-vps","atuin-على-vps-مزامنة-سجل-الأوامر-مشفر","sincronizar-historial-terminal-con-atuin-en-vps","Self-host Atuin on a VPS to Sync Your Shell History","Host your own Atuin server on a VPS and find any command typed on any of your machines in under a second, encrypted client-side.",7,0,false,"2026-10-15T00:00:00+00:00","2026-10-16T01:57:35+00:00",{"id":23,"name":24,"slug":25,"color":26,"icon":25},2,"Automation","automatisation","bg-brand-action\u002F10 text-brand-action",[28],{"id":23,"name":24,"slug":25,"color":26,"icon":25},null,"\u002Fblog\u002Fcovers\u002Fbg.svg","\u002Fblog\u002Fcovers\u002Fself-host-atuin-vps-poster.svg","Atuin replaces `.zsh_history` with a local SQLite database and synchronises that history across your machines via a server you run yourself. Every command is encrypted before being sent: the server never sees the content. The result is a history searchable in milliseconds, shared across laptops, servers and VMs, without handing your data to a third party.",[34,38,49,52,74,77,81,84,113],{"type":35,"title":36,"body":37},"h2","Why sync your shell history","Working across multiple machines should be seamless. In practice, the `kubectl rollout undo deployment\u002Fapi` command you typed on your laptop is never in the CI server terminal, and the `docker compose exec` from three weeks ago is gone because history rotation overwrote older entries.\n\nAtuin solves both problems at the root: it stores every command in SQLite with its context (timestamp, duration, exit code, directory), and it synchronises that database across your machines through a server you control. Search runs locally — no network latency when recalling a command — and sync happens in the background. The `Ctrl+R` interface becomes an exhaustive index of everything you have ever typed, on any machine, since day one.",{"type":39,"title":40,"items":41},"ul","Concrete benefits of a self-hosted Atuin",[42,43,44,45,46,47,48],"Find any command typed on any machine in under a second via `Ctrl+R`.","Client-side encryption (AES-256): the server never sees the content of your history.","Rich context per entry: exit code, execution duration, working directory, hostname.","No data sent to a third party — you host, you own.","Rust binary with no heavy dependencies: runs on the VPS Start starting at 99 DH\u002Fmonth.","Supports zsh, bash, fish, nushell and PowerShell — one server for your entire fleet.","Built-in usage statistics (`atuin stats`): your most frequent commands, your activity peaks.",{"type":35,"title":50,"body":51},"Prerequisites","**VPS**: the Atuin server is a compiled Rust binary with an embedded SQLite database. It uses less than 50 MB of RAM at rest, making it compatible with the VPS Start. Allow 512 MB of available RAM for the full stack (OS + Atuin process), and 5 GB of SSD storage for long-term history. A recent Linux kernel (Debian 12 or Ubuntu 22.04+) works perfectly.\n\n**Docker and Docker Compose** must be installed on the VPS — this is the deployment method recommended by the project. If your VPS is fresh, install Docker via the \u003Ca href=\"https:\u002F\u002Fdocs.docker.com\u002Fengine\u002Finstall\u002F\">official script\u003C\u002Fa> or the Docker template from the ServOrbit Marketplace.\n\n**A domain name** pointing to the VPS is recommended (`atuin.your-domain.com`, A record) to generate an automatic TLS certificate. The certificate is mandatory: the Atuin client refuses to sync in cleartext by default.",{"type":53,"title":54,"steps":55},"steps","Install the Atuin server on the VPS",[56,59,62,65,68,71],{"title":57,"body":58},"Connect to the VPS and create a working directory","Connect via SSH to your VPS:\n\n```bash\nssh root@\u003Cvps-ip>\n```\n\nCreate a dedicated directory:\n\n```bash\nmkdir -p \u002Fopt\u002Fatuin && cd \u002Fopt\u002Fatuin\n```",{"title":60,"body":61},"Write the docker-compose.yml file","Create the composition file:\n\n```bash\ncat > docker-compose.yml \u003C\u003C 'EOF'\nservices:\n  atuin:\n    image: ghcr.io\u002Fatuinsh\u002Fatuin:v18.23.0\n    command: server start\n    volumes:\n      - .\u002Fconfig:\u002Fconfig\n    ports:\n      - \"8888:8888\"\n    environment:\n      ATUIN_HOST: \"0.0.0.0\"\n      ATUIN_PORT: \"8888\"\n      ATUIN_OPEN_REGISTRATION: \"true\"\n      ATUIN_DB_URI: \"sqlite:\u002F\u002F\u002Fconfig\u002Fhistory.db\"\n    restart: unless-stopped\nEOF\n```\n\nThis configuration uses SQLite (embedded, no external dependency) and enables registration so you can create your account on first connection.",{"title":63,"body":64},"Create the config directory and start the container","Atuin needs a writable config directory:\n\n```bash\nmkdir -p config && chown 1000:1000 config\n```\n\nStart the server:\n\n```bash\ndocker compose up -d\n```\n\nVerify the container is running:\n\n```bash\ndocker compose ps\n# NAME      STATUS          PORTS\n# atuin     Up 2 minutes    0.0.0.0:8888->8888\u002Ftcp\n```",{"title":66,"body":67},"Open port 8888 in the UFW firewall","Port 8888 must be reachable from your client machines. On Ubuntu\u002FDebian with UFW:\n\n```bash\nsudo ufw allow 8888\u002Ftcp\nsudo ufw status\n```\n\n⚠️ If you skip this step, the atuin client will display `Connection refused` or `Failed to sync history` when syncing — the most common error in self-hosted deployments.",{"title":69,"body":70},"Put an HTTPS reverse proxy in front of the server","The Atuin client requires HTTPS by default. Place Caddy in front:\n\n```bash\napt-get install -y caddy\n```\n\nCreate `\u002Fetc\u002Fcaddy\u002FCaddyfile`:\n\n```bash\natuin.your-domain.com {\n    reverse_proxy localhost:8888\n}\n```\n\nRestart Caddy (it obtains the Let's Encrypt certificate automatically):\n\n```bash\nsystemctl restart caddy\n```\n\nVerify the server responds:\n\n```bash\ncurl https:\u002F\u002Fatuin.your-domain.com\n# {\"msg\":\"Atuin server v18.23.0\"}\n```",{"title":72,"body":73},"Close registration once your account is created","Once your accounts are created (see the next section), disable public registration to prevent unwanted accounts. Edit `docker-compose.yml`:\n\n```bash\nATUIN_OPEN_REGISTRATION: \"false\"\n```\n\nRestart the container:\n\n```bash\ndocker compose up -d\n```\n\nAlternatively, create `\u002Fopt\u002Fatuin\u002Fconfig\u002Fserver.toml` for more granular control:\n\n```bash\n[server]\nhost = \"0.0.0.0\"\nport = 8888\nopen_registration = false\n\n[server.db]\ndb_uri = \"sqlite:\u002F\u002F\u002Fconfig\u002Fhistory.db\"\n```",{"type":35,"title":75,"body":76},"Install and configure the Atuin client","On each of your machines (laptop, dev server, etc.), install Atuin using the official script:\n\n```bash\ncurl --proto '=https' --tlsv1.2 -LsSf https:\u002F\u002Fsetup.atuin.sh | sh\n```\n\nThe script installs the binary to `~\u002F.atuin\u002Fbin` and detects your shell.\n\n**Shell integration** — add the corresponding line to your shell configuration file:\n\n```bash\n# For zsh (~\u002F.zshrc)\neval \"$(atuin init zsh)\"\n\n# For bash (~\u002F.bashrc)\neval \"$(atuin init bash)\"\n\n# For fish (~\u002F.config\u002Ffish\u002Fconfig.fish)\natuin init fish | source\n```\n\nReload your shell: `source ~\u002F.zshrc` (or equivalent).\n\n**Register an account on your server**:\n\n```bash\natuin register \\\n  --server https:\u002F\u002Fatuin.your-domain.com \\\n  -u your-username \\\n  -e your@email.com \\\n  -p your-password\n```\n\nAtuin generates a **local encryption key** — it is displayed on screen. Note it immediately: you will need it to connect other machines, and it cannot be regenerated.\n\n**First sync**:\n\n```bash\natuin sync\n# Syncing history...\n# History synced!\n```\n\n**Logging in from a second machine**:\n\n```bash\natuin login \\\n  --server https:\u002F\u002Fatuin.your-domain.com \\\n  -u your-username \\\n  -p your-password \\\n  -k \"\u003Cyour-encryption-key>\"\n\natuin sync\n```",{"type":78,"title":79,"body":80},"tip","Security: firewall, registration and reverse proxy","Three settings to check after your initial deployment:\n\n**1. `open_registration: false`** as soon as your accounts are created. Left as `true`, anyone who knows the URL can create an account and use your storage.\n\n**2. Never expose port 8888 directly** — traffic must always go through the HTTPS reverse proxy. Restrict UFW:\n\n```bash\n# Block direct external access to port 8888\nsudo ufw delete allow 8888\u002Ftcp\n# The local reverse proxy (Caddy) connects to it internally\n```\n\n**3. Back up the SQLite database** regularly:\n\n```bash\ndocker compose exec atuin sh -c \"sqlite3 \u002Fconfig\u002Fhistory.db \\\".backup \u002Fconfig\u002Fhistory.backup.db\\\"\"\n```\n\nThe database grows slowly — a few dozen MB even after years of heavy use.",{"type":35,"title":82,"body":83},"Troubleshooting — common errors","A few errors encountered during a self-hosted deployment and how to resolve them.\n\n**`Connection refused` on first `atuin sync`**\nPort 8888 is not open in UFW, or the container is not running. Check with:\n```bash\nsudo ufw status | grep 8888\ndocker compose ps\n```\n\n**`SSL certificate problem: unable to get local issuer certificate`**\nThe TLS certificate has not yet been issued by Caddy. Wait 30–60 seconds after restarting Caddy and retry `atuin sync`. Make sure the DNS for `atuin.your-domain.com` points to the VPS IP.\n\n**`Invalid credentials` at `atuin login`**\nThe encryption key is incorrect or truncated. Retrieve it from the original machine:\n```bash\natuin key\n```\nPaste the full value (long base64 string) after `-k`.\n\n**`open_registration is disabled`**\nYou closed registration before creating all your accounts. Temporarily set `ATUIN_OPEN_REGISTRATION: \"true\"` in `docker-compose.yml`, restart, create the account, then switch back to `false`.\n\n**History does not sync after `atuin sync`**\nCheck that the server is set as the target in the client config:\n```bash\ncat ~\u002F.config\u002Fatuin\u002Fconfig.toml | grep sync_address\n# sync_address = \"https:\u002F\u002Fatuin.your-domain.com\"\n```\nIf the key is missing, add it manually to `~\u002F.config\u002Fatuin\u002Fconfig.toml`.",{"type":85,"title":86,"headers":87,"rows":93},"comparison","Atuin vs the alternatives: which tool to choose",[88,89,90,91,92],"Tool","E2E encryption","Multi-machine sync","Self-hosted","Advanced search",[94,100,105,108],[95,96,97,98,99],"**Atuin**","Yes (AES-256, local key)","Yes (optional server)","Yes (Docker, SQLite)","Yes (context, exit code, duration)",[101,102,102,103,104],"McFly","No","N\u002FA (local only)","Yes (neural network, working directory)",[106,102,102,103,107],"Histdb","Partial (local SQLite, zsh plugin)",[109,102,110,111,112],"Native zsh_history","No (manual rsync possible)","N\u002FA","Minimal (grep, fzf optional)",{"type":35,"title":114,"body":115},"Atuin, a tool that scales with you","Atuin v18.23.0 is the most complete solution for a developer working across multiple machines who cares about data privacy. Initial setup takes under 30 minutes on a VPS Start, and the result is an exhaustive, encrypted history searchable instantly from any terminal.\n\nOnce the server is running, you can go further: configure automatic sync (`atuin daemon`), use weekly statistics (`atuin stats`), or explore the advanced search interface with filtering by exit code or hostname. The command you are looking for is always there — no matter which machine you typed it on.","Deploy Atuin on a ServOrbit VPS","A VPS Start is enough to run the Atuin server continuously. Root access, dedicated IPv4, NVMe SSD — everything you need for a private, always-available shell history.","Deploy Atuin on VPS","\u002Fsolutions\u002Fdeveloppeurs",[121,145,168],{"id":122,"slug":123,"slugs":124,"title":128,"excerpt":129,"readTime":130,"views":131,"isPinned":19,"publishedAt":132,"updatedAt":133,"category":134,"categories":139,"featuredImage":29,"bgImage":30,"posterImage":141,"relatedSolution":142},41,"deploy-your-applications-with-coolify-on-a-vps",{"fr":125,"en":123,"ar":126,"es":127},"deployer-avec-coolify","نشر-تطبيقاتك-باستخدام-coolify-على-vps","desplegar-aplicaciones-con-coolify-en-un-vps","Deploy Your Applications with Coolify on a VPS","Deploy Coolify on a VPS: installation, HTTPS configuration, Git connection, deploying your first application, databases, backups, and troubleshooting.",9,1,"2026-05-10T00:00:00+00:00","2026-09-07T11:26:10+00:00",{"id":135,"name":136,"slug":137,"color":138,"icon":137},3,"Deployment","deploiement","bg-success\u002F10 text-success",[140],{"id":135,"name":136,"slug":137,"color":138,"icon":137},"\u002Fblog\u002Fcovers\u002Fdeployer-avec-coolify-poster.svg",{"categorySlug":143,"appSlug":144},"application-deployment-devops","coolify",{"id":146,"slug":147,"slugs":148,"title":152,"excerpt":153,"readTime":154,"views":131,"isPinned":19,"publishedAt":155,"updatedAt":133,"category":156,"categories":162,"featuredImage":29,"bgImage":30,"posterImage":164,"relatedSolution":165},108,"securing-your-vps-with-crowdsec",{"fr":149,"en":147,"ar":150,"es":151},"securiser-vps-crowdsec","تأمين-خادمك-الافتراضي-vps-باستخدام-crowdsec","proteger-vps-con-crowdsec","Securing your VPS with CrowdSec","Deploy CrowdSec on your VPS to block attacks thanks to behavioral detection and a shared community blocklist.",4,"2026-03-04T00:00:00+00:00",{"id":157,"name":158,"slug":159,"color":160,"icon":161},8,"Security & Monitoring","securite-monitoring","bg-rose-500\u002F10 text-rose-400","security",[163],{"id":157,"name":158,"slug":159,"color":160,"icon":161},"\u002Fblog\u002Fcovers\u002Fsecuriser-vps-crowdsec-poster.svg",{"categorySlug":166,"appSlug":167},"cybersecurity-bastion","crowdsec",{"id":169,"slug":170,"slugs":171,"title":175,"excerpt":176,"readTime":135,"views":18,"isPinned":19,"publishedAt":177,"updatedAt":133,"category":178,"categories":179,"featuredImage":29,"bgImage":30,"posterImage":181,"relatedSolution":182},110,"setting-up-a-wireguard-vpn-on-your-vps",{"fr":172,"en":170,"ar":173,"es":174},"vpn-wireguard-vps","إعداد-شبكة-vpn-باستخدام-wireguard-على-خادمك-vps","montar-una-vpn-wireguard-en-vps","Setting up a WireGuard VPN on your VPS","Deploy a WireGuard VPN on your Cloud VPS: encrypted tunnel, Docker configuration and clients in a few minutes. Step-by-step guide.","2026-03-02T00:00:00+00:00",{"id":157,"name":158,"slug":159,"color":160,"icon":161},[180],{"id":157,"name":158,"slug":159,"color":160,"icon":161},"\u002Fblog\u002Fcovers\u002Fvpn-wireguard-vps-poster.svg",{"categorySlug":183,"appSlug":184},"networking-vpn","wireguard-server",1792123573971]