---
title: "Deploy Ubuntu Web Terminal"
description: "Ubuntu 24.04 terminal in your browser: persistent home volume, no setup"
category: "Other"
url: https://railway.com/deploy/ubuntu-web-terminal
---

# Deploy Ubuntu Web Terminal

Ubuntu 24.04 terminal in your browser: persistent home volume, no setup

**[Deploy Ubuntu Web Terminal on Railway](https://railway.com/template/ubuntu-web-terminal)**

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

- **Creator:** Will
- **Category:** Other

## Template content

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

- **Image:** ghcr.io/will-bogusz/railway-ubuntu-ssh:24.04-20260920b@sha256:ebaafc81557b7294a2b13d08986173efacab19d3004c2ac40074753dbcf6136c
- **Health check:** /healthz
- **Public domain:** Yes

## Documentation

# Deploy and Host an Ubuntu Web Terminal on Railway

A full Ubuntu 24.04 LTS shell in your browser: open the service's URL on a laptop, phone or locked-down machine, enter the generated password, and you are at a `bash` prompt inside `tmux` on an always-on Linux box. Your home directory lives on a **volume**, so files, dotfiles and installed tools survive every redeploy — unlike most terminal templates, which lose everything when the container restarts. One click, **no inputs**: the password is generated for you. Node.js 24 LTS, Python 3, git, the GitHub CLI, build-essential, tmux, Claude Code and the usual tools are preinstalled; user `dev` has passwordless `sudo`.

**Plan requirements.** Idle, the box uses about **20 MB** of RAM (measured on this image after five idle minutes; 28 MB peak at boot), well inside Railway's Free and Trial limits. What you run inside it is what costs: a Node build or a Claude Code session adds a few hundred MB while it runs. Hobby is the comfortable fit for daily use. The image is pinned by digest, so what you deploy today is what you get on every redeploy.

## About Hosting an Ubuntu Web Terminal

The service runs two small processes: `ttyd` (a terminal over WebSocket) on loopback and `nginx` on the public HTTPS domain with basic auth in front of it. The healthcheck `/healthz` is open and only passes once the terminal actually answers, so Railway routes traffic to a new deployment only when it is ready. The shell attaches to a `tmux` session named `main`, so closing the tab does not kill what you were running — reopen the URL and you are back where you left off. `/home/dev` is a Railway volume: projects, dotfiles, `~/.local`, `~/.npm-global` and Claude Code's login all persist. The image is built from a public Dockerfile and pinned by digest.

## Common Use Cases

- A Linux shell from a phone, tablet, Chromebook or a work laptop that cannot run one
- A place to leave a long job, an agent session or a download running while you close the lid
- Learning Linux or trying tools without touching your own machine
- A cheap always-on box for scripts, cron jobs and small services you reach over the private network
- SSH on top when you want it: set `DEVBOX_SSH=on`, add a TCP proxy for port 22, and the same password works from any SSH client

## Dependencies for Ubuntu Web Terminal Hosting

- `ghcr.io/will-bogusz/railway-ubuntu-ssh:24.04-20260920b` (Ubuntu 24.04, pinned by digest) on a `/home/dev` volume

### Deployment Dependencies

- [Image source and Dockerfile](https://github.com/will-bogusz/railway-ubuntu-ssh) (MIT)
- [ttyd](https://github.com/tsl0922/ttyd) - the terminal server
- [Railway volumes](https://docs.railway.com/volumes)

### Implementation Details

**First run.** Open the service's public domain. The browser asks for a username and password: `dev` and the value of `PASSWORD` in the service's Variables tab. You land in `tmux`; `Ctrl-b d` detaches, reopening the page reattaches. Change `PASSWORD` and redeploy to rotate it.

**Persistence.** Everything under `/home/dev` survives redeploys and restarts (verified: a marker file written before a redeploy was present after it). `apt` packages live in the container layer and are gone after a redeploy; put the install command in a script on the volume if you rely on them, or install into `~/.local` (`pipx`, `uv`, `cargo`, `npm -g` all go there by default here).

**Tools and agents.** `claude` is preinstalled (Claude Code 2.1.278; sign in with a subscription when prompted, or set `ANTHROPIC_API_KEY`). `npm install -g @openai/codex` or `npm install -g opencode-ai` install into `~/.npm-global` on the volume. `GITHUB_TOKEN`, when set, is used by `git` over HTTPS and by `gh` without a login prompt. Every variable you add in the Variables tab is exported in the shell after the next deploy.

**Adding SSH.** Set `DEVBOX_SSH=on`, then under Settings -> Networking add a TCP proxy for port 22 and redeploy. Log in as `dev` with the same password (`ssh dev@HOST -p PORT`, values printed in the deploy log), or put public keys in `AUTHORIZED_KEYS`. Failed logins are throttled per source address.

**Resource use.** The terminal itself is tiny; the number to watch is whatever you run in it. Railway meters RAM and CPU actually used, so an idle box costs cents.

**Risks.** Anyone with the password has a shell with `sudo`; keep the generated 24-character password or use a longer one. Do not run anything that Railway's fair-use policy prohibits. Pinned images receive security fixes when you redeploy onto a newer tag, not automatically.

### Why Deploy Ubuntu Web Terminal 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 Web Terminal 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.


## 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-web-terminal
