
Deploy Paperclip - AI Agent Company
Open-source control plane for AI agents. Includes managed Postgres
Just deployed
/var/lib/postgresql/data
paperclip
Just deployed
/paperclip
Deploy and Host Paperclip on Railway
Paperclip is an open-source AI agent orchestration platform for building and running autonomous agent companies. Define roles, assign tasks, set budgets and heartbeats, and let AI agents handle the execution. Connect Claude, Gemini, or OpenAI-compatible agents to a structured org chart, task queue, and governance layer.
About Hosting Paperclip
Paperclip needs a persistent server, a PostgreSQL database, and a public HTTPS URL for agent heartbeats and the web UI. This template wires all three automatically: a managed Railway Postgres database is pre-connected via DATABASE_URL, a volume is mounted at /paperclip for persistent config and storage, and the public Railway domain is injected at deploy time. There's no setup page or config file to edit. The bootstrap admin invite URL appears in the service logs, and sign-up closes automatically once your admin account is created.
Common Use Cases
- Running a fully autonomous AI agent company with org charts, task assignments, and per-agent budgets
- Orchestrating multiple LLM-backed agents (Claude, Gemini, OpenAI) from a single dashboard
- Importing pre-built agent company definitions from companies.sh with a single command
- Self-hosting Paperclip with production-grade PostgreSQL and persistent storage
Dependencies for Paperclip Hosting
- Railway Postgres, pre-wired via
DATABASE_URL - An API key from at least one LLM provider: Anthropic (
ANTHROPIC_API_KEY), OpenAI (OPENAI_API_KEY), or Google Gemini (GEMINI_API_KEY)
Deployment Dependencies
- Paperclip GitHub repo: open-source AI agent orchestration platform (MIT licence)
- Paperclip documentation: official docs for agent setup, adapters, and API reference
- alphasecio/paperclip: source repository for this template
- Deployment guide: step-by-step walkthrough with agent setup instructions
Implementation Details
The template builds on the official ghcr.io/paperclipai/paperclip:latest image and keeps its startup chain intact: tini reaps agent subprocesses, the upstream entrypoint fixes volume ownership and drops to an unprivileged user, and Paperclip runs its production server. A small wrapper script adds three things a headless public deployment needs:
- Writes a minimal
config.jsonon first boot (authenticated mode, public URL, database mode). Secrets andDATABASE_URLstay in Railway Variables. - Prints the bootstrap admin invite URL to the logs. Search the deploy logs for
invite; the invite expires after 72 hours. - Closes sign-up once the admin account exists. The service restarts once to apply this, and the logs show
entrypoint: admin claimed, restarting to disable sign-up. To keep sign-up open (e.g. to invite teammates), setPAPERCLIP_AUTH_DISABLE_SIGN_UP=falsein Railway Variables.
The service uses /api/health as its healthcheck and the Always restart policy, which the sign-up lockdown relies on.
LLM adapter reference:
| Provider | Adapter | Environment Variable |
|---|---|---|
| Anthropic | claude_local | ANTHROPIC_API_KEY |
| OpenAI | opencode_local | OPENAI_API_KEY |
| Gemini | opencode_local | GEMINI_API_KEY |
For Gemini, select opencode_local as the adapter in agent settings and choose your model. The gemini_local adapter requires interactive OAuth and won't work in a Railway container.
Why Deploy Paperclip 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 Paperclip 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.
Template Content
paperclip
alphasecio/paperclip
