---
title: "Deploy code-server"
description: "VS Code in the browser with Claude Code and Codex, a password and a volume"
category: "Other"
url: https://railway.com/deploy/code-server-4
---

# Deploy code-server

VS Code in the browser with Claude Code and Codex, a password and a volume

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

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

- **Creator:** Dektion
- **Category:** Other
- **Total deploys:** 1

## Template content

### code-server https://raw.githubusercontent.com/dektionstudio/railway-template-images/73c3a41e2a60d9e97c6eb0056d65676e015d0e60/code-server/icon.png

- **Source:** dektionstudio/railway-template-images
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host code-server on Railway

[code-server](https://github.com/coder/code-server) runs VS Code in your browser: the same editor, extensions and terminal, on a server you can open from any device. This template runs code-server 4.141.0 with Node.js 22 and the Claude Code and Codex CLIs ready in its terminal.

## About Hosting code-server

The editor and its terminal give full control of the container, so the login is set before anything else: `PASSWORD` is generated at deploy, and the start step won't run code-server without it.

The whole home directory (`/home/coder`) is a volume, so extensions, settings, terminal history, CLI logins and your projects survive redeploys. The official image runs as the `coder` user while Railway mounts volumes as root; the start step hands the volume to `coder` before starting the editor, which is what keeps it writable.

Claude Code and Codex are installed in the image. Run `claude` or `codex` in the terminal and sign in with your Claude or ChatGPT account, or set `ANTHROPIC_API_KEY` / `OPENAI_API_KEY` on the service.

Before publishing I tested it on Railway. `/healthz` answered, the editor sent visitors to the login page, `PASSWORD` signed in and the workbench loaded. The start log showed Node.js 22.23.3, Claude Code 2.1.295 and Codex 0.162.0, and a new home directory on the volume. After a restart the log found the same home directory, with the date it was created, and sign-in worked again.

Idle, it used 0.06 to 0.10 GB of RAM, under $1 a month on Railway's usage pricing. Builds and agents use more while they run.

## Common Use Cases

- A full VS Code you can open from a laptop, tablet or a borrowed computer
- Running Claude Code or Codex on a server that keeps working after you close the tab
- A shared editing environment next to your other Railway services, on the private network

## Dependencies for code-server Hosting

Nothing beyond the template. For the coding agents, a Claude or ChatGPT account, or an API key.

### Deployment Dependencies

- code-server: https://github.com/coder/code-server
- Image: `codercom/code-server:4.141.0`
- The wrapper this template builds: https://github.com/dektionstudio/railway-template-images/tree/main/code-server

### Implementation Details

```
CODE_SERVER_URL      # open this and sign in with PASSWORD
/home/coder          # the volume: settings, extensions, logins, projects (/home/coder/project opens first)
```

Packages installed with `sudo apt install` go away on the next redeploy, because only the home directory persists. This is a container, not a VM: there is no Docker or systemd inside.

## Why Deploy code-server on Railway?

You get your editor on HTTPS behind a password, with your files kept on a volume and nothing to install on the devices you use. Railway bills the RAM it uses, which is little while it sits idle.


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