Deploy Code Server

VS Code in your browser: code-server with a persistent /config volume.

Deploy Code Server

Directus

Just deployed

/config

Deploy and Host Code Server on Railway

code-server runs a full Visual Studio Code in your browser, on your own server, so you can code from any device. This template deploys the well-maintained LinuxServer.io image with password auth and — crucially — a persistent volume, so your projects, settings, and extensions survive redeploys.

About Hosting Code Server

Hosting code-server means running the VS Code server process and exposing its web UI behind a password. The catch on most platforms is persistence: code-server keeps your files, user settings, and installed extensions under its home/config directory, and on an ephemeral filesystem all of that is wiped every time the service restarts or redeploys. This template mounts a volume at /config — where the LinuxServer image stores the workspace, settings, and extensions — so nothing is lost. The image also fixes volume ownership automatically on boot, so there is no permissions dance.

Why Deploy Code Server on Railway?

Railway runs the container, assigns an HTTPS domain, and attaches the volume from this one template, so you get a working cloud IDE in a couple of minutes. Compared with other code-server templates, this one fixes the thing they almost all miss:

  • Your work persists. A /config volume keeps projects, VS Code settings, and extensions across redeploys. Most code-server templates have no volume, so everything you install or write is gone on the next deploy.
  • It is secured by default. A random PASSWORD (and a separate SUDO_PASSWORD for installing packages in the terminal) is generated for you.
  • Pinned, maintained image for reproducible deploys, with a default workspace folder on the volume.

Common Use Cases

  • A cloud dev environment you can reach from any browser, including a tablet
  • A persistent sandbox for a project, repo, or language runtime
  • A shared, always-on editor for quick edits without a local setup

Dependencies for Code Server Hosting

  • A persistent volume for /config (included in this template)
  • A modern browser

Deployment Dependencies

Implementation Details

On first load, open the service's domain and enter the PASSWORD value from the service's Variables tab. Your files live under /config/workspace (the default workspace) on the attached volume. Use SUDO_PASSWORD in the built-in terminal to install system packages. The PROXY_DOMAIN variable is wired to your Railway domain for VS Code port forwarding.


Template Content

More templates in this category

View Template
Rocky Linux
Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
51
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
52