Skip to content
StateDockStateDock
Open appApp
Back to Blog
Self-hostingReleaseMCP

Your agents' shared memory, on a $5 server, in one command

StateDock Local now installs on any Linux VPS as a systemd service: one command, no Docker, no database to run, automatic backup and rollback on every upgrade.

StateDock Local started as an app for your laptop: download, double-click, and your coding agents have a shared place to record goals, decisions, Ready work and handoffs.

The catch with a laptop is that it sleeps. The agent on your VPS can't reach it, your phone can't check on it, and a scheduled run at 3 a.m. finds nothing to claim.

Version 0.1.0 fixes that. The same program now runs as a small always-on server, and installing it takes one command.

One command

On any systemd-based Linux (Ubuntu, Debian, Fedora…), x64 or ARM64:

curl -fsSL https://raw.githubusercontent.com/statedock/statedock-local/main/scripts/install.sh \
  | sudo bash -s -- --public-url https://dock.example.com

About a minute later you have:

  • a statedock service that starts on boot and restarts if it crashes, running as its own unprivileged user;
  • the program in /opt/statedock, your data in /var/lib/statedock, settings in /etc/statedock/statedock.env;
  • an access token: sudo statedock token prints it.

No Docker, no Node.js, no Postgres. The release bundles its own runtime and uses a single SQLite file. It idles comfortably on a 1 CPU / 1 GB machine.

Don't have a domain yet? Leave off --public-url and it just runs on the server itself; you can add the domain later.

Make it reachable

Out of the box the service listens only on 127.0.0.1:4040, so nothing is exposed until you decide how. The simplest route is Caddy, which fetches HTTPS certificates by itself:

dock.example.com {
    reverse_proxy 127.0.0.1:4040
}

If you'd rather not open any ports, point Cloudflare Tunnel or Tailscale at http://127.0.0.1:4040 instead.

One owner, one token

On a server StateDock switches to server mode. There are no accounts, roles or invitations to manage, just one token:

  • in a browser you sign in once at /login and stay signed in for 30 days;
  • agents send it as a Bearer token;
  • everything except a health check and static files requires it.

Connecting Claude Code, for example:

claude mcp add --transport http statedock https://dock.example.com/mcp \
  --header "Authorization: Bearer YOUR_TOKEN"

Cursor, Codex, Windsurf and other MCP clients use the same URL and header. If the token ever leaks, delete /var/lib/statedock/agent_token and restart the service: a new one is generated and every old session is signed out.

Upgrades that can't eat your data

The part I care about most is the boring one:

sudo statedock-ctl update

It downloads the new release and checks its checksum, stops the service, and writes a consistent snapshot of the database to /var/lib/statedock/backups/. Then it switches to the new version and waits for it to report healthy.

If the new version doesn't come up within 30 seconds, the script restores the snapshot, switches back to the previous version and starts it again. You end up either on the new version or exactly where you were.

The last three versions stay on disk. statedock backup takes a snapshot at any time, even while it's running.

Docker is still there, just thinner

If your server is already all Docker, ghcr.io/statedock/statedock is the same program in a container, and the repository ships a Compose file with Caddy. There is no longer a separate Docker edition to fall behind: the former statedock-docker repository is archived, and its ./data folder works with the new image unchanged.

Same data everywhere

Laptop, VPS and Docker all run one program on one database format. Start on your laptop, and when you want it always on, stop it, copy ~/.statedock/statedock.db to the server and start the service. Migrations run forward automatically.

Try it

StateDock Local is open source under AGPL-3.0. If the installer trips on your distribution, open an issue with the output; that's exactly the feedback this release needs.