Guide on setting up *arrs and Gluetun for Cosmos Cloud (or migrate from CasaOS)

Your channel has been really helpful in my home server journey. Seeing as you’re quite the expert I’d like to ask for help on this issue I’ve had recently.

I’ve moved to Cosmos Cloud for an easier setup of something such as Authentik and Traefik (too hard for me to implement). I was using (kind of still am) CasaOS.

The thing is, I had setup my *arrs system with qBittorrent connected (only qBit connected) through the Gluetun app (VPN). But I haven’t been quite able to move it to Cosmos Cloud.
I haven’t been able to isolate the qBittorrent connection to Gluetun in Cosmos, the app keeps changing each docker’s networks if I try doing anything. It behaves very weirdly.

I originally setup the container connection in CasaOS through Portainer. But it doesn’t update the app in CasaOS (bug or something).

When moving to Cosmos each docker manager app says a different thing. When I have 2 networks for Gluetun in Cosmos, Portainer says it has 1 and CasaOS doesn’t say anything has changed.

I wanted to move everything to Cosmos so I wouldn’t need to have this headache.

Is there any way you could make a video explaining how to setup qBittorrent through Gluetun (with VPN), and having the *arrs go outside the VPN but still maintaining their connection to qBittorrent for communication in Cosmos Cloud? All this while exposing the services through my domain through Cloudflare DNS and HTTPS if possible (I’ve managed to expose everything except for qBittorrent).

It would be highly appreciated! Thank you for all the help you’ve provided to the community. Originally installed CasaOS on Ubuntu under Proxmox with your video!

Thank you!

Edit: Also, would you know whether exposing a service to my domain would still have it working locally in case of an internet disconnection? Say I had Sonarr exposed like this: , would it still work if my network didn’t have access to the internet anymore (I use Cloudflare for DNS Challenge but don’t really know how it works)?
What if Cloudflare exploded, for example, how do I enable something like Tailscale in Cosmos Cloud?

I’ve been really busy, so sorry for the late reply. :slight_smile:

Glad that my channel has helped you.

If you have Isolate Container Network on turn it off and then try to change the network.

I would recommend you changing the docker compose in CasaOS with: Added an edit CasaOS apps script

I have not actually needed to use qBittorrent myself. I’m guessing when you say Cloudflare DNS you mean Cloudflare Tunnels?

If your internet disconnects then your tunnel will not work unless you have local DNS setup for a local domain.

I’ve also started moving everything to Cosmos, I currently using TrueNAS.

I have Gluetun setup and working, but I also am having a hard time getting my torrent app to use the tunnel. Have you made any progress?

I managed to replicate my Portainer workflow for linking qBit to Gluetun. It works. The only issue that remains is the fact that sometimes if you rebuild one of the 2 apps, qBit will disconnect from Gluetun, then you’ll have to manually reconnect it, which is not that bad since it serves as a network kill-switch and prevents leaks, but annoying since I have to fix it myself.
For my qBit network config I have it as “Container: Gluetun” when possible. But sometimes it changes itself to a random string. Cosmos is a bit unstable with configs sometimes. So I have an env variable that forces qBit to connect to Gluetun always.

Even with that variable it might just not detect the Gluetun container and turn-off. Or it might actually do its job and just show incorrect info, like now:

The override feature is awesome in this case. It never connects directly to the web.
Overall, I managed to migrate the whole of the arrs system to Cosmos and it’s working flawlessly.
I just don’t use the “Volumes” feature and keep their data in easy to access locations for backup.
Cosmos really made everything easier in terms of networking. I’m only waiting for the dev to fix the VPN system so I can have even more secure connections. It doesn’t work that well, yet.

Forgot to mention something. For Gluetun, I have an env variable setup so that it’ll still accept connections from the local network, that way the arrs can communicate with qBit locally without needing a VPN themselves.

So ARRS–>Gluetun–>qBit.
Then qBit–> Gluetun–>DNS Server–>Web.

You can test the VPN with a magnet link ip checker:

I also installed the Speedtest-Tracker software, which is awesome. I got all the data from it and sent it to my ISP, which now has completely stabilized my network speed. It was just all over the place before. Companies treating customers like fodder.
For my DNS Server I have Technitium DNS, which I installed outside the Cosmos system, but I proxy its web-interface through Cosmos (it caches DNS requests so browsing is noticeably faster; also blocks your ISP from knowing what you’re doing). PiHole for adblocking (easier to use than Technitium). Wonderful system.

Been fun building all of this.

My next venture will be a gaming emulation server.

Thank you so much for this! I’m excited to give this a try!