Deploy Paperclip Kimi

Hire Kimi coding agents into your Paperclip company

Deploy Paperclip Kimi

Just deployed

/paperclip

/var/lib/postgresql/data

Deploy and Host self hosted Paperclip Kimi (Self-Hosted Kimi Coding Agents) on Railway

This template runs a self-hosted Paperclip control plane on Railway and hires Moonshot Kimi coding agents into it through the kimi_local adapter.

About Hosting Paperclip Kimi open-source software on Railway (self hosted Kimi coding agents in Paperclip via kimi_local template)

Your data stays in your own Railway project.

Railway handles Postgres provisioning, DATABASE_URL wiring, the public domain, and migrations on boot. You still own the Kimi model key and the generated secrets.

Why Deploy Paperclip Kimi, the CrewAI alternative on Railway (Railway Free Trial)

CrewAI is a Python framework you embed in your own code, so you build the agent logic yourself.

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 Kimi 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.

Railway vs Other Hosting Providers and VPS for Paperclip Kimi self hosting

Paperclip Kimi needs a Node server, Postgres, and steady Kimi CLI processes, so the host shapes how much you manage. Here is how Railway compares.

ProviderWhat You Get with RailwayWhat You Get with the Other Provider
DigitalOceanGit-linked deploys, managed Postgres, and a persistent volume at /paperclip with no server to patch.A Droplet you control, but you handle OS updates, Docker, and the reverse proxy yourself.
AWSOne project for the app and database, with no VPC or IAM setup before the first heartbeat.Wide service choice, but EC2, RDS, and security groups to configure before Kimi agents can run.
HetznerVolume and public domain included, so you skip hand-building the stack.Low cost per core for a box you run, which pays off if you enjoy the sysadmin side.

Railway trades some raw price and low-level control for less setup.

Common Use Cases for hosted Paperclip Kimi

  • Scheduled issue triage: Point a Kimi agent at a repo with cwd set to an absolute path and a routine. It wakes on its heartbeat to triage open issues and push fixes for simple ones, and sits idle between runs.
  • Separate agents per team: Pin each team's agent to its own working directory, such as /paperclip/workspaces/payments and /paperclip/workspaces/web, so one team's session context never leaks into another's.
  • High-effort refactors: For hard refactors, set engine to cli and effort to high. The default ACP lane ignores effort, so the CLI pin is the only way to get effort control.
  • Per-agent spend caps: Set a budget on each agent so spend is tracked and the agent pauses automatically at the cap, which stops one runaway agent from draining your model account overnight.
  • Approval gates before merge: Route agent changes through an approval gate so a human reviews the diff before it lands, with rollback if a change turns out wrong.

Dependencies for Paperclip Kimi Docker hosted on Railway

You need two Railway services, one Kimi CLI install, and generated secrets you should never regenerate.

Deployment Dependencies for Managed Paperclip Kimi Service (AI Agent Orchestration)

The paperclip service listens on port 3100, with the health check at /api/health and a volume at /paperclip (set as PAPERCLIP_HOME). Run one replica.

Three 64-character hex secrets are generated at deploy: BETTER_AUTH_SECRET, PAPERCLIP_AGENT_JWT_SECRET, and PAPERCLIP_SECRETS_MASTER_KEY.

Implementation Details for Paperclip Kimi (Using Paperclip official docker image)

The template runs the upstream Paperclip image. Fixed values include HOST=0.0.0.0, PORT=3100, and SERVE_UI=true.

The kimi binary from @moonshot-ai/kimi-code must be on the PATH of the process running the adapter.

How does Paperclip Kimi compare against other ways to run Kimi coding agents in an agent control plane

Paperclip Kimi vs CrewAI (CrewAI Alternative)

  • Scope: Paperclip is a control plane for a company of agents, with org charts, tasks, and budgets. CrewAI is a Python framework for scripting crews inside your own code.
  • Kimi wiring: The kimi_local adapter runs the Kimi Code CLI as a managed agent, so you configure it in the UI instead of writing glue code.
  • Where CrewAI wins: If you want a lightweight library embedded in one app, it is less machinery to run.

Paperclip Kimi vs AutoGen (AutoGen Alternative)

  • Purpose: AutoGen targets multi-agent conversations you build into an application. Paperclip manages long-running coding agents on real working directories.
  • Governance: Paperclip adds approval gates and rollback on agent output, which you would design yourself on AutoGen.
  • Where AutoGen wins: For research prototypes built around conversation patterns, its programming model gives more direct control.

Paperclip Kimi vs Devin (Devin Alternative)

  • Hosting: Devin is a commercial service in Cognition's sandbox. Paperclip Kimi runs on your own server, with the Kimi CLI and your repos on your disk.
  • Control: You bring your own Kimi credentials, cap spend per agent, and review changes behind approval gates.
  • Where Devin wins: It needs no server, no Postgres, and no adapter setup, so it is faster if you just want a ticket taken.

Paperclip Kimi vs OpenHands (OpenHands Alternative)

  • Shape: OpenHands is an open-source agent platform with its own web UI and CLI. Paperclip sits one layer up as the company-level control plane.
  • Multi-agent structure: Paperclip gives you org charts and per-agent budgets across many agents, where OpenHands focuses on one coding agent.
  • Where OpenHands wins: For one agent in one sandbox with minimal setup, it is the simpler starting point.

How to use Paperclip Kimi (the OSS AI agent orchestration platform)?

Get one Kimi agent running end to end before adding more.

  1. Install with npm install -g @moonshot-ai/kimi-code and confirm kimi is on the PATH of the adapter process.
  2. Authenticate with kimi login, set KIMI_MODEL_NAME and KIMI_MODEL_API_KEY on the paperclip service, or add a [providers.NAME] block to config.toml.
  3. Create an agent with adapter type kimi_local and an absolute cwd such as /paperclip/workspaces/app.
  4. Set model to kimi-code/kimi-for-coding, and set engine to cli if you need effort control.
  5. Click Test Environment to check kimi --version, the working directory, auth, and the hello probe.
  6. Assign work or set a schedule so the agent wakes on its heartbeat.
{
  "adapterType": "kimi_local",
  "cwd": "/paperclip/workspaces/app",
  "model": "kimi-code/kimi-for-coding",
  "engine": "cli",
  "effort": "high"
}

How to self host Paperclip Kimi on other VPS Services (Paperclip self hosting guide)

Running Paperclip on your own VPS works if you're comfortable with Node and Postgres. The kimi_local adapter needs the Kimi CLI on the same machine.

Clone the Repository

git clone https://github.com/paperclipai/paperclip.git
cd paperclip

Install Dependencies

Paperclip uses pnpm.

pnpm install
npm install -g @moonshot-ai/kimi-code
kimi --version

Configure Environment Variables

Set the database URL, the three generated secrets, and the Kimi credentials.

export DATABASE_URL=postgres://user:pass@your-domain:5432/paperclip
export BETTER_AUTH_SECRET=$(openssl rand -hex 32)
export PAPERCLIP_AGENT_JWT_SECRET=$(openssl rand -hex 32)
export PAPERCLIP_SECRETS_MASTER_KEY=$(openssl rand -hex 32)
export KIMI_MODEL_NAME=kimi-code/kimi-for-coding
export KIMI_MODEL_API_KEY=your-kimi-api-key

Start the Paperclip Kimi Application

Start the server, open the UI, and run Test Environment on your agent before assigning work. Migrations run on boot.

pnpm dev

Railway handles Postgres, TLS, the public domain, and process supervision, which you'd otherwise set up yourself on a plain VPS.

Official Pricing of Paperclip Kimi (Paperclip pricing)

Paperclip is MIT licensed, so the software itself is free and open source.

Paperclip Kimi cloud vs self hosted comparison (Pricing, features, costs, and more)

Paperclip is MIT licensed and free to self host, so your real costs are Railway hosting and the model usage behind your Kimi agents.

Monthly cost of self hosting Paperclip Kimi on Railway

You pay Railway for the paperclip service and the Postgres 18 service, and you pay your model provider for Kimi usage.

System Requirements for Hosting Paperclip Kimi on a VPS

Moving to a VPS means running a Node.js server, a React UI, and an external Postgres database.

Frequently Asked Questions (FAQs)

Do I need kimi login, or can I use environment variables?

Either works. Env variables are simpler on a headless container.

Why is effort ignored on the default lane?

The adapter forwards effort only on the CLI lane, as KIMI_MODEL_THINKING_EFFORT. It only applies to models that support it, currently kimi-code/k3.

Where does the session persist between heartbeats?

The adapter stores the session id from the session.resume_hint event and resumes it with -r SESSION_ID on the next wake.

What happens if the working directory changes?

The adapter starts a fresh Kimi session instead of resuming the old one.

How do I skip installing control-plane skills?

Pass --no-install-skills to paperclipai agent local-cli AGENT_REF -C COMPANY_ID, which otherwise installs into ~/.kimi-code/skills.

What does Test Environment check?

It checks kimi --version, that the working directory is usable, that auth is available, and runs a hello probe. Fix any failure before assigning work.


Template Content

More templates in this category

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

okisdev
117
View Template
NEW
Weaviate
Vector database with hybrid search and an API key-protected API

zer0person
1
View Template
Möbius v0.1 Personal AI OS
Self-hosted AI agent that builds and runs apps for you, with memory.

bento
1