
Deploy Paperclip — AI Agent Company OS on Railway
Self-host Paperclip: org charts, goals & budgets for your AI agent team.
Just deployed
/var/lib/postgresql/data
paperclip-ai
Just deployed
Deploy and Host Paperclip AI Agent OS on Railway
Paperclip is the open-source platform for running a company with AI agents. Not just another agent tool — Paperclip gives your AI team an org chart, goals, budgets, heartbeats, ticketing, and governance so agents like Claude, Codex, and OpenClaw operate as managed employees, not one-off prompts. If OpenClaw is an employee, Paperclip is the company.
This template deploys a fully configured Paperclip instance with managed PostgreSQL and
persistent volume storage — browser-based setup at /setup, no SSH, no DevOps required.
What This Template Deploys
| Service | Purpose |
|---|---|
| Paperclip | The AI agent OS — org charts, goals, budgets, ticketing, and governance for your agent team. Browser UI served at / with setup wizard at /setup on port 3100 |
| PostgreSQL | Persistent database for auth, agent state, goals, tickets, execution history, and org chart data |
Volume (/paperclip) | Persistent app data storage — agent config and runtime state survive redeploys |
All services are pre-wired via Railway's private network. DATABASE_URL is injected automatically
from the PostgreSQL service — no manual connection string setup required.
About Hosting Paperclip
Running Paperclip in production requires a persistent PostgreSQL database for auth and agent state, a mounted volume for runtime data, a public HTTPS endpoint for the browser UI and agent webhooks, and secure credential management for your LLM provider API keys. Without a managed host, you're configuring Docker, networking, SSL, and volume mounts manually.
Railway handles all of it. This template provisions Paperclip alongside managed PostgreSQL,
mounts a persistent volume at /paperclip, and exposes your instance at a public HTTPS Railway
domain automatically. The browser-based /setup wizard generates your first admin invite and
authenticates your chosen LLM providers — no log scraping, no SSH access needed.
Typical cost: ~$5–10/month on Railway's Hobby plan for the full stack. Paperclip itself is free and open-source — you pay only for Railway compute and your LLM provider API usage.
Deploy in Under 5 Minutes
https://res.cloudinary.com/asset-cloudinary/image/upload/v1773763808/Paperclip_setup_page_vu1sr7.png
- Click Deploy on Railway and wait for the build (~3–5 minutes)
- Set
PAPERCLIP_PUBLIC_URLto your Railway public domain andBETTER_AUTH_SECRETto a strong random string in the Variables tab - Open
[your-domain]/setup— the wizard generates your first admin invite link - Optionally authenticate Claude (
ANTHROPIC_API_KEY) or Codex (OPENAI_API_KEY) for agents - Click your invite link, create your admin account, and open Paperclip at
/
No SSH. No Docker configuration. No database setup.
Common Use Cases
- Run an autonomous AI-powered company — hire Claude as your coder, a Codex agent as your researcher, and an OpenClaw agent as your marketer; give each goals, budgets, and heartbeats and let Paperclip coordinate work across the org chart
- Self-hosted alternative to AI agent SaaS platforms — own your agent infrastructure entirely; your goals, tasks, conversation history, and API keys stay on your Railway instance
- Multi-agent orchestration without custom glue code — replace ad-hoc agent wiring across n8n, custom scripts, and prompt chains with a single governed platform that tracks every agent's work, budget spend, and task completion
- Autonomous team for solo founders and small teams — spin up a full AI team (dev, marketing, ops, research) that runs against defined goals with budget guardrails — no per-seat licensing
- AI governance and auditability — every agent action, ticket update, and budget spend is logged and visible in the Paperclip dashboard; full audit trail for AI-driven decisions
- Internal AI company OS for agencies — run a separate Paperclip instance per client with dedicated agent teams, goal tracking, and org charts scoped to each engagement

Configuration
| Variable | Required | Description |
|---|---|---|
PAPERCLIP_PUBLIC_URL | ✅ Required | Your Railway public domain — e.g. https://your-app.up.railway.app. Required for auth callbacks and agent webhooks |
BETTER_AUTH_SECRET | ✅ Required | Auth session secret — generate a random 32+ character string |
DATABASE_URL | ✅ Auto-injected | PostgreSQL connection string — injected via Railway reference variable |
ANTHROPIC_API_KEY | Optional | Enables Claude as an agent provider — set in Railway Variables or authenticate via /setup |
OPENAI_API_KEY | Optional | Enables Codex as an agent provider — set in Railway Variables or authenticate via /setup |
PORT | Pre-set | 3100 — Paperclip's default port, auto-configured with Railway's HTTP proxy |
Healthcheck: set the healthcheck path to
/setup/healthzin your Railway service settings. Without this, Railway may mark the service unhealthy during the initial boot sequence.
Paperclip vs. Other Agent Approaches
| Paperclip (self-hosted) | OpenClaw | n8n AI Agents | Custom LangChain | |
|---|---|---|---|---|
| Agent org chart | ✅ Built-in | ❌ No | ❌ No | ❌ No |
| Budget controls | ✅ Per-agent budgets | ❌ No | ❌ No | ❌ No |
| Goal tracking | ✅ Goal → ticket → agent | ❌ No | ⚠️ Manual | ❌ No |
| Multi-agent governance | ✅ Heartbeats, audit trail | ❌ No | ⚠️ Limited | ❌ No |
| LLM agnostic | ✅ Claude, Codex, OpenClaw | ✅ Yes | ✅ Yes | ✅ Yes |
| Self-hostable | ✅ Yes | ✅ Yes | ✅ Yes | ✅ Yes |
| Browser UI | ✅ Full dashboard | ✅ Yes | ✅ Yes | ❌ No |
| Per-seat cost | ✅ None | ✅ None | ✅ None | ✅ None |
Dependencies for Paperclip Hosting
- API key from at least one LLM provider — Anthropic Claude or OpenAI (Codex) recommended
- Railway account — Hobby plan (~$5–10/month) covers the full stack
- Optional: custom domain for a permanent public URL for agent webhooks
Deployment Dependencies
- Paperclip GitHub Repository — source and docs
- Paperclip Documentation — full configuration reference
- Paperclip Website — product overview and quickstart
- Railway Volumes Documentation — persistent storage setup
- Anthropic API Keys — Claude agent access
- OpenAI API Keys — Codex agent access
Implementation Details
This template deploys Paperclip from a pinned upstream release alongside Railway-managed
PostgreSQL, connected over Railway's private internal network. A persistent volume is mounted
at /paperclip to store agent runtime data — this data survives every redeploy and version
update. The app serves the main UI at / and a browser-based setup wizard at /setup on
port 3100 with Railway's HTTP proxy layer handling HTTPS termination automatically.
On first boot, Paperclip runs database migrations automatically via DATABASE_URL. The setup
wizard at /setup generates an admin invite link — no terminal access or log inspection
required. LLM provider authentication (Claude, Codex) is handled either via environment
variables or through the /setup interface.
Frequently Asked Questions
What exactly is Paperclip — is it another AI chatbot? No. Paperclip is an agent OS — it gives your AI agents an org chart, goals, budgets, heartbeats, and a ticketing system. You define what the company needs to accomplish, hire agents (Claude, Codex, OpenClaw) into roles, set per-agent spending limits, and Paperclip coordinates execution. The mental model is managing a team, not prompting a tool.
How much does it cost to run Paperclip on Railway? Approximately $5–10/month on Railway's Hobby plan for the Paperclip app and PostgreSQL. LLM API costs are separate and depend on how active your agent team is. Paperclip itself is free and open-source — there are no per-seat, per-agent, or per-execution fees from Paperclip.
Do I lose agent state and goals if Railway redeploys?
No. All agent state, goals, tickets, org chart data, and execution history are stored in
PostgreSQL — not inside the container. The persistent volume at /paperclip retains runtime
data. Redeploys and version updates do not affect your data.
Which AI providers does Paperclip support?
Claude (Anthropic), Codex (OpenAI), and OpenClaw are natively supported as agent providers.
Set the relevant API key in Railway Variables or authenticate via the /setup wizard. You can
run agents on different providers simultaneously within the same Paperclip instance.
Can I run Paperclip for a team or just for personal use? Both. Paperclip supports multiple admin users and agent teams scoped to different goals and org structures. It works equally well for solo founders running an autonomous AI company and small teams managing shared agent workflows with budget oversight.
How do I update Paperclip to a newer version?
Update the image tag or source reference in your Railway service settings and trigger a redeploy.
PostgreSQL data and the /paperclip volume are fully preserved across updates.
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 get a self-hosted AI company OS — managed PostgreSQL, persistent agent storage, automatic HTTPS, and browser-based setup — with no per-seat licensing and full ownership of your agent team's goals, budgets, and execution history.
Template Content
paperclip-ai
sahilrupani/paperclip-ai