Gluetun (VPN)
Show a Gluetun VPN tunnel, where traffic leaves it, its forwarded port and the containers behind it.
The VPN widget shows whether the tunnel holds, the city and country where traffic leaves it, the public address, the exit network and the port the VPN provider forwards. It lists the containers that go through Gluetun and warns when some of them lost their network. Administrators can restart the tunnel after a confirmation.
Open Gluetun's control server
Gluetun answers on its control server, port 8000 inside the container. Publish it and give NasDash an API key whose role only reads what the widget needs:
[[roles]]
name = "nasdash"
routes = ["GET /v1/vpn/status", "GET /v1/publicip/ip", "GET /v1/portforward"]
auth = "apikey"
apikey = "REPLACE_WITH_A_LONG_RANDOM_KEY"services:
gluetun:
image: qmcgaw/gluetun
ports:
- 8000:8000
volumes:
- ./gluetun-auth.toml:/gluetun/auth/config.toml:roThe read-only role leaves out GET /v1/vpn/settings, which returns private keys and passwords and is never requested by NasDash. To allow administrators to restart the tunnel, optionally add PUT /v1/vpn/status to the role. Without it, readings still work.
Connect it
- Open Settings → Integrations → VPN tunnel → Gluetun.
- Enter the control server address, for example
http://nas.example.com:8000. - Choose API key and paste the key (or Username and password, or None if your control server has no authentication).
- Save and test the connection.
NasDash 0.3.6 supports several saved Gluetun connections. Give each a distinct name in Settings → Integrations and select the connection in each VPN widget’s settings. Adding a connection creates a separate entry; editing an existing entry updates that connection.
Services behind the tunnel
When NasDash has a Docker host (Settings → Integrations → Docker), the widget lists the containers that share Gluetun's network (network_mode: service:gluetun), a stopped one struck through. Only viewers who may read containers see the list.
Recreating the Gluetun container leaves those containers without network until they are recreated too. The widget names them in a warning. Recreate them with Gluetun:
docker compose up -d --force-recreate gluetun qbittorrentRestart
The restart button stops and starts the VPN connection, which may then use another server. Gluetun forgets the exit address when the tunnel stops and looks it up once when it is up again; if that lookup fails, the widget shows the tunnel as connected with the address still unknown. Gluetun already reconnects by itself when its health check fails, so the button is mainly for troubleshooting.
Display and access
The public address, the forwarded port and the list of services can each be hidden in the widget settings. Viewers need the VPN permission (Settings → Users and access). The address and the key never leave the NasDash server. The public demo shows a fictional tunnel.