---
title: "Deploy Ubuntu Web Terminal"
description: "Ubuntu 26.04 shell in your browser and over SSH, with tmux"
category: "Starters"
url: https://railway.com/deploy/deploy-ubuntu-web-terminal-on-railway
---

# Deploy Ubuntu Web Terminal

Ubuntu 26.04 shell in your browser and over SSH, with tmux

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

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

- **Creator:** onepush
- **Category:** Starters

## Template content

### Ubuntu https://github.com/ubuntu.png

- **Image:** ghcr.io/onepush-dev/ubuntu-web-terminal:26.04-ttyd1.7.7
- **Public domain:** Yes

## Documentation

# Deploy and Host self hosted Ubuntu Web Terminal (Browser Terminal &amp; SSH Server) on Railway

Ubuntu Web Terminal is a real Ubuntu 26.04 LTS shell you can open in a browser or reach over SSH, with both landing in one shared tmux session.

## About Hosting Ubuntu Web Terminal open-source software on Railway (self hosted Ubuntu Web Terminal template)

Ubuntu Web Terminal gives you a real Ubuntu 26.04 LTS shell in two ways: a browser terminal served by ttyd 1.7.7, and OpenSSH through a Railway TCP proxy.

## Why Deploy Ubuntu Web Terminal, the GitHub Codespaces / cloud shell alternative on Railway (Railway Free Trial)

Codespaces charges per core-hour and resets to your devcontainer, so it's hard to keep a box that remembers last month's installs.

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.

### Railway vs Other Hosting Providers and VPS for Ubuntu Web Terminal self hosting

A generic VPS leaves you running the OS, firewall, and sshd yourself, while Railway handles the deploy, the persistent /home volume, and the SSH TCP proxy.

| Provider | What You Get with Railway | What You Get with the Other Provider |
| --- | --- | --- |
| DigitalOcean | One click deploy, a generated TERMINAL_PASSWORD, and SSH via TCP proxy with no firewall rules. | A full Droplet with root and systemd, but you own updates and firewall setup. |
| AWS | No VPC or security groups to configure before the first shell opens. | Deep networking control, with much more setup and billing complexity. |
| Hetzner | No server admin, and host keys on the volume keep the SSH fingerprint stable across redeploys. | Cheap VMs with generous bandwidth, but hardening and backups are yours. |

Choose a VPS if you need systemd, Docker-in-Docker, or inbound UDP, since this container has none of those.

## Common Use Cases for hosted Ubuntu Web Terminal

- **Long-running jobs that survive your laptop:** Start a data sync or a build inside the tmux session, close the lid, and check on it from any browser later. The session keeps running on the box, not on your machine.
- **A real shell from an iPad or a locked-down PC:** When you cannot install SSH clients or your work machine blocks them, the browser terminal still gives you a full Ubuntu prompt with sudo.
- **A jump box inside the Railway private network:** Other services in your project can be reached from this box, so it works as a bastion for poking at internal endpoints without exposing them publicly.
- **A scratch Linux box for teaching and demos:** Hand a student or teammate a URL and a password, and they get a clean Ubuntu 26.04 environment to practice commands in. Throw it away when you are done.
- **CLI tools and scripts with a persistent home:** Your dotfiles, shell history, and installed tools under ~/.local stay on the volume at /home, so the setup you build today is still there after the next redeploy.

## Dependencies for Ubuntu Web Terminal Docker hosted on Railway

The box has few moving parts: one container, one volume, one TCP proxy.

### Deployment Dependencies for Managed Ubuntu Web Terminal Service (ttyd + OpenSSH + tmux)

You need a Railway project and nothing else. A volume mounts at /home so files and SSH host keys persist.

Key env vars: PORT=7681, SSH_PORT=2222, TERMINAL_USER=ubuntu, TERMINAL_PASSWORD (generated per deploy), SSH_PASSWORD_AUTH=true, TMUX_SESSION=main, and TZ=UTC.

### Implementation Details for Ubuntu Web Terminal (Ubuntu 26.04.1, ttyd 1.7.7, OpenSSH, tmux 3.6)

The ttyd 1.7.7 binary is verified by SHA-256 at build time. Scp and sftp skip the attach, so automation keeps working.

Host keys (ed25519 and rsa 3072) live under /home/.railway-terminal, so your fingerprint survives redeploys. sshd runs with PermitRootLogin no and AllowUsers limited to TERMINAL_USER.

## How does Ubuntu Web Terminal compare against other cloud shell and remote terminal platforms

### Ubuntu Web Terminal vs GitHub Codespaces (Codespaces Alternative)

- **Where it wins:** Codespaces gives you VS Code, dev containers, and repo integration. Ubuntu Web Terminal is a shell, not an IDE.
- **Persistence:** Codespaces keeps the whole environment. Here only /home survives a redeploy, so apt installs vanish.
- **Cost:** You pay Railway usage only, with no per-seat billing.

### Ubuntu Web Terminal vs Google Cloud Shell (Cloud Shell Alternative)

- **Where it wins:** Cloud Shell is free, starts in seconds, and comes with gcloud logged in. This needs a Railway account and a deploy.
- **Ownership:** Cloud Shell's home directory belongs to your Google account. Here the volume and SSH host keys sit in your own project.
- **Control:** Cloud Shell has no custom sshd. This box runs real OpenSSH on a TCP proxy port you control.

### Ubuntu Web Terminal vs Wetty (Wetty Alternative)

- **Where it wins:** Wetty is small and mature. If you only need a web SSH client for an existing server, it is lighter.
- **Scope:** Wetty proxies to an SSH server you already run. This image ships ttyd, sshd, and tmux together.
- **Auth:** One generated 24-character password covers both ttyd and SSH, and SSH can be switched to key-only.

### Ubuntu Web Terminal vs a plain VPS (VPS Alternative)

- **Where it wins:** A VPS is a real machine with systemd, Docker, inbound UDP, and persistent apt packages. This container has none of that.
- **Setup:** A VPS needs hardening and a web terminal added by hand. This template takes zero inputs at deploy time.
- **Cost:** A VPS bills a flat monthly rate. Railway bills by usage, cheaper for an idle box and less predictable for a busy one.

## How to use Ubuntu Web Terminal (the browser terminal and SSH box)?

1. Deploy the template. You don't fill in any inputs. Railway builds the image and starts the Ubuntu service with a generated 24-character password already set.
2. Open the service, go to Variables, and copy TERMINAL_PASSWORD. It protects both the browser terminal and SSH.
3. Open the public URL, sign in as ubuntu with that password, and you land in a tmux session called main. Anything you start keeps running if you close the tab.
4. For SSH, go to Settings, then Networking, and note the TCP proxy host and port. Then connect from your machine:

```
ssh -p PORT ubuntu@HOST
tmux attach -t main    # optional, SSH logins already attach to main
```

5. Add your public key under SSH_AUTHORIZED_KEYS in Variables, using semicolons between multiple keys. Then set SSH_PASSWORD_AUTH=false so only key logins work.

## How to self host Ubuntu Web Terminal on other VPS Services (Ubuntu Web Terminal self hosting guide)

You can run the same image on any VPS with Docker. These steps assume a fresh Ubuntu server with sudo access.

### Clone the Repository

Pull the source so you can read the Dockerfile and entrypoint first.

```bash
git clone https://github.com/onepush-dev/ubuntu-web-terminal.git
cd ubuntu-web-terminal
```

### Install Dependencies

Docker is the only host requirement, since the image bundles ttyd 1.7.7, OpenSSH, and tmux 3.6.

```bash
sudo apt-get update
sudo apt-get install -y docker.io
sudo systemctl enable --now docker
```

### Configure Environment Variables

Keep the password in an env file so it stays out of your shell history.

```bash
cat &gt; .env &lt;&lt;'EOF'
TERMINAL_PASSWORD=your-long-random-password
PORT=7681
SSH_PORT=2222
TERMINAL_USER=ubuntu
EOF
```

### Start the Ubuntu Web Terminal Application

Mount a named volume on /home so files and SSH host keys survive restarts.

```bash
docker run -d --restart always --name ubuntu-web-terminal \
  --env-file .env \
  -p 7681:7681 -p 2222:2222 \
  -v ubuntu-home:/home \
  ghcr.io/onepush-dev/ubuntu-web-terminal:26.04-ttyd1.7.7
```

Open http://your-domain:7681 and sign in with your password.

## Official Pricing of Ubuntu Web Terminal (Ubuntu Web Terminal pricing)

Ubuntu Web Terminal is free and open source, with no license fee for the software or its bundled parts (ttyd, OpenSSH, tmux).

On Railway, that means usage-based compute plus the volume that holds /home. On your own VPS, you pay that provider's rate for the server.

## Ubuntu Web Terminal cloud vs self hosted comparison (Pricing, features, costs, and more)

Running Ubuntu Web Terminal on Railway or on a VPS you manage uses the same free open source stack, so the real comparison comes down to compute and storage costs and how much upkeep you want.

### Monthly cost of self hosting Ubuntu Web Terminal on Railway

The software costs nothing, and on Railway you pay only for usage: the single Ubuntu service, the persistent volume mounted at /home, and the TCP proxy used for SSH.

### System Requirements for Hosting Ubuntu Web Terminal on a VPS

On a VPS, use an x86_64 Linux host, since the pinned ttyd 1.7.7 binary is a static x86_64 build. You will also need an open TCP port for SSH.

## Frequently Asked Questions (FAQs)

### Does apt survive redeploys?

No, not by default.

### Can I run key-only SSH?

Yes. The browser terminal still uses the generated TERMINAL_PASSWORD, so keep that value somewhere safe.

### Why does SSH go through a TCP proxy?

Railway routes HTTP traffic through its public domain, but raw SSH needs a TCP proxy with a random host and port.

### Do the browser and SSH really share one session?

They do. ttyd starts tmux new-session -A -s main, and interactive SSH logins auto-attach to that same session through /etc/profile.d.

### Is this a full VM with systemd or Docker?

No. Treat it as a persistent shell box rather than a complete virtual machine.

### How do I rotate the password?

Change TERMINAL_PASSWORD in Variables and redeploy.


## Similar templates

- [Openfront Gym](https://railway.com/deploy/openfront-gym) — Opensource Mindbody alternative based on Next.js and Keystone.js
- [open-excalidraw](https://railway.com/deploy/open-excalidraw) — Self-hostable collaborative drawing built on Excalidraw
- [Next.js + Prisma + PostgreSQL Starter](https://railway.com/deploy/nextjs-prisma-postgres) — Deploy a Next.js app with Prisma ORM and PostgreSQL in one click.

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