Kali Linux Web Terminal (Browser Shell)
A Kali Linux (kali-rolling) shell served in the browser through ttyd, running in tmux so sessions survive closed tabs. It deploys one service with a generated password and a persistent home volume, for security training and authorized testing without a local VM.
What you get
- Kali rolling image pinned by digest, with nmap, sqlmap, ffuf, gobuster, feroxbuster, nuclei, hydra, john, netexec, impacket and searchsploit
- ttyd behind an nginx basic-auth proxy; user kali with sudo and a generated PASSWORD
- tmux session named main that resumes when you reopen the URL
- A Railway volume at /home for files, shell history and user-level tools
- KALI_EXTRA_PACKAGES variable to bake more Kali packages (for example metasploit-framework) into the image
Good for
- Security training, CTFs and lab platforms from any browser
- Recon and web testing of systems you own or are authorized to test
- Long-running scans kept alive in tmux
- Learning Kali's command-line tools without installing a VM
Cost
Measured on Railway: about 0.15 GB of RAM idle with an open tmux session and 0.17 GB during an nmap -sV scan. Extra packages enlarge the image, and heavy tools such as Metasploit need more RAM than the shell alone.
Services in this template
- Terminal · from
baranberkay96/kali-terminal-railway
Questions people ask
How do I log in?
Open the service's public URL. Your browser asks for a user name and password: the user is kali (the USERNAME variable) and the password is the generated PASSWORD value on the Variables tab. If PASSWORD is empty, short (under 12 characters) or overlong, the login is locked and the deploy log explains the fix.
What persists across redeploys?
Everything under /home/kali: files, notes, shell history, virtualenvs, pipx apps and Go tools. Running processes and packages installed with sudo apt install reset on each redeploy; use KALI_EXTRA_PACKAGES for packages that must stay.
Are there limits on scanning?
Yes. Railway containers have no raw-socket access, so SYN scans, UDP scans, OS detection, masscan and packet capture do not work. nmap is set up for TCP connect scans, including service and script detection.
Is any use allowed?
No. Use the tools only against systems you own or have written permission to test. Railway's Fair Use Policy and Terms apply, and scanning third-party networks from Railway can get your account suspended.
Can a team share it?
It is a single-user machine on one volume, so keep one replica and deploy one terminal per person.
Full template README
Deploy and Host Kali Linux Web Terminal with Railway
A Kali Linux (kali-rolling) shell you open in any browser, with the command-line tools people reach for first: nmap, sqlmap, ffuf, gobuster, feroxbuster, nuclei, hydra, john, netexec, impacket and searchsploit. The shell runs in tmux, so sessions and long scans survive closed tabs. A generated password protects it, and your home directory sits on a persistent volume. Need Metasploit or the full Kali tool set? Name it in one variable and Railway bakes it into the image.
About Hosting Kali Linux Web Terminal
A web terminal needs a long-running Linux container, a terminal server, real authentication in front of it, TLS, and storage that outlives rebuilds. This community template builds on the official kalilinux/kali-rolling image (pinned by digest) and serves the shell with ttyd. nginx stands in front of ttyd and checks a password that Railway generates at deploy, so the login never shows up in logs. You work as the user kali with sudo, and /home is a Railway volume. Railway's edge provides HTTPS.
Common Use Cases
- Security training, CTFs and HackTheBox / TryHackMe style labs from any browser, including Chromebooks and managed work laptops
- Recon and web testing of systems you own or are authorized to test, from a cloud IP instead of your home connection
- Running long scans and brute-force jobs in tmux and checking back on them later
- Learning Kali's command-line tools without installing a VM
Dependencies for Kali Linux Web Terminal Hosting
- A Railway volume mounted at
/home(included in the template) - Nothing else: no database, no API keys, no external accounts
Deployment Dependencies
- Kali Linux documentation: https://www.kali.org/docs/
- Kali Docker images: https://www.kali.org/docs/containers/official-kalilinux-docker-images/
- Kali tool metapackages: https://www.kali.org/docs/general-use/metapackages/
- ttyd (web terminal, MIT): https://github.com/tsl0922/ttyd
- tmux: https://github.com/tmux/tmux/wiki
- Railway build variables: https://docs.railway.com/builds/dockerfiles#using-variables-at-build-time
- Railway Fair Use Policy: https://railway.com/legal/fair-use
Implementation Details
| Service | Source | Purpose |
|---|---|---|
| Terminal | Dockerfile based on kalilinux/kali-rolling |
nginx basic-auth proxy on port 8080 (public HTTPS domain, /healthz), ttyd on loopback, tmux sessions, user kali with sudo, volume at /home |
Plan: light enough for any plan. Measured on Railway: about 0.15 GB of RAM idle with an open tmux session, 0.17 GB during an nmap -sV scan. The default image installs about 1.8 GB of packages. KALI_EXTRA_PACKAGES makes it larger (Metasploit adds about 1.9 GB, kali-linux-headless about 4 GB), and heavy tools such as Metasploit need more RAM than the shell alone.
First login
- Open the service's public URL.
- Your browser asks for a user name and password. The user name is
kali(theUSERNAMEvariable). The password is the generatedPASSWORDvalue on the service's Variables tab. - You land in a tmux session named
main. Close the tab at any time and reopen the URL to resume. For a second, independent session, openhttps://{your-domain}/?arg=work. sudo -igives you a root shell.
Tools included
| Area | Tools |
|---|---|
| Recon | nmap, dnsrecon, subfinder, httpx (httpx-toolkit), theHarvester, whois, dig |
| Web | sqlmap, ffuf, gobuster, feroxbuster, dirb, whatweb, wfuzz, nuclei, sslscan |
| Passwords | hydra, john, /usr/share/wordlists (rockyou and others) |
| Windows / AD | netexec, impacket scripts, smbclient, enum4linux-ng |
| Reference | searchsploit (exploitdb) |
| Everyday | git, curl, wget, python3, pip, pipx, build-essential, vim, nano, tmux, htop, jq, socat |
More tools: set the KALI_EXTRA_PACKAGES variable to a space-separated list of Kali packages, for example metasploit-framework or kali-linux-headless (Kali's full command-line set). Railway passes the variable to the Docker build, so the next deploy builds an image with those packages and they survive every redeploy. Names apt cannot install are skipped with a warning in the build and deploy logs, so a typo never fails the deploy. Larger sets make the image bigger and the build slower. Packages you install with sudo apt install in the shell work right away but reset on the next redeploy.
What persists: everything under /home/kali: files, loot, notes, shell history, Python virtualenvs and pipx apps in ~/.local, Go tools in ~/go/bin. Running processes and packages installed with apt reset on every redeploy or restart. tmux keeps sessions alive across browser reconnects, not across container restarts.
Authorized use only
Kali's tools can scan, brute-force and exploit systems. Use them only against systems you own or have written permission to test. Railway's Fair Use Policy and Terms of Service apply to everything that runs in this shell, and scanning or attacking third-party networks from Railway can get your account suspended. Railway containers have no raw-socket access (CAP_NET_RAW), so SYN scans (-sS), UDP scans, OS detection (-O), masscan and packet capture do not work. nmap is set up for TCP connect scans, which work for every user and under sudo, including service and script detection (nmap -sV -sC). ping works with sudo.
Security: the shell is never served without a password. With an empty, short (under 12 characters) or overlong PASSWORD the service still starts, but the login is locked with a random password nobody knows and the deploy log says how to fix it. Invalid PORT, USERNAME or TERMINAL_FONT_SIZE values fall back to the defaults with a warning in the log. nginx checks the password, which the container keeps only as a SHA-512 crypt hash, and rate-limits attempts. It also rejects WebSocket connections from other sites. ttyd listens on 127.0.0.1 only. The password does not appear in logs, process arguments or the shell environment. To change it, edit PASSWORD and redeploy. Browsers cache basic-auth logins until you close them, so use a private window on shared computers.
Scaling: this is a single-user machine on one volume, so keep one replica. Railway scales RAM and CPU vertically up to your plan limit. For a team, deploy one terminal per person.
Pinning and upgrades: the Kali base image is pinned by digest on the FROM line of services/terminal/Dockerfile. Every fresh build runs apt-get full-upgrade, which brings the rolling release up to date. Railway may reuse cached build layers, so change the digest to force a fresh one.
Why Deploy Kali Linux Web Terminal on Railway?
Railway gives the terminal an HTTPS URL, a persistent volume and automatic restarts, with no server to administer. You get a protected Kali shell from one click and pay only for the CPU and memory it uses. This is a community template, not affiliated with OffSec, the Kali Linux project, the ttyd author or Railway. Kali Linux is a trademark of OffSec Services Limited.
Guides for this template
View Kali Linux Web Terminal (Browser Shell) on railway.com
Similar templates
| Template | Category | DeploymentsDeploys |
|---|---|---|
| Chatwoot A customer communication platform | Other | 5,871 |
| Ubuntu-Linux Ubuntu terminal accessible via web browser | Other | 4,926 |
| Ubuntu SSH + Claude ARA TM —SSH server with root access + Claude Code pre-installed. | Other | 4,682 |
| Debian-Linux Debian terminal accessible via web browser. | Other | 2,883 |
| Code Server VS Code in the browser | Other | 2,787 |
| Kali Linux (Web Terminal) Instant Kali Linux browser terminal powered by ttyd | Other | 2,632 |