Railway

Deploy Paperclip Latest Version

Deploy Latest Version of Paperclip in one click.

Deploy Paperclip Latest Version

Paperclip

/paperclip

/var/lib/postgresql/data

Deploy and Host Paperclip Latest Version on Railway

Paperclip is an open-source platform for running AI agent companies—org charts, goals, budgets, and autonomous agent workflows in one place. This template ships a pinned latest upstream release with Postgres, persistent storage, authenticated access, and a one-click setup page to create your first admin invite—no SSH or log scraping required.

About Hosting Paperclip Latest Version

Hosting Paperclip on Railway means running the app service beside managed Postgres, with a volume at /paperclip for instance data and agent state. This template builds a pinned upstream Paperclip release in Docker, then starts a small wrapper that proxies traffic, serves /setup for admin bootstrap, and exposes /setup/healthz for Railway healthchecks. After deploy, open /setup, optionally add provider API keys, generate an admin invite URL, and use the app at /. Public URL, auth secret, and database wiring are prefilled via Railway reference variables; keep port 3100 and the volume mount aligned with the template defaults.

Common Use Cases

  • Self-host an AI agent company OS with authenticated access and persistent agent state
  • Run Claude, Codex, OpenCode, or Gemini local adapters against your own Railway project
  • Bootstrap a private Paperclip instance quickly without CLI onboarding or manual invite plumbing

Dependencies for Paperclip Latest Version Hosting

  • Railway Postgres — auth, app data, and migrations
  • Persistent volume mounted at /paperclip — instance config, uploads, and agent workspace data
  • Optional provider keys for local adapters: OPENAI_API_KEY, ANTHROPIC_API_KEY, GEMINI_API_KEY (or GOOGLE_API_KEY)

Deployment Dependencies

Deploy on Railway

Implementation Details

The image builds upstream Paperclip from a pinned ref (currently v2026.722.0):

ARG PAPERCLIP_REPO=https://github.com/paperclipai/paperclip.git
ARG PAPERCLIP_REF=v2026.722.0

At runtime the wrapper starts Paperclip internally, proxies /, and serves setup/health:

PathPurpose
/setupGenerate the first admin invite URL
/setup/healthzRailway healthcheck
/Paperclip UI after onboarding

Required service defaults:

VariableValue
DATABASE_URL${{Postgres.DATABASE_URL}}
BETTER_AUTH_SECRET${{secret(64, "abcdef0123456789")}} (or ≥32 chars)
HOST0.0.0.0
PORT3100
SERVE_UItrue
PAPERCLIP_HOME/paperclip
PAPERCLIP_DEPLOYMENT_MODEauthenticated
PAPERCLIP_DEPLOYMENT_EXPOSUREprivate
PAPERCLIP_PUBLIC_URLhttps://${{Paperclip.RAILWAY_PUBLIC_DOMAIN}}
BETTER_AUTH_BASE_URLhttps://${{Paperclip.RAILWAY_PUBLIC_DOMAIN}}

Networking: public HTTP on port 3100, healthcheck /setup/healthz, volume at /paperclip.

Why Deploy Paperclip Latest Version 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 Latest Version 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.


Deploy

  1. Click the Deploy button above (or use the template URL). Railway will create a new project from this template.
  2. In the template editor, leave the suggested env vars as-is (see Required variables if you need to edit them).
  3. Ensure the Paperclip service has:
    • HTTP proxy on port 3100
    • Healthcheck path /setup/healthz
    • A volume mounted at /paperclip (for app data)
  4. Deploy. Once the service is live, open your app URL and go to /setup.

What to do after deploy

  1. Open your app’s public URL (e.g. https://your-app.up.railway.app).
  2. Go to /setup.
  3. (Optional) If you want AI agents immediately, complete Step 1 on setup:
    • set OPENAI_API_KEY and/or ANTHROPIC_API_KEY (and/or GEMINI_API_KEY) in Railway variables
    • run Codex login from setup (Claude uses ANTHROPIC_API_KEY directly)
  4. Click “Generate admin invite URL”. The page will show a one-time invite link.
  5. Open that link and complete sign-up. That account is the first admin.
  6. From then on, use the app at /.

You only need the setup page once to bootstrap the first admin. Don’t share /setup publicly if you don’t want others generating invite links.

Required variables

Set these on the Paperclip service in Railway (template editor or service Variables). The template may prefill some; adjust if your setup differs.

VariableWhat to setWhy
DATABASE_URL${{Postgres.DATABASE_URL}}Links Paperclip to the Postgres service.
BETTER_AUTH_SECRETe.g. ${{secret(64, "abcdef0123456789")}} or a long random stringAuth cookies/sessions. Must be at least 32 characters.
HOST0.0.0.0Bind so Railway’s proxy can reach the app.
PORT3100Must match the proxy.
SERVE_UItrueServe the web UI.
PAPERCLIP_HOME/paperclipData directory; must match the volume mount.
PAPERCLIP_DEPLOYMENT_MODEauthenticatedRequire login (recommended).
PAPERCLIP_DEPLOYMENT_EXPOSUREprivatePrivate deployment (recommended).
PAPERCLIP_PUBLIC_URLhttps://${{Paperclip.RAILWAY_PUBLIC_DOMAIN}}Public URL (no trailing slash).
BETTER_AUTH_BASE_URLhttps://${{Paperclip.RAILWAY_PUBLIC_DOMAIN}}Auth callbacks.

Optional (for AI agents):

  • OPENAI_API_KEY — Codex adapter / startup Codex login
  • ANTHROPIC_API_KEY — Claude adapter
  • GEMINI_API_KEY (or GOOGLE_API_KEY) — Gemini adapter (gemini_local); Google requires keys restricted to the Gemini API

Updating the upstream Paperclip version

GITHUB_TOKEN=... node scripts/bump-paperclip-ref.mjs

Then rebuild and redeploy. To pin a different release without forking, set build-time PAPERCLIP_REF (Railway service variable or docker build --build-arg) to a tag from paperclipai/paperclip, then trigger a new build.

docker build --build-arg PAPERCLIP_REF=v2026.722.0 -t paperclip-railway-template .

Local test (developers)

From the repo root, after building the image:

docker network create paperclip_net
docker run --rm -d --name paperclip_pg --network paperclip_net \
  -e POSTGRES_USER=postgres -e POSTGRES_PASSWORD=postgres -e POSTGRES_DB=paperclip \
  postgres:16
# Wait a few seconds for Postgres to be ready, then:
docker run --rm -d --name paperclip_app --network paperclip_net -p 3100:3100 \
  -e DATABASE_URL=postgresql://postgres:postgres@paperclip_pg:5432/paperclip \
  -e HOST=0.0.0.0 -e PORT=3100 -e SERVE_UI=true \
  -e PAPERCLIP_HOME=/paperclip \
  -e PAPERCLIP_DEPLOYMENT_MODE=authenticated -e PAPERCLIP_DEPLOYMENT_EXPOSURE=private \
  -e PAPERCLIP_PUBLIC_URL=http://localhost:3100 -e BETTER_AUTH_BASE_URL=http://localhost:3100 \
  -e BETTER_AUTH_SECRET=local-dev-secret-32chars-min \
  -v paperclip_local_data:/paperclip \
  paperclip-railway-template

Open http://localhost:3100/setup and use “Generate admin invite URL” to test. Stop with:

docker stop paperclip_app paperclip_pg

Support


Template Content

More templates in this category

View Template
Chat Chat
Chat Chat, your own unified chat and search to AI platform.

okisdev
113
View Template
stella
Self-host stella with web, API, Postgres, Redis, and object storage.

Jan Kubica
1
View Template
Hermes Agent | OpenClaw Alternative with Dashboard
Self-Hosted Hermes AI Agent for Telegram, Discord & Slack

codestorm
56