OpenCode on Railway

Open-source AI coding agent with a browser UI and password login, running always-on on Railway.

Official site · License: MIT · 21 Railway templates

Deploy OpenCode on RailwayCompare templates

OpenCode is an open-source AI coding agent. It plans work, edits files and runs commands in a project, with the model provider of your choice. It is usually run in a terminal, and it also has a server mode with a web UI.

Running it as a server on Railway gives you an always-on coding agent you can check from any browser or phone: hand it a refactor or bug hunt, review the diffs and approve commands. It is comparable to other terminal coding agents such as Claude Code, with the difference that it is not tied to one model provider.

OpenCode is MIT licensed.

What OpenCode can do

  • Agent that plans, edits files and runs commands
  • Browser UI served by opencode serve
  • Works with many model providers
  • git, GitHub CLI, Node.js, Python 3 and uv available to the agent
  • Projects and sessions kept on a volume
  • Optional repository clone on start

What people use it for

  • Handing a refactor or bug hunt to the agent and checking progress from any browser
  • Reviewing diffs and approving commands from a phone
  • A shared coding sandbox next to your other Railway services
  • Trying several model providers with one setup

Videos

OpenCode Tutorial for Beginners: Setup, Agents, Skills & MCP · Leon van Zyl
OpenCode Tutorial for Beginners: Learn 90% Of OpenCode in Under 25 Minutes · Brandon Melville
WTF Is OpenCode? · Anthony Sistilli

Running OpenCode on Railway

The template runs OpenCode 1.19.3 as a server behind Caddy. The container refuses to start without a generated password. A volume at /data keeps projects, sessions, provider logins, git config and SSH keys. You can set a model key such as ANTHROPIC_API_KEY, log in through the web UI, or use OpenCode's free models when offered. Cost is the CPU and memory of the one service; model usage is billed by the provider.

OpenCode templates on Railway

OpenCode v1 AI Coding Agent in the BrowserMaintained by Tracklayer
OpenCode is an open-source AI coding agent that plans, edits files and runs commands. This template runs OpenCode 1.19.3 as an always-on server with its browser UI, password login,
10 deployments
Deploy
OpenCode by an independent creator
always-on autonomous AI coding agent.
110 deployments
Deploy
OpenCode WebUI Workspace | (Just Updated) AI Coding Agent in Browser, 1GB+ RAM by an independent creator
OpenCode AI coding agent in your browser: Python, Node, Go, Rust. 1GB+ RAM
71 deployments
Deploy
OpenCode by an independent creator
Persistent, password-protected OpenCode 2 server with a web UI and API.
66 deployments
Deploy
OpenCode CLI + Web App by an independent creator
OpenCode web UI + SSH TUI in one box. Free models, no API key needed.
66 deployments
Deploy
OpenCode by an independent creator
AI coding agent that writes and runs code in your project
44 deployments
Deploy
Opencode Server v2 by an independent creator
Opencode fully featured server for AI Agents. Web, Server, and CLI mode.
37 deployments
Deploy
OpenCode by an independent creator
OpenCode AI Pro Stack: Open Code WebUI, terminal, Git and persistent files.
36 deployments
Deploy
OpenCode by an independent creator
Open-source AI coding agent in your browser. Free models, SSH, saved home.
21 deployments
Deploy
OpenCode by an independent creator
Open-source AI coding agent in your browser, persistent workspace
20 deployments
Deploy
OpenCode Wizard by an independent creator
opencode on Railway — persistent AI coding server with first-run web wizard
20 deployments
Deploy
OpenCode by an independent creator
OpenCode, the open-source AI coding agent, in your browser with a password
16 deployments
Deploy
OpenCode 2 CLI + Web App by an independent creator
OpenCode 2 from day one: web app, your own TUI, or SSH. Free models.
6 deployments
Deploy
OpenCode by an independent creator
Open-source AI coding agent in your browser, password-protected.
4 deployments
Deploy
opencode-manager by an independent creator
Deploy and Host OpenCode Manager on Railway
4 deployments
Deploy
OpenCode 2 (web + phone) by an independent creator
Always-on OpenCode 2 for your browser and phone, with git and GitHub ready.
2 deployments
Deploy
9Router OpenCode by an independent creator
Point OpenCode CLI at your self-hosted AI router
1 deployments
Deploy
OmniRoute OpenCode by an independent creator
Route the OpenCode agent through your own OmniRoute gateway
1 deployments
Deploy
opencode-telegram-bot by an independent creator
Telegram client for OpenCode coding tasks
1 deployments
Deploy
OpenCode by an independent creator
OpenCode AI coding agent with web UI, password login and persistent storage
0 deployments
Deploy
OpenCode | (Just Updated) AI Coding Agent Server for AI Agents, Password Generated by an independent creator
OpenCode coding agent API + web UI; generated login, free model, no key
0 deployments
Deploy

Tracklayer templates are listed first. Other OpenCode templates follow, ordered by total deployments on Railway. How this works.

Deployment numbers as of 2026-11-20.

Questions about OpenCode

How do I log in?

Copy OPENCODE_SERVER_PASSWORD from the service Variables tab, open the public URL and sign in as user opencode (or your OPENCODE_SERVER_USERNAME).

Do I need a model provider?

Optional. Add a key variable, log in through the web UI, or use OpenCode's free models when offered. The free lineup is set by OpenCode and changes. Provider usage is billed separately.

What persists across redeploys?

Everything under /data. Packages installed with sudo apt are lost, and a redeploy stops a running agent turn.

Is it safe to leave running?

The agent can run shell commands and spend your model credits, and its user has passwordless sudo, which AGENT_SUDO=false removes. Keep the password private and review the permission settings first.

How do I upgrade?

Within OpenCode 1.x, change PIN_OPENCODE and its SHA-256 values in the service Dockerfile and redeploy. OpenCode 2 is not part of this template.

Guides

Similar apps

Tracklayer maintains the templates marked as such; OpenCode is a trademark of its owners and this site is not affiliated with them.