---
title: "Deploy Linux Terminal | Ubuntu Web Shell + tmux"
description: "Ubuntu 24.04 Linux shell in the browser. tmux, persistent."
category: "Other"
url: https://railway.com/deploy/ubuntu-terminal
---

# Deploy Linux Terminal | Ubuntu Web Shell + tmux

Ubuntu 24.04 Linux shell in the browser. tmux, persistent.

**[Deploy Linux Terminal | Ubuntu Web Shell + tmux on Railway](https://railway.com/template/ubuntu-terminal)**

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

- **Creator:** Two Workspaces
- **Category:** Other
- **Total deploys:** 244

## Template content

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

- **Image:** ghcr.io/two-workspaces/terminal:23da3fc
- **Health check:** /healthcheck
- **Public domain:** Yes

## Documentation

# Deploy and Host a Linux Terminal (Ubuntu Web Shell + SSH + tmux) on Railway

[![Deploy on Railway](https://railway.com/button.svg)](https://railway.com/new/template/ubuntu-terminal?referralCode=sLjDXb&utm_medium=integration&utm_source=button&utm_campaign=ubuntu-terminal)

This template gives you an always-on Ubuntu 24.04 shell. Open your Railway domain for a terminal in the browser, or reach it from your own terminal with `railway ssh`. Both can share the same `tmux` session, so a job you start from your laptop is still running when you reconnect from your phone. Your home directory lives on a volume, so repos, GitHub auth and dotfiles survive every redeploy.

## About Hosting an Ubuntu Terminal

One service, one volume. The image ships `git`, `gh`, Python 3 + `uv`, `tmux`, `ripgrep`, `jq`, `vim`, build tools. A `ttyd` web terminal (basic-auth gated) drops you into a `tmux` session named `main`, so you can start a long job from your laptop and pick it up from your phone.

## Common Use Cases

- A shell that keeps running: start a long script, close the tab, come back later
- Code from an iPad, Chromebook or phone: the browser terminal needs no SSH client
- A disposable root box with a stable IP for scripts, scraping, cron-style jobs or CI debugging
- Keep a persistent workspace for side projects that is reachable from anywhere

## Dependencies for Ubuntu Terminal Hosting

- None. Single service, no database.

### Deployment Dependencies

- [ttyd](https://github.com/tsl0922/ttyd) web terminal
- [GitHub CLI](https://cli.github.com/)

### Implementation Details

**First use:** open your Railway domain, log in with `WEB_USER` and the generated `WEB_PASSWORD` (service Variables tab). You are in a `tmux` session named `main`; close the tab, reopen it, and everything is still there.

**From your own terminal:** install the [Railway CLI](https://docs.railway.com/guides/cli), run `railway link` in any folder and pick this project, then `railway ssh`. Run `tmux attach -t main` there to join the browser's session. The box runs no SSH server of its own: Railway's rules don't allow one, and `railway ssh` needs no open port or password.

**Handy commands inside the box:**

- `tmux new -s work` opens a second session; `tmux ls` and `tmux attach -t work` get back to it
- `gh auth login` or set `GH_TOKEN` to push to GitHub
- `apt install ‹pkg›` works (you are root); anything outside `/root` is gone after a redeploy

Notes and limits:

- You are root. Anything you install outside `/root` disappears on redeploy; anything under `/root` stays.
- 512 MB of RAM is enough for a shell; size up for builds.
- On Free and Trial plans Railway allows 1 GB of disk outside `/root`, and `apt-get update && apt-get install nodejs npm` alone writes 600 MB there. A deploy that goes over can be stopped by Railway, so put big tools under `/root` (Node via `nvm`, Python packages in a venv) or size up to Hobby.
- There is no Docker daemon inside the box.
- The web terminal password is the whole security model for a root shell. Keep it strong and do not share the URL.
- Want Claude Code preinstalled? The same author publishes a [Claude Code dev box](https://railway.com/deploy/claude-code?referralCode=sLjDXb) template.

## Why Deploy an Ubuntu 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 an Ubuntu 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) — Self-hosted virtual tabletop for role-playing games (license required)
- [Double Commander in your browser](https://railway.com/deploy/double-commander-in-your-browser) — The Double Commander file manager in the cloud, from any device

Open this page in a browser: https://railway.com/deploy/ubuntu-terminal
