---
title: "Deploy Ubuntu Desktop"
description: "Ubuntu desktop in your browser with Claude Code, Codex, Chrome and VS Code"
category: "Other"
url: https://railway.com/deploy/ubuntu-desktop-1
---

# Deploy Ubuntu Desktop

Ubuntu desktop in your browser with Claude Code, Codex, Chrome and VS Code

**[Deploy Ubuntu Desktop on Railway](https://railway.com/template/ubuntu-desktop-1)**

Machine-readable deploy manifest (JSON, validated by TemplateCI): https://railway.com/deploy/ubuntu-desktop-1/manifest.json

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

## Template content

### Ubuntu Desktop https://devicons.railway.com/i/ubuntu.svg

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

## Documentation

# Deploy and Host Ubuntu Desktop on Railway

A full Ubuntu desktop (XFCE) that runs on Railway and streams to your browser, set up for development: Claude Code, Codex, Node.js 22, git, Google Chrome and VS Code are installed. It's built on [linuxserver's webtop](https://github.com/linuxserver/docker-webtop) image, which streams the desktop with Selkies over WebSockets, so it works through Railway's normal HTTPS domain.

## About Hosting Ubuntu Desktop

A desktop in the browser is a whole computer behind one URL, so the login comes first. `PASSWORD` is generated at deploy, and the start step refuses to run without `CUSTOM_USER` and a password of 12 or more characters. Railway's healthcheck uses a separate route that needs no login and follows the stream server, so a desktop whose stream is down doesn't look healthy.

Two changes keep it workable in a container. The upstream image reserves a 15360x8640 virtual screen, which holds hundreds of MB of RAM for the framebuffer alone; this template caps it at 4K, and the desktop still resizes to your browser window. Chrome and VS Code start with `--no-sandbox`, because their sandbox needs kernel features containers don't get; Chrome shows a warning bar about it.

The home directory (`/config`) is a volume, so your files, browser profile, VS Code settings and CLI logins survive redeploys. Run `claude` or `codex` in a terminal (Ctrl+Alt+T) and open the sign-in link it gives you in Chrome on the desktop. An API key works too: set `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` on the service.

Before publishing I tested it on Railway. The health route answered, the desktop page returned 401 without the login and loaded with it, and the stream's WebSocket opened with the login. In Chromium I opened the desktop, started a terminal with Ctrl+Alt+T, wrote the versions of Claude Code (2.1.302), Codex (0.163.0) and Chrome (155) to a file, and launched Chrome, which loaded a page inside the desktop. After a restart, in a new container, that file was still in the home directory. I didn't sign in to Claude or ChatGPT in the test.

With Chrome open it used 0.73 GB of RAM, about $7 a month on Railway's usage pricing. That leaves little room on the trial's 1 GB; the Hobby plan is the comfortable one if you run builds and a browser together.

## Common Use Cases

- A cloud dev machine with a real browser, for running Claude Code or Codex and checking the web app they build
- A Linux desktop you can open from a Chromebook, a tablet or a work laptop where you can't install anything
- Trying Linux tools and GUI apps without setting up a VM

## Dependencies for Ubuntu Desktop Hosting

Nothing beyond the template. A Claude or ChatGPT account, or an API key, for the coding agents.

### Deployment Dependencies

- webtop: https://github.com/linuxserver/docker-webtop
- Image: `lscr.io/linuxserver/webtop:ubuntu-xfce-36e96c40-ls6`
- Selkies (the streaming): https://github.com/selkies-project/selkies
- The wrapper this template builds: https://github.com/dektionstudio/railway-template-images/tree/main/ubuntu-desktop

### Implementation Details

```
DESKTOP_URL            # open this; sign in with CUSTOM_USER and PASSWORD
/config                # the volume: the desktop user's home (files, Chrome profile, VS Code, CLI logins)
~/projects             # a folder for your code
```

Packages installed with `apt` go away on the next redeploy, because only the home directory persists. There's no GPU, so the stream is encoded on the CPU; it's fine for coding and browsing, not for video or games. This is a container, not a VM: no Docker or systemd inside.

## Why Deploy Ubuntu Desktop on Railway?

You get a Linux desktop with a browser and your coding agents on HTTPS behind a login, reachable from any device, with nothing to install where you sit. Railway bills the RAM it uses rather than a fixed VM size.


## 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/ubuntu-desktop-1
