---
title: "Deploy Code Server"
description: "VS Code in your browser: code-server with a persistent /config volume."
category: "Other"
url: https://railway.com/deploy/code-server-4145
---

# Deploy Code Server

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

**[Deploy Code Server on Railway](https://railway.com/template/code-server-4145)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/code-server-4145/manifest.json

- **Creator:** Tasha
- **Category:** Other
- **Total deploys:** 2

## Template content

### code-server

- **Image:** linuxserver/code-server:4.145.2
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host Code Server on Railway

[code-server](https://github.com/coder/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

- [code-server documentation](https://coder.com/docs/code-server/latest)
- [LinuxServer.io code-server image](https://docs.linuxserver.io/images/docker-code-server)

### 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.


## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/code-server-4145
