Deploy VS Code Dev Box (code-server)
VS Code in your browser: password-protected, Node & Python preinstalled.
Just deployed
/home/coder
Deploy and Host a VS Code Dev Box (code-server) on Railway
Self-host VS Code in your browser with one click. This is a batteries-included cloud dev box built on the official code-server: password-protected by default, with git, build-essential (gcc/make), Python 3 (pip/venv/pipx), and Node.js 22 LTS preinstalled, plus a persistent home directory so your code, extensions, and settings survive redeploys.
About Hosting code-server
Most code-server templates hand you a bare editor: no compilers, no Node, no Python, and a volume that breaks the non-root image on first boot. This template ships a thin, fully commented Dockerfile on top of the official pinned code-server release that fixes all three: it preinstalls a real toolchain, and its entrypoint fixes volume ownership on first boot before dropping privileges back to the non-root coder user. Authentication can't be accidentally disabled — the container refuses to start without a password, which is auto-generated for you. Your entire home directory (/home/coder) lives on a persistent volume: projects, extensions, SSH keys, shell config.
Common Use Cases
- Code from an iPad, Chromebook, or any machine with a browser — full VS Code, real terminal
- A always-ready cloud dev environment that replaces a $5-10/mo VPS
- A safe sandbox for students, workshops, or trying risky dependencies off your laptop
Dependencies for code-server Hosting
- None — single service with a persistent volume
Deployment Dependencies
Implementation Details
- Pinned base image
codercom/code-server:4.129.0— no silent version jumps PASSWORDauto-generated via Railway's secret() — rotate it any time in Variables- Entrypoint refuses to boot without a password; telemetry disabled
- Preinstalled: git, curl, build-essential, Python 3 + pip/venv/pipx, Node.js 22 LTS + corepack
- Healthcheck on
/healthz; volume at/home/coder
Getting started: deploy, open your generated domain, and log in with the PASSWORD from the service's Variables tab. Your first git clone lands on the persistent volume automatically.
Why Deploy a VS Code Dev Box 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 code-server 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.
Template Content
