Deploy AI Coding Box: Ubuntu + SSH + Claude Code, Codex, Gemini
Ubuntu SSH box with Claude Code, Codex and Gemini CLI preinstalled
AI Coding Box
Just deployed
/data
Deploy and Host AI Coding Box: Ubuntu + SSH + Claude Code, Codex, Gemini on Railway
An always-on Ubuntu 24.04 LTS box for AI coding agents. Claude Code, OpenAI Codex CLI and Gemini CLI are preinstalled. Connect over SSH from your own terminal or VS Code, or open the browser terminal from any device, and let agents keep working in tmux after you close your laptop. Your home folder, repos and agent logins live on a volume.
About Hosting AI Coding Box: Ubuntu + SSH + Claude Code, Codex, Gemini
The template builds ubuntu-24.04-ai/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
- Running Claude Code, Codex or Gemini on long tasks in tmux while your own computer is off
- A separate sandbox for coding agents, away from your personal machine and files
- Coding with an agent from a phone, tablet or Chromebook through the browser terminal
Dependencies for AI Coding Box: Ubuntu + SSH + Claude Code, Codex, Gemini 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: Claude Code, OpenAI Codex CLI, Gemini CLI, Node.js 24 with npm, git, curl, vim, 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. 1 GB of memory is a good start for coding agents.
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.
Coding agents: run claude, codex or gemini and sign in with your own Anthropic, OpenAI or Google account or API key. Credentials stay in your home folder on the volume. Update them any time with sudo npm update -g.
Why Deploy AI Coding Box: Ubuntu + SSH + Claude Code, Codex, Gemini 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 AI Coding Box: Ubuntu + SSH + Claude Code, Codex, Gemini 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
AI Coding Box
nerminsabanovic31/railway-web-terminals