Deploy Ubuntu Claude Code Desktop (GUI)
Ubuntu desktop in your browser with VS Code, Chrome and Claude Code ready.
Just deployed
/home/kasm-user
proxy
Just deployed
Deploy and Host Ubuntu Claude Code Desktop (GUI) on Railway


Ubuntu Claude Code Desktop (GUI) is a full Ubuntu 24.04 XFCE desktop that runs in your browser with Claude Code, VS Code, Chrome and Node.js already set up. It is the graphical version of the "Ubuntu + Claude Code over SSH" boxes: the same cloud dev machine, but with a real editor, a real browser for OAuth logins and previewing what you build, and no SSH key or VNC client.
About Hosting Ubuntu Claude Code Desktop (GUI)
Deploying runs two services: the desktop itself, and a small Caddy proxy that
is the only public surface. The desktop image is Kasm's Ubuntu Noble workspace
(about 2.6 GB compressed), which already ships VS Code, Chrome, Chromium,
Firefox, git, tmux and Python. On first boot a background job installs Node.js
24 LTS, the Claude Code CLI and the Claude Code VS Code extension into the home
directory, which lives on a Railway volume, so later boots skip the download.
The login page appears within a minute or two; the tools finish installing
shortly after, and ~/.provision.log shows their progress.
Cost is the thing to plan for. A graphical desktop idles near 1 GB of RAM with a session attached, and more with Chrome and VS Code open. Enabling Railway's app sleep is strongly recommended so the desktop suspends when you close the tab.
Common Use Cases
- A persistent Claude Code workstation reachable from a tablet, a Chromebook or a locked-down work laptop
- Letting Claude Code run long agentic tasks on a machine that stays up after you close your laptop
- A disposable, isolated box for trying Claude Code on an untrusted repo, away from your own credentials and files
Dependencies for Ubuntu Claude Code Desktop (GUI) Hosting
- A Railway volume mounted at
/home/kasm-user, which holds the desktop's home directory, the installed tools and Claude Code's login. Without it, everything is lost on redeploy. - A Claude account (Pro, Max, Team or Enterprise) or an Anthropic API key. Sign in from the desktop's terminal with
claudeon first use, or setANTHROPIC_API_KEYat deploy time to skip the browser login. - No GitHub repo backs this template. Both services boot from public images.
Deployment Dependencies
- kasmweb/ubuntu-noble-desktop - the upstream desktop image
- Claude Code - installed with Anthropic's native installer
- Claude Code for VS Code - the editor extension
- Node.js - 24 LTS, installed as a tarball into the home directory
- KasmVNC - the streaming layer
- Caddy - the TLS-terminating proxy
Implementation Details
Signing in. Double-click the Claude Code icon on the desktop, or open a
terminal and run claude. It opens the sign-in page in Chrome inside the
desktop; log in with your Claude account and the CLI is authenticated. The
session is stored under ~/.claude on the volume, so you sign in once. If you set ANTHROPIC_API_KEY instead, the CLI uses it
directly and bills the API; leave it blank to use a Claude subscription. An
empty key is unset at boot so it can never shadow the browser login.
Where the tools live. Node.js is unpacked to ~/.local/node, Claude Code to
~/.local/bin/claude, and the VS Code extension to ~/.vscode/extensions. All
three are on the volume. The boot script links node, npm, npx and claude
into /usr/local/bin so terminals and VS Code find them without any shell
profile, and appends both directories to ~/.bashrc so npm install -g binaries
are found too. Claude Code updates itself in place from then on.
VS Code. The Claude Code extension is installed, and the built-in Copilot
chat is turned off in the seeded settings.json so Claude Code is the only
assistant in the editor. The extension does not run in Restricted Mode, so when
you open a folder for the first time, choose "Trust" in VS Code's workspace
prompt and the Claude Code icon appears in the activity bar.
Why there is a proxy service. Kasm's startup script passes -sslOnly to
vncserver, so the desktop always serves HTTPS on 6901 and the documented
network.ssl.require_ssl: false setting is ignored. Railway speaks plain HTTP
to containers, so Caddy accepts Railway's HTTP and re-encrypts to Kasm,
skipping verification because the certificate is self-signed and regenerated on
every boot. Only the proxy has a public domain.
VNC_PW has a 6-character minimum. KasmVNC's password tool silently
rejects anything shorter, which would leave the desktop unable to start and the
URL serving 502. The template validates the length at boot and fails with an
explicit message instead.
Passwordless sudo is enabled deliberately. Kasm ships kasm-user with a
locked password and no sudo rights, so a stock container cannot apt install
anything. A dev box needs that, so the template grants passwordless sudo at
boot. To lock it back down, remove /etc/sudoers.d/kasm-user inside the desktop.
Security model. VNC_PW is the only thing between the public Railway URL
and a root-capable desktop holding your Claude login. Set a strong one. Anyone
who reaches the URL with it can run anything as you, including Claude Code
against your account.
Why Deploy Ubuntu Claude Code Desktop (GUI) 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 Ubuntu Claude Code Desktop (GUI) 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
VNC_PW
Desktop login password, minimum 6 characters. Username is kasm_user.
proxy
caddy:2-alpine
