Deploy Ubuntu Desktop (Browser)

Ubuntu 24.04 XFCE desktop in your browser via KasmVNC, with Firefox

Deploy Ubuntu Desktop (Browser)

Deploy and Host an Ubuntu Desktop in the Browser on Railway

A complete Ubuntu 24.04 LTS desktop (XFCE) that runs in your browser tab — no VNC client, no plugin. Open the service's URL, enter the generated password, and you get a real Linux desktop with Firefox, a terminal, a file manager and a text editor, streamed by KasmVNC over HTTPS. Your home directory is on a volume, so bookmarks, downloads, settings and files survive redeploys. One click, no inputs: the password is generated for you. Resize the browser window and the desktop follows.

Plan requirements. With the desktop showing and nothing open, the service uses about 195 MB of RAM (measured on this image after five idle minutes; 200 MB peak at boot). Firefox with a few tabs adds roughly 400–700 MB, so plan for 1–1.5 GB in use. That is over the Free and Trial memory limits; Hobby (8 GB) is the plan for this template. Only the CPU and RAM you actually use are billed — a desktop that sits idle costs a few dollars a month. The image is pinned by digest.

About Hosting an Ubuntu Desktop

The service runs Xvnc (KasmVNC's X server, which also serves its own web client) on loopback, an XFCE session as user dev, and nginx on the public HTTPS domain adding basic auth in front of everything. KasmVNC streams the screen as video-rate WebP/JPEG over a WebSocket, so it feels far closer to a remote desktop than classic VNC-in-a-browser. The healthcheck /healthz passes only once Xvnc is serving. /home/dev is a Railway volume. There is no GPU and no audio; this is a work desktop, not a media box.

Common Use Cases

  • A browser you can leave signed in and reach from anywhere, on an IP that is not your own
  • A Linux GUI for a tool that has no web version, from a phone, tablet or Chromebook
  • A disposable desktop for testing sites, downloading and inspecting files, or running a GUI installer
  • A shared "team machine" with a fixed set of tools, reachable from any device with a browser
  • Learning Linux with a real desktop rather than a shell

Dependencies for Ubuntu Desktop Hosting

  • ghcr.io/will-bogusz/railway-ubuntu-desktop:24.04-20260920 (Ubuntu 24.04 + XFCE + KasmVNC 1.5.0 + Firefox, pinned by digest) on a /home/dev volume

Deployment Dependencies

Implementation Details

First run. Open the service's public domain and enter dev and the value of PASSWORD from the Variables tab. The KasmVNC client connects and the XFCE desktop appears. Firefox, Terminal, Files and a text editor are in the bottom dock; the Applications menu is top-left. Change PASSWORD and redeploy to rotate it.

Display. RESOLUTION (default 1440x900) sets the desktop size; the client scales it to your window. Raise it for a sharper image on a large monitor, lower it on slow connections. The gear icon in the client's side panel has quality and scaling settings; Fullscreen hides the browser chrome.

Persistence. Everything under /home/dev survives redeploys and restarts (verified). Firefox's profile, XFCE settings, downloads and anything you save in your home directory persist. apt packages do not — the container layer is replaced on redeploy.

Clipboard and keys. The client's side panel has a clipboard box for copying text in and out, and an on-screen bar for Ctrl/Alt/Esc combinations that the browser would otherwise capture.

Resource use. Idle is cheap; Firefox is what costs. Close tabs you are not using, or set Firefox to unload background tabs. If the service is killed for memory, it restarts automatically and your files are intact.

Risks. Anyone with the password has a desktop with sudo; keep the generated password or set a longer one. Browsing from a hosted IP is subject to Railway's fair-use policy. No GPU: video playback and WebGL are CPU-rendered and slow. Pinned images receive security fixes when you redeploy onto a newer tag, not automatically.

Why Deploy Ubuntu Desktop 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 Desktop 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

More templates in this category

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

codestorm
47
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
51