Gluetun connects to your VPN provider, such as Mullvad or Proton VPN, and lets you send chosen apps' internet traffic through it. If the VPN drops, those apps lose the internet rather than carrying on without it.
On this page
- At a glance
- What it's good for
- Before you install: have your VPN account ready
- Sending an app through it
- What changes for a routed app
- Checking it's working
- Good to know
- Addresses and ports
- Settings
- In its config file
- Tools
- Works with
- Privacy and security
- What leaves this server
- What LibrePortal turns off
- Sources
- Under the hood
At a glance#
- What it is
- VPN Container Router Networking
- Where it opens
- No web page It works in the background
- Updates
- Automatic A backup is taken first, and it rolls back if the update fails
- Backups
- Included Part of the daily backup when that's switched on
- Copies
- One per server
What it's good for#
Some apps talk to the wider internet on your behalf: a front end that fetches YouTube or Reddit for you, a podcast or music app pulling in feeds. Routed through Gluetun, those requests leave from your VPN provider's address rather than your home's, so the sites they talk to see the VPN and your internet provider sees only encrypted traffic to it.
Gluetun is a VPN client for your apps. It isn't a way to reach your server from outside; that's the LibrePortal VPN. And it's not for your phone or laptop: devices keep using your normal connection, and only the apps you pick go through Gluetun.
It has a kill switch built in. If the connection to your provider drops, apps routed through it can't reach the internet at all until it's back, so nothing leaks out from your home address by accident.
Before you install: have your VPN account ready#
You need an account with a VPN provider Gluetun supports (it knows dozens). Out of the box it's set up for Mullvad over WireGuard. Fill in these settings on the Config tab:
- VPN Provider and VPN Protocol: your provider, and WireGuard or OpenVPN. WireGuard is faster where your provider offers it.
- For WireGuard, WireGuard Private Key and WireGuard Address. Your provider gives you both when you create a WireGuard configuration in your account on their website.
- For OpenVPN, OpenVPN Username and OpenVPN Password. These are often special VPN credentials, not the ones you sign in to the provider's website with.
- VPN Countries (optional): pick countries from the list for your provider, or leave it empty for any.
Until those are right, Gluetun can't connect, and it keeps restarting while it tries. Its Logs tab says what it's unhappy about.
The provider list
The country picker comes from Gluetun's own list of servers, which LibrePortal fetches once a day. If a country or provider seems to be missing, run Refresh VPN Providers on the Tools tab.
Sending an app through it#
Once Gluetun is installed, apps it's suited to get a Network Mode setting on their Config tab, with a choice of Default network or Through Gluetun (VPN). Switch it, save, and the app is reinstalled on Gluetun's connection.
You can also do several at once with the Route Apps button on Gluetun's Config tab, which lists your installed apps with a tick box each. Each change re-runs that app's install.
Out of the box, only media apps get the choice (the likes of Invidious, Redlib and SoundCloak), because apps that fetch things from the internet for you are where a VPN makes sense. To offer it for every app, switch on Gluetun For All Apps in LibrePortal's SSH & Access Hardening settings (shown in Advanced mode).
To check: the Route Apps list reads frontend/data/apps/gluetun-eligible-categories.json, which isn't in the repo, so it shows no apps unless Gluetun For All Apps is on; the Network Mode setting itself uses its own list (media, downloads, torrent, usenet, arr)
What changes for a routed app#
A routed app shares Gluetun's connection completely, which has a few consequences worth knowing before you switch one over:
- Its domain address stops working. Traefik can't reach an app inside Gluetun, so the app is only reachable on its own port at your server's address, like
http://192.168.1.50:8123. LibrePortal moves the app's ports onto Gluetun for you, so the port number stays the same. - If Gluetun is down, so is the app's internet, and while Gluetun is stopped you can't reach the app at all.
- Restarting or updating Gluetun briefly restarts every routed app too. LibrePortal reattaches them afterwards, because an app left pointing at the old Gluetun would quietly lose its connection.
- Some sites block VPN addresses, so an app that fetches from one of them might start failing. Try another country, or take that app off the VPN.
Checking it's working#
Gluetun checks its own connection all the time, by reaching the sites in Health Check Sites and pinging the addresses in Health Check IPs. The defaults are Mullvad, the Electronic Frontier Foundation and Quad9's DNS, all privacy-minded. If those checks fail, Gluetun reconnects on its own. Its Logs tab shows which server it's connected to and the public address it's using.
Good to know#
- The HTTP Server port is Gluetun's own control interface, kept to trusted places. You don't need it for anything; LibrePortal doesn't set up the login Gluetun asks for, so it answers nothing useful.
- Your VPN key and password are kept in Gluetun's settings on the server, like any other app setting. Anyone with your VPN key can use your VPN account, so treat it like a password.
- Updates are automatic, with a backup taken first, and every routed app blinks while Gluetun restarts.
- One per server. Routed apps attach to Gluetun by name, so a second copy would leave them not knowing which to use.
Addresses and ports#
Gluetun has 2 ports. LibrePortal picks a free port number for each when you install, so yours will differ from anyone else's. The Config tab's Network section shows them, and the app's Open button uses the right one.
| What it is | Who can reach it | With a domain |
|---|---|---|
| HTTP Server TCP | Trusted places only | Port only |
| Metrics Exporter (sidecar, docker-network only) TCP | Off until you turn it on | Port only |
Settings#
These are Gluetun's own settings on its Config tab. The settings every app shares, like backups, updates and where its data lives, are explained in App pages and settings.
| Setting | What it does | Starts as |
|---|---|---|
| VPN Provider | VPN provider to route traffic through | mullvad |
| VPN Protocol | VPN protocol supported by the selected provider | wireguard |
| VPN Countries | Comma-separated countries to allow | Empty |
| OpenVPN Username | OpenVPN account username | Empty |
| WireGuard Address | WireGuard interface address | Empty |
| Health Check Sites | Sites Gluetun checks to confirm the VPN is working. Comma-separated host:port. | mullvad.net:443,eff.org:443 |
| Health Check IPs | IPs Gluetun pings to confirm the VPN is working. Comma-separated. | 9.9.9.9 |
In its config file#
A few more aren't on the Config tab yet. They live in the app's config file, described here so you know they exist. How to change them.
| Setting | What it does | Starts as |
|---|---|---|
NameCFG_GLUETUN_DISPLAY_NAME |
What this app is called on your dashboards. Leave empty to use its usual name | Empty |
Show on the LibrePortal DashboardCFG_GLUETUN_SHOW_ON_DASHBOARD |
Whether this app gets a shortcut on the front page of the LibrePortal WebUI, separate from any Dashy dashboard Choices: true, false |
false |
Public address lookupCFG_GLUETUN_EXTERNAL_LOOKUPS |
Whether Gluetun may ask outside services which public address your VPN gives you; the Metrics exit-address panel needs it. Choices: true, false |
false |
Update checkCFG_GLUETUN_UPDATE_CHECK |
Whether Gluetun may look up if a newer version exists each time the VPN connects. Choices: true, false |
false |
DNS provider AdvancedCFG_GLUETUN_DNS_UPSTREAM |
Which encrypted DNS provider answers every lookup the apps behind Gluetun make. Choices: quad9, cloudflare, google, libredns, opendns, quadrant |
quad9 |
Detailed logsCFG_GLUETUN_VERBOSE_LOGS |
Whether Gluetun writes its normal, chattier logs, including who connected, instead of only warnings and errors. Choices: true, false |
false |
Debug logging for 24 hoursCFG_GLUETUN_DEBUG_LOGS |
Turn on to see everything Gluetun is doing while you look for a problem; it turns itself off after 24 hours. Choices: true, false |
false |
Tools#
Gluetun's Tools tab has 1 button for jobs you'd otherwise need a terminal for. Each one runs as a task, so you can watch it on the Tasks page and read what it did. More about Tools.
Refresh the VPN provider and country lists.
Works with#
These are the other apps Gluetun knows how to work with. Once it's installed, its page shows the same list with whether each one is connected. How this works.
- Grafana: Shows dashboards for the apps that have one. works with every app
- Prometheus: Collects metrics from the apps that can export them. works with every app
- Uptime Kuma: Watches your apps and shows when one goes down. works with every app
Privacy and security#
All clear Gluetun has to contact your VPN company, which is its job. LibrePortal turns off its public-IP lookup and version check, and sends DNS to Quad9 instead of Cloudflare.
What leaves this server#
- Your VPN provider, which is what it is for
- DNS lookups go to Quad9 over an encrypted connection unless you choose otherwise
What LibrePortal turns off#
- Detailed logs and per-request access logging (switchable in Config)
- Public IP lookup on third-party websites (switchable in Config)
- Version check (switchable in Config)
- Cloudflare as the default DNS provider (switchable in Config)
Licence: MIT. Audited: 21 October 2026. See the privacy of every app and the Promise.
Sources#
Under the hood#
- It runs this image:
qmcgaw/gluetun:v3.41.3@sha256:fa19cc76b2af13d57a8d3dc3066f2ada061b1c761b8aecf989b3877c0486e027. - It can sit behind Authelia's sign-in once Authelia is installed.
- Its own project and documentation: github.com/qdm12/gluetun
Ports, settings, tools and connections on this page are read from LibrePortal v0.10.97's app catalogue each time the guide is built.