Deploy Ubuntu 24.04 Web Terminal

Ubuntu 24.04 web terminal with persistent storage and generated login.

Deploy Ubuntu 24.04 Web Terminal

Just deployed

/data

Deploy and Host Ubuntu 24.04 Web Terminal on Railway

An Ubuntu 24.04 LTS shell in your browser, with ttyd 1.7.7, a generated password, and persistent files under /data. This is a trusted single-user workspace, not a multi-tenant sandbox.

About Hosting Ubuntu 24.04 Web Terminal

nginx forwards HTTP and WebSocket traffic to a loopback-only ttyd process. The shell runs as ubuntu (UID 1000), with its home and initial working directory set to /data. The container initializes volume permissions before dropping shell privileges. No SSH daemon or public TCP port 22 is included.

First login

  1. Deploy the template with the /data volume attached.
  2. Open the service's Variables tab and copy the generated TERMINAL_PASSWORD.
  3. Open your service's Railway HTTPS domain. In the browser's HTTP Basic-auth prompt, use username ubuntu and that password.
  4. Run id, pwd, and echo "$HOME"; expect UID 1000 and /data. Save projects and virtual environments there.

Authentication and configuration

  • TERMINAL_PASSWORD is generated by Railway using ${{secret()}}. Empty values and the common default password are rejected.
  • TTYD_USER defaults to ubuntu and changes only the HTTP username, not the operating-system user.
  • PORT defaults to 8080; keep any explicit public-domain target port aligned with it. TTYD_INTERNAL_PORT defaults to 7681 and must differ from PORT.
  • /, /token, and /ws require authentication. /health is unauthenticated and checks that ttyd answers its authentication challenge; it is not an interactive-shell acceptance test.
  • Anyone who can use this shell can access workspace data. The password is omitted from the shell environment, but ttyd receives authentication material as a process argument. Do not share this service with untrusted users.

Storage and upgrades

The /data volume holds your home, shell configuration, git trees, and Python virtual environments. Existing root-owned workspace files are migrated to ubuntu ownership without following symlinks; large homes can take longer to initialize. Files outside the volume are ephemeral. The unprivileged browser shell cannot install system packages with apt-get; add packages to the Dockerfile and rebuild. Python 3, pip, venv, git, curl, and CA certificates are included.

Back up important files and verify readback after restart/redeploy. A volume is not a backup. If upgrading a deployment whose old ttyd logs included credentials, rotate TERMINAL_PASSWORD after installing the logging fix.

Common Use Cases

  • A personal browser shell for diagnostics and small scripts.
  • Persistent Python virtual environments and git working trees.
  • A Linux workspace without a public SSH service.

Dependencies for Ubuntu 24.04 Web Terminal Hosting

One Railway service, a /data volume, a public HTTPS domain, and the generated login password.

Deployment Dependencies

Why Deploy Ubuntu 24.04 Web Terminal on Railway?

Railway provides the container, HTTPS routing, environment variables, and persistent volume. You remain responsible for password access, backups, resource usage, and reviewing image updates.

Verification limits

Browser authentication, terminal commands, ubuntu identity, file persistence across restart/redeploy, and health failure when ttyd stopped responding were exercised on Railway amd64. Mobile checks used a 390×844 server-side Chromium viewport, not a physical phone or a separate laptop. Arm64 runtime was not tested.


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