Self-hosted panel for devices behind NAT: metrics, SSH terminal, SFTP and HTTP tunnels
178
Monitoring, terminal, files and port forwarding for devices that sit behind NAT, on mobile internet, with no public IP and no VPN.
The device itself opens one outbound WSS connection to your server — to an ISP, to CGNAT and to a corporate firewall that is ordinary HTTPS, so nothing has to be forwarded on the router. The panel's reverse access rides that same connection: an SSH terminal, files over SFTP and HTTP tunnels to services on the board.
127.0.0.1:22.https://<device>-<port>.tunnel.example.com, private by
default, or a public random link you can hand out and rotate.Source, documentation and the compose files: https://github.com/sazonovanton/radm
The panel expects a reverse proxy with TLS in front of it. The repository ships a compose file that brings up Traefik alongside it, obtains a wildcard certificate over DNS-01 and declares the routes as labels:
git clone https://github.com/sazonovanton/radm && cd radm
cp deploy/.env.example deploy/.env # RADM_SECRET_KEY, your domains
cp deploy/.env.dns.example deploy/.env.dns # DNS provider token for DNS-01
docker compose -f deploy/docker-compose.yml up -d
Already running a proxy of your own? Comment out COMPOSE_PROFILES in deploy/.env and the same
file brings up the panel alone, on your proxy's network.
To just look at the UI, without TLS and without devices:
docker run --rm -p 8000:8000 \
-e RADM_SECRET_KEY="$(openssl rand -base64 36)" \
-e RADM_ADMIN_USER=admin -e RADM_ADMIN_PASSWORD=changeme \
-e RADM_TRUSTED_PROXIES=0 \
-v radm-data:/data sazonovanton/radm:v1.0
Then open http://localhost:8000. Do not run it this way in production: over plain HTTP the session
cookie loses its Secure flag and travels in the clear.
| Variable | Default | What it is |
|---|---|---|
RADM_SECRET_KEY | dev value | Set it. Signs session cookies and encrypts device SSH keys |
RADM_BASE_DOMAIN | localhost | Address of the panel |
RADM_TUNNEL_DOMAIN | tunnel.localhost | Domain for device tunnels; must differ from the one above, same second-level domain |
RADM_TUNNEL_ROUTING | subdomain | subdomain (wildcard certificate, an origin per tunnel) or path (one host, HTTP-01 is enough) |
RADM_PUBLIC_URL | http://localhost:8000 | The address agents are given by the install script |
RADM_ADMIN_USER / RADM_ADMIN_PASSWORD | admin / empty | An empty password means first-run setup in the UI, guarded by a one-time token from the log |
RADM_TRUSTED_PROXIES | 1 | How many proxies stand in front; the client IP is counted back from the end of X-Forwarded-For |
RADM_METRICS_INTERVAL | 10 | Seconds between metric snapshots |
RADM_LOG_LEVEL | INFO |
State — devices, tokens, encrypted SSH keys, metrics, tunnels, the audit log — is a single SQLite
file in /data; mount a volume there. The panel listens on 8000 and runs with one uvicorn
worker by design: connections live in the memory of that process.
Content type
Image
Digest
sha256:f1672a4a0…
Size
79 MB
Last updated
6 days ago
docker pull sazonovanton/radm