Sign inSign up

sazonovanton/radm

By sazonovanton

•Updated 6 days ago

Self-hosted panel for devices behind NAT: metrics, SSH terminal, SFTP and HTTP tunnels

Image
Monitoring & observability
0

178

sazonovanton/radm repository overview

⁠RADM — an admin panel for devices

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.

  • Terminal — a real SSH client over a tunnelled stream to the device's 127.0.0.1:22.
  • Files — SFTP on that same connection, no home-grown file protocol.
  • Tunnels — a device port published as https://<device>-<port>.tunnel.example.com, private by default, or a public random link you can hand out and rotate.
  • Metrics — CPU per core, memory, disks, network, temperature, Raspberry Pi throttling flags, Rockchip NPU / Mali / Jetson / AMD / NVIDIA utilisation. Downsampled and gap-free: the agent buffers while the link is down.

Source, documentation and the compose files: https://github.com/sazonovanton/radm⁠

⁠Quick start

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.

⁠Configuration

VariableDefaultWhat it is
RADM_SECRET_KEYdev valueSet it. Signs session cookies and encrypts device SSH keys
RADM_BASE_DOMAINlocalhostAddress of the panel
RADM_TUNNEL_DOMAINtunnel.localhostDomain for device tunnels; must differ from the one above, same second-level domain
RADM_TUNNEL_ROUTINGsubdomainsubdomain (wildcard certificate, an origin per tunnel) or path (one host, HTTP-01 is enough)
RADM_PUBLIC_URLhttp://localhost:8000The address agents are given by the install script
RADM_ADMIN_USER / RADM_ADMIN_PASSWORDadmin / emptyAn empty password means first-run setup in the UI, guarded by a one-time token from the log
RADM_TRUSTED_PROXIES1How many proxies stand in front; the client IP is counted back from the end of X-Forwarded-For
RADM_METRICS_INTERVAL10Seconds between metric snapshots
RADM_LOG_LEVELINFO

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.

Tag summary

Content type

Image

Digest

sha256:f1672a4a0…

Size

79 MB

Last updated

6 days ago

docker pull sazonovanton/radm