- Makefile 65.1%
- Dockerfile 20.5%
- Shell 14.4%
| Dateiname | Letzte Commit-Nachricht | Letztes Commit-Datum |
|---|---|---|
| rootfs/etc | ||
| .env.example | ||
| .gitignore | ||
| debian-ttyd.container | ||
| Dockerfile | ||
| entrypoint.sh | ||
| Makefile | ||
| Readme.md | ||
| sshd-wetty-localhost.conf | ||
| wetty.container | ||
Docker-Debian: Web Terminals
Two browser terminals for a small host, both rootless Podman Quadlet units (Podman >= 4.4, e.g. Debian 13):
- Sandbox (
debian-ttyd, port 7681): a throwaway Debian shell via ttyd. Every session gets a fresh container: ttyd exits when the last client disconnects (--exit-no-conn), Podman removes the container, systemd starts a new one. Only/data(volumedata) persists;/data/binis onPATH. - Admin terminal (
wetty, port 3000): a persistent WeTTY that logs into the real host over SSH.
Everything goes through the Makefile; make lists all targets.
Sandbox
make env # create .env, then set at least PASSWORD
make run # optional: local test on http://localhost:7681
make install-sandbox # build image, enable lingering, install + start unit
| Variable (.env) | Default | Description |
|---|---|---|
USERNAME |
user |
Login user created on container start |
PASSWORD |
Passw0rd |
Password for that user — change it! |
SUDO_OK |
false |
true grants passwordless sudo |
AUTOLOGIN |
false |
true skips the login prompt (login -f) |
TZ |
Europe/Berlin |
Container timezone |
The repo can live anywhere: make install-* renders the unit with the
actual repo path (for .env) into ~/.config/containers/systemd/.
Host too slow to build (e.g. Raspberry Pi)? On a faster machine run
make save-arm64 (or save-armv7 / save-amd64; cross-building needs
qemu-user-static), copy the .tar.gz into the repo on the host and run
make load-arm64 there — it imports the image and installs the unit.
WeTTY: admin access to the real host
The wettyoss/wetty image connects out to the host's own sshd. It runs
with host networking, so that connection always comes from 127.0.0.1.
sshd-wetty-localhost.conf allows password auth
only for that source; every real network connection stays key-based.
make sshd-dropin # needs 'PasswordAuthentication no' (Debian default)
make install-wetty WETTY_ORIGINS=https://term.example.com
WETTY_USER: fixed host account to log into. Default: empty, WeTTY asks for the username in the terminal.http(s)://<host>/ssh/<user>preselects one per URL either way.WETTY_ORIGINS: the URL(s) you open in the browser, comma-separated, without path (default:http://<hostname>:3000). WeTTY refuses to start without it and rejects WebSocket connections from any other origin. Behind a reverse proxy that's the proxy's URL, and the proxy must pass the originalHostheader through (Caddy does by default).
Open http://<host>:3000 and log in with a host account's Unix password
(asked on every connection, nothing is stored). Check that direct SSH still
needs a key: sudo sshd -T | grep -i passwordauthentication must print no.
Operations
make status # both services
make logs-sandbox # or logs-wetty
make remove-sandbox # or remove-wetty
podman volume rm data # wipe the sandbox's persistent data
Troubleshooting:
- Unit not found after install: Quadlet needs Podman >= 4.4. Debug with
/usr/lib/systemd/user-generators/podman-user-generator --user --dryrun. journalctl --user -u ...shows nothing: no persistent journal (common on Raspberry Pi OS).make logs-*uses a form that works anyway.
Security notes
- ttyd/WeTTY serve plain HTTP/WS. Put a TLS reverse proxy (Caddy, nginx, Traefik) with WebSocket support in front of ports 7681 and 3000.
SUDO_OK=truegives root inside the sandbox; treat it as untrusted then.- WeTTY shares the host network. It can't reach more than any host process, but isn't network-isolated like the sandbox.
Credits
Sandbox based on https://github.com/colinmurphy1/docker-ttyd