-
-
Notifications
You must be signed in to change notification settings - Fork 2
Quick start
# in your existing Gluetun docker-compose.yml
ports:
- 8887:8888 # or whichever port you have configured
environment:
HTTPPROXY: "on"
HTTPPROXY_LOG: "off"
# HTTPPROXY_USER: "" # optional — set in the UI Settings if needed
# HTTPPROXY_PASSWORD: ""The companion needs write access to the directory containing your Gluetun docker-compose.yml so it can write a docker-compose.override.yml and restart the service.
Unraid / DockerMan If Gluetun is managed by Unraid's Docker Manager (
net.unraid.docker.managed=dockerman), Companion auto-detects that backend and does not usedocker composefor switches. Mount the Unraid template directory as writable, for example- /boot/config/plugins/dockerMan/templates-user:/boot/config/plugins/dockerMan/templates-user, so changes are persisted back into the DockerMan template before the container is recreated.CONTROL_BACKEND=unraidcan force this mode if automatic detection is not enough.
services:
socket-proxy:
image: tecnativa/docker-socket-proxy
container_name: socket-proxy
restart: always
volumes:
- /var/run/docker.sock:/var/run/docker.sock:ro
environment:
CONTAINERS: 1
IMAGES: 1
NETWORKS: 1
VOLUMES: 1
POST: 1
DELETE: 1
networks:
- companion-net
gluetun-companion:
image: ghcr.io/aerya/gluetun-companion:latest
container_name: gluetun-companion
restart: always
ports:
- 8765:8765
volumes:
- /path/to/data:/data
- /path/to/gluetun/stack:/compose # ← adapt this path
- /path/to/gluetun/openvpn:/openvpn
extra_hosts:
- "host.docker.internal:host-gateway"
environment:
- TZ=Europe/Paris
- SECRET_KEY=replace-with-a-random-string # openssl rand -hex 32
- DATA_DIR=/data
- GLUETUN_HOST=host.docker.internal
- GLUETUN_PROXY_PORT=8887
- GLUETUN_CONTAINER=gluetun-airvpn # exact name of your Gluetun container (Compose service name is auto-detected)
- COMPOSE_DIR=/compose
- OPENVPN_CONFIG_DIR=/openvpn
- OPENVPN_CONTAINER_DIR=/gluetun/openvpn
- DOCKER_HOST=tcp://socket-proxy:2375
# Optional: protect /metrics with a Bearer token.
# Leave unset (or empty) for open access — standard for internal Prometheus scrapes.
# - METRICS_TOKEN=your-secret-token
networks:
- companion-net
depends_on:
- socket-proxy
networks:
companion-net:docker compose up -dWhy
socket-proxy? The Docker socket gives near-total access to the host. The Tecnativa proxy sits between Companion and the socket, restricting access to the required operations: reading containers/images/networks/volumes, plus POST/DELETE needed to create and remove temporary sidecar containers. It blocks direct daemon access (exec, info, swarm…). Fully transparent for the user, reduced attack surface.
Open http://localhost:8765 — first login: enter the credentials you want (account created automatically).
Unraid / DockerMan: a temporary XML template is available in
templates/unraidfor manual install or Private Apps, pending a possible Community Applications publication.
Companion in the same stack as Gluetun? Remove
extra_hostsand use the service name:GLUETUN_HOST: gluetun. On a switch, the companion only targets the Gluetun service (docker compose up -d <service>) — it never restarts itself.
Servers → Import from Gluetun: the companion reads SERVER_NAMES, SERVER_COUNTRIES, etc. directly from the running container and imports each value with its filter type. The Gluetun catalogue can also import servers by country, city, region, hostname or name, with server-type filtering when the provider exposes it (for example P2P, Streaming, Secure Core, Tor or Free on ProtonVPN). Manual addition is also available on the same screen.
⚠️ Companion benchmarks each server individually, by name. SettingSERVER_COUNTRIES,SERVER_REGIONSorSERVER_CITIESadds a single entry (e.g. "France") — Companion does not automatically discover individual servers in that country. Add each server by its name (SERVER_NAMES) for benchmarking to work. Minimum 2 named servers required.
Repository · Issues · Releases
Français
- Compatibilité
- Démarrage rapide
-
Fonctionnalités
- Mesure de performances
- Résolveurs DNS observés
- Sélection & bascule automatique
- Pools de rotation
- Multi-provider (WireGuard & OpenVPN)
- Catalogue de serveurs Gluetun
- Gestion des containers Docker
- Contrôle trackers BitTorrent
- AirVPN
- Analyse & historique
- Interface & notifications
- Intégration & infrastructure
- Variables d'environnement
-
Fonctionnement
- Mode Sidecar (défaut)
- Mode Proxy HTTP (optionnel)
- Containers à redémarrer après bascule
- Containers à stopper pendant le benchmark
- Contrôle des trackers BitTorrent via le VPN
- Clients BitTorrent et découverte des trackers
- Inventaire des ports forwardés VPN
- Bandeau « Test en cours » et bouton Arrêter
- Sélecteur de serveurs AirVPN
- Vérification rapide avant benchmark (option)
- Optimisation horaire (option)
- Sélection intelligente du benchmark (recommandée pour les gros catalogues)
- Serveurs autorisés avant benchmark (option)
- Éviter les serveurs AirVPN chargés (option, dédié AirVPN)
- Écoute Docker events
- Score de confiance par serveur
- Profils d'usage
- Profils VPN (WireGuard & OpenVPN)
- Pools de rotation
- Score de sélection — composantes de stabilité
- Vue patterns horaires (/history/patterns)
- Détection de nouveaux serveurs AirVPN
- Notifications contextuelles
- Jitter & Packet Loss
- Endpoint Prometheus /metrics
- REST API
- Cycle automatique vs déclenchement manuel
- Dashboard Grafana
- Workflows automatisés
- Notes
- Sécurité
- Crédits
- Licence
English
- Compatibility
- Quick start
- Features
- Environment variables
-
How it works
- Sidecar mode (default)
- HTTP proxy mode (optional)
- Containers to restart after switch
- Containers to pause during benchmark
- BitTorrent tracker checks through the VPN
- BitTorrent clients and tracker discovery
- VPN forwarded port inventory
- "Test running" banner and Stop button
- AirVPN server picker
- Quick check before benchmark (option)
- Time optimization (option)
- Smart benchmark selection (recommended for large catalogues)
- Allowed servers before benchmark (option)
- Avoid loaded AirVPN servers (option, dedicated to AirVPN)
- Docker events listener
- Per-server confidence score
- Usage profiles
- VPN profiles (WireGuard & OpenVPN)
- Rotation pools
- Selection score — stability components
- Hourly patterns view (/history/patterns)
- New AirVPN server detection
- Contextual notifications
- Jitter & Packet Loss
- Prometheus /metrics Endpoint
- REST API
- Automatic cycle vs manual trigger
- Grafana dashboard
- Automated workflows
- Notes
- Security
- Credits
- License