I saw an appreciation post for Gluetun on here in the last couple of weeks. I’d set it up before my server died and I had to reinstall everything, but then gone for the easy method when I was reinstalling.

So my easy method install had a VM as a server running Plex and Docker and a second VM with Mullvad installed running anything that needed a VPN in Docker.

Yesterday I opened up a program behind the VPN and it wasn’t working again. I had to restart the VM to get it going and it annoyed me. So before work I set up Gluetun.

I had previously used this walkthrough https://youtu.be/9dJPOd0XbN8 so I went back to it, looked in the notes and found his GitHub, then his docker compose under Torrent-VPN.

I stole his initial Gluetun config and the qBittorrent part, but then went into Portainer and took all my running containers and added them to the file. I took the ports out of each compose file and added the “network mode” and “depends on Gluetun” bits from the qBittorrent part of his config and added them to each compose file I added to the file.

Then the ports I had removed I added to the Gluetun part of his compose file.

Downloaded a config file for Mullvad and added the IP and private Key to the Gluetun compose.

Then launch the stack and it worked.

Now for the Gotchas. I had to go into Portainer to get the IP address that the whole stack used. This IP address was required to get containers talking to each other. If you need Sonarr to connect to Prowlarr it needs this IP address.

Also the downloader (he uses qBittorrent and I used RDT client) needed to be mapped using “localhost” for each container and the port

But other than those Gotchas it was quite easy and I managed to get everything set up an hour after finishing work. This was because I just used backups of my already running containers and restored them in the new ones, then edited the bits that had changed (IP addresses in my Gotchas)

The upside is that I’m now only using the one VM, meaning I’ve saved 4gb of RAM.

I can use that ram for something else now. Nextcloud? Immich?

Hope this helps someone else.

@HauntingScience@programming.dev
link
fedilink
English
4
edit-2
4M

I’ve had some level of success using “gluetun” as the host of the container you want to hit, for any container outside of gluetun’s network mode.

Then, for those that are sharing the gluetun network, they can communicate using their regular hostname but using the internal port instead of the published one.

Out of all my containers behind gluetun I have only one that hasn’t been able to connect with anything but IPs

LifeBandit666
creator
link
fedilink
English
13M

I’ve just come back to this comment to get sabnzbd running, thanks again

LifeBandit666
creator
link
fedilink
English
14M

Nice thanks for this, maybe useful when I finally get out of this carpark lol

Create a post

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don’t control.

Rules:

  1. Be civil: we’re here to support and learn from one another. Insults won’t be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it’s not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don’t duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

  • 1 user online
  • 279 users / day
  • 589 users / week
  • 1.34K users / month
  • 4.55K users / 6 months
  • 1 subscriber
  • 3.47K Posts
  • 69.3K Comments
  • Modlog