Self-host Paperclip on a VPS
Paperclip is the control plane over your AI coding agents. Install it on a VPS, then reach the UI over SSH or a tailnet instead of the public internet.
What Paperclip is
Paperclip is not an agent. It is the control plane over the agents you already run, and it does not perform model inference itself. It wakes each agent on a heartbeat, a short scheduled execution window, then records the run, its cost and its output against the work that run was meant to advance. Around that loop it keeps the structure a group of agents needs: companies, an org chart, goals and issues, budgets, and approvals that a person signs. An agent reaches Paperclip through an adapter, and the adapter is the boundary that decides how the agent executes: a local coding CLI session such as Claude Code or Codex, a shell command, an HTTP webhook, or a plugin package. The project's own doc/PRODUCT.md puts it plainly: agents "run wherever they run and phone home".
That single fact drives every decision below. Paperclip schedules and remembers. Your adapters do the work.
What you get when you self-host Paperclip on a VPS
Everything in this guide was read from the paperclipai/paperclip repository README and its doc/ directory at release v2026.916.1, published 2026-09-21, and checked again on 2026-09-30. The install, onboarding, service, update and bind-mode details were rechecked against the current documentation and source on 2026-10-12, when the newest release was v2026.1012.0, published 2026-10-12. The build requirements, the bind and runtime modes, the Tailscale access steps and the firewall guidance were rechecked on 2026-10-25, when the newest release was v2026.1023.0. This project ships often, so confirm anything version-shaped against paperclipai --version on your own box before you trust it.
What lands on the server is a Node.js API server and a React user interface. The supported minimum is Node.js 24.11.0 on PATH, and managed installs enforce it. An npx install or a directly started server on Node 22 or 23 prints an unsupported-version warning and continues. pnpm is needed only if you build from a source checkout instead of installing the published package. For that path the project's quickstart and developer docs ask for pnpm 9 or newer, while the repository README lists 9.15 or newer, so a source build on pnpm 9.15 or later satisfies both. Source development also builds the native Paperclip Runner when enabled, which is the self-hosted default, so install a Rust toolchain or set PAPERCLIP_RUNNER_BINARY to a compatible prebuilt runner. If you plan to use local Claude or Codex subscription sign-in, the README adds that the Paperclip host also needs Python 3 and the matching provider CLI. An embedded PostgreSQL database is created for you on first start, so there is no database server to install and no connection string to write. The server listens on port 3100 by default.
One detail from the server source saves an hour of confusion later. Port 3100 is the preferred port, not a guaranteed one: Paperclip uses detect-port, which tries ports 3100 through 3109 before requesting an operating-system-assigned port. So if something else on the box already holds 3100, Paperclip takes 3101 if it is available, and logs the requested and selected ports with "Requested port is busy; using next free port". An SSH tunnel still pointed at 3100 will not reach Paperclip. paperclipai doctor reports the port it actually bound, along with managed-install status, service health, storage and database checks.
Sizing the box: your agents, not Paperclip
This is reasoning from the architecture, not a benchmark. Paperclip's own process is a Node server, a static user interface and an embedded PostgreSQL holding rows about companies, issues, runs and costs. That workload is small and mostly idle between heartbeats, though Paperclip also handles assigned work, follow-up messages, routines and background maintenance.
The box is sized by the adapters you put on it. A local CLI adapter starts or resumes a real coding session on that machine, which means a Node or Python process, a git checkout of the repository it works on, whatever the project's test suite loads, and a language server if the tool starts one. Two Claude Code sessions and a Codex session woken by the same heartbeat window are three of those at once. That is the number to plan around.
So there are two shapes of deployment, and they want very different servers. If every adapter is an HTTP webhook pointing at agents running elsewhere, the VPS carries Paperclip and Postgres and little else, and a small instance is honest. If the coding agents live on the same VPS, budget for the concurrent sessions first and treat Paperclip's own footprint as a rounding error on top. Stagger heartbeats across the day rather than firing every agent on the hour, because concurrent peak is what runs you out of memory, not daily total. If you are already running coding sessions this way, the layout in running Claude Code on a VPS under tmux is the same box Paperclip will be driving.
Install Paperclip with the checksum step
The documented managed install downloads a script and verifies it before running it. Run all four steps. Skipping to the last one is how people end up piping an unverified script into a shell.
curl -fsSLO https://paperclip.ing/install.sh
curl -fsSLO https://paperclip.ing/install.sh.sha256
if command -v sha256sum >/dev/null 2>&1; then
sha256sum -c install.sh.sha256
else
shasum -a 256 -c install.sh.sha256
fi
bash install.shsha256sum -c prints install.sh: OK on success. Any other output means stop.
Now the part worth understanding, because it changes what that check is worth. The checksum file is served from the same origin as the script. Both come from paperclip.ing. Anyone able to replace install.sh on that origin can replace install.sh.sha256 in the same motion, and your verification passes against the attacker's own hash. What this check genuinely catches is a truncated download, a corrupted cache object or a mangled proxy response. It is not a defence against a compromised origin, and treating it as one is the mistake.
The independent check is a copy that lives somewhere else, under a release tag. The installer is committed to the repository at scripts/install.sh, so fetch the release-tagged copy and compare:
curl -fsSL https://raw.githubusercontent.com/paperclipai/paperclip/v2026.916.1/scripts/install.sh \
-o install.sh.tagged
diff install.sh install.sh.taggedNo output from diff means the two files are identical and you are running the script that is in the tagged source. If they differ, read the difference before you run anything. A hosted copy that has drifted from the tagged source is not automatically an attack (the site may serve a newer build than the tag you picked), but it is a reason to read the script rather than trust it.
Read it anyway once. The installer detects your operating system and architecture, installs Node.js 24.11.0 or newer if it is missing, hands off to paperclipai install (run through npx) for the managed install, and can run onboarding and install a per-user service. It fetches helper scripts of its own, and it verifies each one against a hard-coded SHA-256 value, confirms the file starts with #!, and runs a Bash syntax check before executing it. On a VPS where you already manage Node yourself, install Node first so the script has nothing to decide.
npx paperclipai install is the same managed install without the shell script around it: it downloads the latest published release, verifies it, and places a paperclipai command in ~/.local/bin. It is not a way to keep your shell startup files untouched, though, because install.sh delegates to exactly this command and both routes handle PATH the same way. If ~/.local/bin is not on your PATH, an interactive run offers to add it to your ~/.bashrc or ~/.zshrc, inside a marked block that paperclipai uninstall removes later. Decline and it prints export PATH="$HOME/.local/bin:$PATH" for you to add yourself. A non-interactive run prints that line without editing any shell file.
Then set up your instance. In an interactive terminal, install.sh goes straight into paperclipai onboard when it finishes, so you may already be there. If not, run it yourself:
paperclipai onboard --yesWith --yes, onboarding accepts the Quickstart defaults without asking: the embedded PostgreSQL database, local_trusted mode, a loopback bind and port 3100. It then starts the server in the foreground, so that terminal stays busy. It does not install a background service unless you add --install-service, and the next section covers that step on its own. From a second SSH session, check the result:
paperclipai doctordoctor should come back with the managed install found, the database reachable and a bound port reported. A failure here is far cheaper to fix than the same failure discovered through a browser that will not load. Stop the foreground server with Ctrl+C before you install the service below.
Run Paperclip as a service so it survives your logout
Paperclip installs a systemd user service on Linux, and a LaunchAgent on macOS.
paperclipai service install
paperclipai service status
paperclipai service logs -fstatus should show the service installed and active, then query the instance's health endpoint and report the version the server is running. logs -f follows the live log, which is where heartbeat runs and adapter errors appear.
A systemd user service is not a system service, and on a VPS that difference bites. By default the user manager shuts down when your last session ends, so the moment you close SSH, systemd tears down your user instance and Paperclip goes with it. Nothing errors. The service was simply stopped on purpose. Paperclip now offers to enable lingering during interactive service installation, and paperclipai service install --enable-linger accepts that step up front. Enable lingering so the user manager starts at boot and stays up with nobody logged in:
sudo loginctl enable-linger $USER
loginctl show-user $USER --property=LingerThat second command must print Linger=yes. paperclipai doctor also warns on Linux when start-on-login is enabled but lingering is off. Reboot the box, log back in and run paperclipai service status before you trust the setup. A control plane that misses every heartbeat overnight is worse than no control plane, because the dashboard still looks calm. The rest of the unit-file vocabulary, including OnFailure= handlers and restart policy, works the same way it does for any systemd service and timer you run on a VPS.
The remaining service verbs are start, stop, restart and uninstall.
The bind modes, and why the default is the right one on a VPS
This is the section the post exists for. Paperclip separates two settings, and confusing them is how an unauthenticated control plane ends up on a public IP address.
Runtime mode decides whether a human logs in. local_trusted requires no login and binds loopback only. authenticated requires a login, and comes in a private flavour for private networks and a public flavour for internet-facing instances.
Bind mode decides which address the server listens on. loopback listens on localhost only and is the default. lan listens on all interfaces, meaning 0.0.0.0. tailnet listens on the detected Tailscale address. custom takes an explicit host or address.
On a VPS, keep local_trusted with loopback, which is what a fresh install gives you. Never expose local_trusted to the internet, because it has no human login flow at all, so anything that can reach the port is treated as the operator and inherits your agents, your provider keys and your approval queue.
Note what lan means on a server. A VPS has no home network behind a router. Its primary interface carries a public address, so --bind lan publishes the port to the internet, whatever the word suggests.
Reaching the interface over an SSH tunnel
With the default loopback bind, forward the port from your laptop. Nothing on the server changes and nothing new listens publicly.
ssh -N -L 3100:127.0.0.1:3100 you@your-vpsOpen http://localhost:3100 while that stays running. If the page does not load, check the port Paperclip actually bound with paperclipai doctor and point the tunnel at that number instead.
Reaching it over a tailnet
For access from several of your own devices without a tunnel each time, bind to the tailnet address. Note the constraint: local_trusted is loopback-only, so a tailnet bind means moving to the authenticated runtime mode with private exposure. You get a login page, and the port is visible only to devices on your mesh network.
paperclipai configure --section server
paperclipai run --bind tailnetconfigure is the step that changes the saved server settings. According to doc/CLI.md, the --bind flag on run only passes a preset into first-run onboarding when no config exists yet. From a source checkout, the Tailscale guide uses pnpm dev --tailscale-auth, which binds to all interfaces, so restrict inbound access to the Tailscale interface. Then open http://<tailscale-host-or-ip>:3100 from another device on the same tailnet.
Rate limiting on the login form is off by default in private mode. Turn it on with PAPERCLIP_AUTH_RATE_LIMIT_ENABLED=true. If you would rather not depend on a hosted coordination server for this, running Headscale as your own Tailscale control server gives you the same mesh with the coordination plane on your own box.
Publishing it for a team, properly
When people who cannot hold an SSH key need access, use authenticated with public exposure. Set PAPERCLIP_PUBLIC_URL to the address users will actually type, because the mode requires an explicit public URL rather than guessing one. Request rate limiting on the authentication endpoints is on by default here. The documented recommendation is still loopback for the bind, with a reverse proxy in front terminating TLS (transport layer security) and forwarding to 127.0.0.1:3100. Paperclip never listens publicly itself, and the proxy owns the certificate. Picking that proxy is its own decision, covered in the comparison of Nginx, Caddy and Traefik as a reverse proxy.
In public mode, local stdio MCP (model context protocol) runtime slots fail closed by default. That is deliberate. An internet-facing control plane should not be spawning local processes on your behalf unless you have explicitly said so with PAPERCLIP_TRUSTED_MCP_RUNTIME_HOST.
With a loopback bind, whether you reach it over an SSH tunnel or through a reverse proxy, do not open 3100 in the firewall. Paperclip's VPS deployment guide says it in so many words, "Do not open port 3100 to the internet", and lists SSH, HTTP and HTTPS as the only inbound ports. A default-deny inbound policy with SSH allowed, plus 80 and 443 once a proxy is publishing, is the whole requirement, and it is step one of what to do in the first ten minutes on a new VPS. Direct tailnet, VPN and LAN access also require the Paperclip port, 3100 by default, to be reachable from the trusted devices using it. The Tailscale guide has you open the interface on port 3100 from another device, and when a remote device cannot connect, its troubleshooting step is to check that both devices are on the same tailnet and that port 3100 is reachable. If your firewall is what blocks it, allow 3100 on the Tailscale interface only, never on the public one.
Provider keys and agent secrets
Adapters authenticate with ordinary provider environment variables: ANTHROPIC_API_KEY for the Claude adapter, OPENAI_API_KEY for the Codex adapter, OPENROUTER_API_KEY for the OpenCode adapter. Agent-level credentials belong in Paperclip's secrets store instead, where values are held by reference and redacted from command output and telemetry.
npx paperclipai secrets create --company-id "$COMPANY_ID" --name deploy-token --value-env DEPLOY_TOKEN
npx paperclipai secrets list
npx paperclipai secrets doctor--value-env names an environment variable to read the value from, so the secret never appears as an argument. That matters because arguments are visible in ps output to any user on the box, and they land in your shell history file.
There is a second rule in doc/CLI.md worth copying onto a sticky note. Use npx paperclipai rather than pnpm paperclipai for any command whose argument can hold untrusted or semi-trusted content: issue text, comments, or model output. The pnpm form evaluates shell substitutions before the CLI ever receives the value, so text written by an agent can execute on your server. Paperclip's whole purpose is to carry text produced by agents, which makes this the sharpest edge in the tool.
The local encryption key lives at ~/.paperclip/instances/<instance-id>/secrets/master.key. Treat that file as the crown jewels of the install. The wider habits for this, including which keys an agent should be able to see at all, are in keeping secrets out of the reach of your AI agents. Budgets are the other half of that control surface, and setting real ones is the cheapest form of cost control for agents running on a VPS.
Back up the database, and the four things next to it
The documented layout for an instance is one directory:
~/.paperclip/instances/<instance-id>/
config.json
.env
db/
data/storage/
logs/
secrets/master.keyPAPERCLIP_HOME and PAPERCLIP_INSTANCE_ID override the location and the instance identifier. The embedded PostgreSQL keeps its data under db/, created on first start and persisted across restarts.
Read the limitation in doc/DATABASE.md before you design a backup. A logical database dump covers the public schema and the Drizzle migration journal. It does not include local-disk uploads, workspace files, or the local encrypted secrets master key. Restore a database-only backup onto a fresh box and you get an instance that holds every secret record and can decrypt none of them, because the key it needs was never in the dump.
Since v2026.1117.0, company skill package contents move into the configured file or object storage, and run logs also follow that storage provider. Back up that storage alongside the database: the default local storage is inside the instance directory, but an S3 bucket is not included in the archive below.
So back up the instance directory as a whole, with the service stopped so Postgres is not written to mid-copy:
paperclipai service stop
tar czf ~/paperclip-backup.tgz -C ~/.paperclip instances
chmod 600 ~/paperclip-backup.tgz
paperclipai service startMove that archive off the server. It contains master.key and .env, so anywhere you put it is now as sensitive as the VPS itself. Test the restore once, on a throwaway box, while you still have the original. From a source checkout there is also pnpm db:backup for logical dumps, with retention settings documented in doc/database-backups.md.
Updates and rollback
Managed installs update with one command, and every managed update of an existing instance starts by taking a database snapshot on its own. It stops if the database is not reachable rather than updating blind. --no-backup exists; use it only when you have deliberately taken the snapshot yourself or the instance is disposable.
paperclipai update --check
paperclipai update --dry-run
paperclipai updateIf you are upgrading from a version before v2026.1012.0, take a logical backup with paperclipai db:backup while the server is running, then drain and stop every server and worker writing to the instance root. Move leftover <hash>.lock/ directories out of locks/directory-merge/, but leave .lock.sqlite files in place. Run paperclipai update --no-backup, then start the service and every worker on the new version. The old and new lock protocols must never write to the same instance root at once.
Treat v2026.1117.0 as a rollback floor. Once its background migration moves skill packages out of PostgreSQL, an older binary needs those contents restored into the database before it can use them. Older versions also cannot read remote workspace storage enrolled by this release on S3-backed installs. Take a backup of the database and configured storage before upgrading, and plan to fix forward. During a mixed-version rolling upgrade, set PAPERCLIP_SKILL_PACKAGE_STORAGE_ENABLED=false on every process until all servers run the new version. On Linux, run paperclipai service install or paperclipai service restart once after updating so the unit picks up KillMode=mixed.
--check reports what is available without changing anything. --dry-run shows what would happen. Pin a version with paperclipai update --version 2026.916.1, follow the stable channel with --latest, or take pre-release builds with --canary. The update restarts your background service if one is active for the instance.
Switching to a retained payload uses one command:
paperclipai update --rollbackRollback switches the code, not the database schema or migrated storage; restore the required pre-update data before an older version uses it. Before rolling back across v2026.1012.0 to an earlier version, drain and stop every server and worker writing to the instance root, then restore the required data and roll back before starting the old version. Leave .lock.sqlite files in place.
Managed installs keep two previous payloads under ~/.paperclip/cli/installs, with ~/.paperclip/cli/current as a symlink switched atomically between them. Those retained payloads are a short code history, and they do not make rollback across the v2026.1117.0 storage migration safe. If you need to go back further than that, it is a restore from your own backup. Confirm where you landed with paperclipai --version, or with paperclipai service restart --expected-version <version> when you want the service to assert the version it came back on.
Uninstalling is paperclipai service uninstall followed by paperclipai uninstall. It deliberately leaves ~/.paperclip/instances/ in place, so removing the software does not remove your data.
Who should not run Paperclip
Paperclip earns its keep when there are several agents, real money moving through them, and a person who has to approve things. The org chart, the budgets and the approval queue are all overhead until there is something to organise.
If you run one agent for yourself, a control plane is a second service to patch, back up and keep off the internet, wrapped around a problem you do not have. Run the agent directly. The comparison between Hermes and OpenClaw covers that choice, and self-hosting a Hermes agent on a VPS is a much shorter evening. If you are still deciding what belongs on the box at all, start from the survey of self-hosted AI agents worth running and add the control plane when the agent count makes the spreadsheet painful.
FAQ
Can I put the Paperclip UI on the public internet?
Only in authenticated runtime mode with public exposure, with PAPERCLIP_PUBLIC_URL set and a reverse proxy terminating TLS in front of a loopback bind. Never expose the default local_trusted mode, because it has no login flow, so anyone who reaches the port is treated as the operator and inherits your agents, provider keys and approvals. Be careful with --bind lan on a VPS too: it listens on 0.0.0.0, and a VPS primary interface carries a public address, so lan means the internet there.
Why does Paperclip stop when I close my SSH session?
Participating in the shutdown is expected behaviour, not a crash. paperclipai service install creates a systemd user service on Linux, and by default the systemd user manager exits when your last login session ends, taking the service with it. Run sudo loginctl enable-linger $USER, then confirm with loginctl show-user $USER --property=Linger printing Linger=yes. Reboot and check paperclipai service status before relying on it.
Does Paperclip run the models, or do I still need the agent CLIs?
You still need them. Paperclip does not perform model inference. It wakes agents on heartbeats through adapters and records what happened, and each agent runs wherever its adapter runs. A local CLI adapter starts a real coding session on the same machine, so that machine needs the tool installed, its credentials, and enough memory for every session woken in the same window. An HTTP adapter pointing at an agent on another host leaves the Paperclip box carrying only the Node server and its embedded PostgreSQL.
What exactly do I need to back up to rebuild on a new VPS?
The whole instance directory, ~/.paperclip/instances/<instance-id>/, not just the database. A logical database dump covers the public schema and the Drizzle migration journal, and explicitly excludes local-disk uploads, workspace files and the secrets master key at secrets/master.key. Without that key the restored instance cannot decrypt any secret it holds. Stop the service, archive the directory, set mode 600 on the archive, and keep it off the server, because it contains both the master key and .env. If you use S3-compatible storage, back up that bucket too, including the skill packages and run logs stored there.
How do I verify the installer if the checksum comes from the same site?
Run the published sha256sum -c install.sh.sha256 step, and understand what it proves. Both files are served from paperclip.ing, so the check catches a truncated or corrupted download, not a compromised origin, because whoever could swap the script could swap its hash. For an independent check, download scripts/install.sh from the repository at a release tag on raw.githubusercontent.com and diff it against the copy you fetched. No output means they match. Any difference is a reason to read the script before running it.