---
title: "Deploy OpenCode for Railway"
description: "Pre-configured OpenCode server template for Railway."
category: "AI/ML"
url: https://railway.com/deploy/opencode-for-railway
---

# Deploy OpenCode for Railway

Pre-configured OpenCode server template for Railway.

**[Deploy OpenCode for Railway on Railway](https://railway.com/template/opencode-for-railway)**

- **Creator:** Joey Chilson's Projects
- **Category:** AI/ML
- **Total deploys:** 51

## Template content

### railway-opencode:latest https://opencode.ai/_build/assets/opencode-desktop-icon-OSkS5hfD.png

- **Image:** ghcr.io/joeychilson/railway-opencode:latest
- **Public domain:** Yes

## Documentation

# Deploy and Host OpenCode for Railway on Railway

  OpenCode for Railway is a pre-configured OpenCode server with built-in skills for Railway
  deployment, browser automation, and tool management via mise. Connect from your local terminal
  with `opencode attach` and get a remote AI coding agent with persistent storage.

```bash
opencode attach https://your-app.railway.app -p your-password
```

  ## About Hosting OpenCode for Railway

  Hosting OpenCode for Railway gives you a remote AI coding agent accessible from anywhere. The
  server comes pre-loaded with Node.js, Python, Bun, Go, and common developer tools managed by
  mise. Pre-installed skills let the agent deploy to Railway, browse the web, and discover new
  capabilities. A persistent volume preserves all sessions, installed tools, and project files
  across redeploys. Authentication is handled via a server password, and you connect using the
  OpenCode TUI from your local machine.

  ## Common Use Cases

  - Run a remote AI coding agent you can connect to from any machine
  - Build and deploy applications to Railway using natural language
  - Automate browser-based tasks like testing, scraping, and form filling

  ## Dependencies for OpenCode for Railway Hosting

  - An LLM provider API key (configured via OpenCode after connecting)
  - OpenCode CLI installed locally (`curl -fsSL https://opencode.ai/install | bash`)

  ### Deployment Dependencies

  - [OpenCode Documentation](https://opencode.ai/docs/)
  - [OpenCode Server Docs](https://opencode.ai/docs/server/)
  - [mise Tool Manager](https://mise.jdx.dev/)
  - [Railway Skills](https://skills.sh/railwayapp/railway-skills/use-railway)

  ## Why Deploy OpenCode for Railway 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 OpenCode for Railway 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/opencode-for-railway
