Deploy Ubuntu 24.04 SSH Server + Web Terminal

Ubuntu 24.04 box with SSH access and a browser terminal, persistent home

Deploy Ubuntu 24.04 SSH Server + Web Terminal

Just deployed

/data

Deploy and Host Ubuntu 24.04 SSH Server + Web Terminal on Railway

A Ubuntu 24.04 LTS server you can reach two ways: over SSH through a Railway TCP proxy, or in any browser through a password-protected web terminal. Both use the same login with sudo, a persistent home folder and a tmux session that keeps running after you disconnect.

About Hosting Ubuntu 24.04 SSH Server + Web Terminal

The template builds ubuntu-24.04-ssh/Dockerfile from the open source repo github.com/nerminsabanovic31/railway-web-terminals on top of the official ubuntu:24.04 image. ttyd serves a full shell over Railway's HTTPS domain, protected by HTTP basic auth with USERNAME and a generated PASSWORD that you copy from the service Variables. The shell runs inside tmux, so closing the tab never kills your work, and the home folder lives on a volume at /data, so files survive restarts and redeploys. The template also runs OpenSSH on port 22 behind a Railway TCP proxy, so you can connect with any SSH client, VS Code Remote SSH, scp or rsync using the same login. Root login is disabled, and the SSH host keys are kept on the volume so your client never sees a changed key after a redeploy.

Common Use Cases

  • A Ubuntu 24.04 LTS server you can SSH into, with sudo, in under a minute and without renting a VPS
  • Remote development with VS Code Remote SSH, scp and rsync, plus a browser terminal for phones and tablets
  • Running scripts, bots and long jobs in tmux that keep going after you disconnect

Dependencies for Ubuntu 24.04 SSH Server + Web Terminal Hosting

  • No other services: one container plus a volume
  • Any modern browser; works on phones and tablets too

Implementation Details

Open the Railway domain, sign in with USERNAME and PASSWORD, and you are in a bash shell as a user with passwordless sudo. Preinstalled: git, curl, wget, vim, nano, htop, tmux, Python 3 with pip and a C compiler. Install anything else with:

sudo apt update && sudo apt install -y 

Close the tab at any time; reopen the domain to land back in the same tmux session. 512 MB of memory is plenty for most work.

SSH: open the service, go to Settings, Networking and copy the TCP proxy host and port, then run:

ssh -p  admin@

Use PASSWORD, or paste your public keys into AUTHORIZED_KEYS and set SSH_PASSWORD_LOGIN to no for key-only login. Run tmux attach -t main to join the same session as the browser.

Why Deploy Ubuntu 24.04 SSH Server + 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 24.04 SSH Server + 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.


Template Content

More templates in this category

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

codestorm
51
View Template
Foundry Virtual Tabletop
Self-hosted virtual tabletop for role-playing games (license required)

Lucas
71
View Template
NEW
Double Commander in your browser
The Double Commander file manager in the cloud, from any device

Nermin Sabanovic
0