---
title: "Deploy Paperclip - AI Agent Company"
description: "Open-source control plane for AI agents. Includes managed Postgres"
category: "AI/ML"
url: https://railway.com/deploy/paperclip-ai-agent-company
---

# Deploy Paperclip - AI Agent Company

Open-source control plane for AI agents. Includes managed Postgres

**[Deploy Paperclip - AI Agent Company on Railway](https://railway.com/template/paperclip-ai-agent-company)**

- **Creator:** alphasec
- **Category:** AI/ML
- **Total deploys:** 9

## Template content

### Postgres https://devicons.railway.app/i/postgresql.svg

- **Image:** ghcr.io/railwayapp-templates/postgres-ssl:18

### paperclip

- **Source:** alphasecio/paperclip
- **Public domain:** Yes

## Documentation

# 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 requires 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 addon 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. A custom entrypoint writes the full server configuration from environment variables on first boot — no setup page, no manual config editing, no log scraping. The bootstrap admin invite URL is generated automatically and appears in the service logs.

## 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](https://companies.sh) with a single command
- Self-hosting Paperclip with production-grade external PostgreSQL and persistent storage

## Dependencies for Paperclip Hosting

- Railway Postgres addon — pre-wired via `DATABASE_URL`
- 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](https://github.com/paperclipai/paperclip) — open-source AI agent orchestration platform (MIT licence)
- [Paperclip documentation](https://docs.paperclip.ing) — official docs for agent setup, adapters, and API reference
- [alphasecio/paperclip](https://github.com/alphasecio/paperclip) — source repository for this template
- [Deployment guide](https://alphasec.io/stop-hiring-start-orchestrating-running-an-ai-agent-company-with-paperclip-on-railway/) — step-by-step walkthrough with agent setup instructions

### Implementation Details

A custom `entrypoint.sh` runs at container start. It writes `config.json` from environment variables before starting the server — setting the database provider, deployment mode, public URL, and allowed hostnames automatically. This eliminates the manual setup page required by other Paperclip templates.

After deploy, the bootstrap admin invite URL appears in Railway service logs. Search logs for `invite` to find it. Set `PAPERCLIP_AUTH_DISABLE_SIGN_UP=true` in Railway Variables after creating your admin account.

**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 (e.g. `gemini-2.5-flash`). The `gemini_local` adapter requires interactive OAuth and will not 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.

## Similar templates

- [Chat Chat](https://railway.com/deploy/-WWW5r) — Chat Chat, your own unified chat and search to AI platform.
- [stella](https://railway.com/deploy/stella) — Self-host stella with web, API, Postgres, Redis, and object storage.
- [Hermes Agent | OpenClaw Alternative with Dashboard](https://railway.com/deploy/hermes-agent-or-openclaw-alternative-wit) — Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

Open this page in a browser: https://railway.com/deploy/paperclip-ai-agent-company
