Deploy Ubuntu 24.04 Web Terminal
Ubuntu 24.04 web terminal with persistent storage and generated login.
ubuntu-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
- Deploy the template with the
/datavolume attached. - Open the service's Variables tab and copy the generated
TERMINAL_PASSWORD. - Open your service's Railway HTTPS domain. In the browser's HTTP Basic-auth prompt, use username
ubuntuand that password. - Run
id,pwd, andecho "$HOME"; expect UID 1000 and/data. Save projects and virtual environments there.
Authentication and configuration
TERMINAL_PASSWORDis generated by Railway using${{secret()}}. Empty values and the common defaultpasswordare rejected.TTYD_USERdefaults toubuntuand changes only the HTTP username, not the operating-system user.PORTdefaults to8080; keep any explicit public-domain target port aligned with it.TTYD_INTERNAL_PORTdefaults to7681and must differ fromPORT./,/token, and/wsrequire authentication./healthis 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
- Source repository.
- Ubuntu container image, pinned by digest in the Dockerfile.
- ttyd, with architecture-specific checksum verification.
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
ubuntu-web-terminal
leoisadev1/railway-template-ubuntu-web-terminal