This repository provides a docker-compose setup for creating an encrypted VPN connection using Tailscale and ProtonVPN. The configuration allows your containerized applications to route traffic securely through Tailscale and uses ProtonVPN as an exit-node, enabling flexible and private networking across devices and environments.
- 🔐 Secure outbound traffic via ProtonVPN (Wireguard-based connection).
- 📦 Fully containerized setup using docker-compose or portainer.
- 🧩 Suitable for cloud instances, home labs, or headless environments.
- ⚙️ Easily customizable and extensible for other VPN providers (with some modifications).
- 🛡️ Ideal for privacy-conscious developers and DevOps professionals.
- compose.yaml: Multi-container setup for Gluetun (VPN) and Tailscale.
- README.md: Setup instructions, environment variables, and usage guide.
- Remote development over Tailscale with ProtonVPN routing.
- Building self-hosted solutions with reliable encrypted traffic.
- Bypassing geo-restrictions while maintaining full privacy.
Ensure you have the following installed:
- Docker
- Docker Compose or Portainer
- Active accounts for:
- ProtonVPN
- Tailscale
🔐 ProtonVPN
- Create WireGuard/OpenVPN configuration
Go to the ProtonVPN dashboard, go to “Downloads” menu, and select WireGuard/OpenVPN configuration for your preferred server. Then copy the configuration. - Update compose.yaml
Update compose.yaml variables with your WireGuard/OpenVPN configuration.
🌐 Tailscale
- Generate a credential
Visit https://login.tailscale.com/admin/settings/trust-credentials and create a credential. Go to "Keys" section, check "Write" on "Auth Keys" only. Save changes and get your credential. - Update compose.yaml
Update TS_AUTHKEY= with credential that generated before.
- Visit Tailscale Machine
Go to https://login.tailscale.com/admin/machines/ and open the machine you just created. Machine's name should be the same with the TS_HOSTNAME you put in compose.yaml. - Turn on the exit-node
Look for Exit Node in Routing Settings and click Edit. Turn on "Use as exit mode" then Save. - Exit node is now ready to use.