This is the companion repo for "I Built a Remote Coding Agent Platform on Railway (OpenCode, Claude Code, Codex) " (a video I created in partnership with Railway).
It is a full-stack demo that provisions AI agents into sandbox sessions running on Railway. (inspired by Ramp's internal agent "Inspect")
- Run opencode locally
- Run opencode inside a container
- Deploy to Railway
- Add code-server to container image
- Use the Railway API to deploy
- Create a custom API for the control plane
- Add a frontend (+ add proxy)
- Install other coding agents
- Configure GitHub access and pre-clone the repo
packages/api: Express + TypeScript API, Railway integration, session management, and proxying.packages/web: React + Vite frontend.packages/sandbox: Sandbox container image used by session environments.docker-compose.yml: Local API + Postgres + sandbox containers for development.
- Mise
- Docker + Docker Compose
-
Start local infra:
docker compose up -d
-
Configure API environment variables:
cp packages/api/.env.example packages/api/.env
-
Install dependencies:
pnpm install --dir packages/api pnpm install --dir packages/web
-
Run API and web app in separate terminals:
pnpm --dir packages/api dev pnpm --dir packages/web dev
The API runs on http://localhost:3000 and the web app runs on http://localhost:5173.
pnpm --dir packages/api db:generate
pnpm --dir packages/api db:migrate
pnpm --dir packages/api build
pnpm --dir packages/api startpnpm --dir packages/web build
pnpm --dir packages/web preview