Skip to content

Updating the GlueTUN VPN Containers

Last updated on 10 October 2023

Please note if you are using DSM7.2 or higher you should use the Container Manager version of this guide from the menu.
This guide has reached the end of its updates as most people are now on the latest DSM update - This guide is correct as of 08/12/2023 however no further updates will be added.
UpdateDate
Amended the paths in line with the latest version of the guides 14/04/2023
Historic updates now at the end of the guide.

I have put together this quick guide to help pull updates for the GlueTUN VPN and any containers attached to it.

The Synology Docker UI does not support routing one container through another containers network connection and causes an error if you try to use standard update methods or Watchtower. So this little guide will get a script in place that you can either schedule or run manually.

Let’s begin!

Open up the Control Panel then ‘Task Scheduler’


Optional Step – Script Output

In order to see what your scheduled tasks are doing you can enable the Output Results within the Settings screen, you just need to select a folder to keep them in. I would create a subfolder in one of your shares.

Setting up the Script

Next you need to click on ‘Create’ > Scheduled Task > User-defined script

On the screen that now appears you can enter the details shown below.

You will see in this example I have unchecked the ‘Enabled’ option as this setup will be run manually, However if you would like to actually schedule this task to run at regular intervals you can leave this enabled.

  • Task: ‘GlueTUN Update’
  • User: ‘root’
  • Enabled: Unchecked (Unless you want on a schedule)

On the ‘Schedule’ tab we will not be changing any options, however if you decided to have a regular update nightly this is where you will set it.

OK now we are on the final tab ‘Task Settings’

This is where you will need to copy and paste the code below into the User-defined Script box.

Please note the folders and names of the .yml files are based on the guides on this site, if you have different names or paths change them!

The script does the following.

  1. Stops and removes any containers specified within the associated .yml (your data is safe)
  2. Pulls the latest versions of each of those containers if available
  3. Once downloads are completed brings up all the associated containers within the .yml

qBittorrent Version – Copy below

Bash
#!/bin/bash

docker-compose -f /volume1/docker/qbittorrentvpn.yml down 
wait
docker-compose -f /volume1/docker/qbittorrentvpn.yml pull
wait
docker-compose -f /volume1/docker/qbittorrentvpn.yml up -d

Deluge Version – Copy below

Bash
#!/bin/bash

docker-compose -f /volume1/docker/delugevpn.yml down 
wait
docker-compose -f /volume1/docker/delugevpn.yml pull
wait
docker-compose -f /volume1/docker/delugevpn.yml up -d

Your task should look like below dependent on which code you copied

Press OK to be taken back to the Task Schedule menu.

You can now either manually run the script whenever you please or if you set it on a schedule this will commence once the time/day is hit.

That’s it all done


Buy Me a Coffee or a Beer

If you have found my site useful please consider pinging me a tip as it helps cover the cost of running things or just lets me get the odd beverage. Plus 10% goes to the devs of the apps I do guides for every year.

Published inDockerSynologyUpdating Containers 7.1

16 Comments

  1. trev trev

    I’m getting this error:

    ERROR: for qbittorrent Get “https://registry-1.docker.io/v2/”: dial tcp: lookup registry-1.docker.io on 192.168.86.1:53: read udp 192.168.86.40:42255->192.168.86.1:53: i/o timeout

    ERROR: for gluetun Get “https://registry-1.docker.io/v2/”: dial tcp: lookup registry-1.docker.io on 192.168.86.1:53: read udp 192.168.86.40:42255->192.168.86.1:53: i/o timeout
    ERROR: Get “https://registry-1.docker.io/v2/”: dial tcp: lookup registry-1.docker.io on 192.168.86.1:53: read udp 192.168.86.40:42255->192.168.86.1:53: i/o timeout
    Get “https://registry-1.docker.io/v2/”: dial tcp: lookup registry-1.docker.io on 192.168.86.1:53: read udp 192.168.86.40:42255->192.168.86.1:53: i/o timeout

    Firewall setting?

    • Dr_Frankenstein Dr_Frankenstein

      Port 53 is DNS, so it is suggesting it’s not getting internet access.

      Is this from the GlueTUN log or Qbit? If its qbit what does the Gluetun log say?

      • trev trev

        I ran the update scripts manually to make sure everything was working correctly since when I ran the script from Task Scheduler I noticed that qBit wasn’t updated to 4.5.2 and still running 4.4.5. I just ran the script from Task Scheduler and qBit has been updated to 4.5.2 now. I’m guessing it was a connectivity issue on my end.

  2. Hi my friend. Thanks for the update guide! – you know, since the update gluetun restarts like crazy (and of course qbittorrent fails to start due this, but I see is gluetun this time giving problems). Any ideas?

    I get a servers list issue (that was working just perfectly fine before):
    2023-03-08T23:52:05Z INFO [firewall] enabling…
    2023-03-08T23:52:05Z INFO [firewall] enabled successfully
    2023-03-08T23:52:06Z ERROR cannot read servers from file: cannot decode servers: unexpected end of JSON input
    2023-03-08T23:52:06Z INFO Shutdown successful

  3. Another Beginner Question. When you upgrade the download client (Qbittorrent), does it keep the torrents that are seeding / downloading?

    • Dr_Frankenstein Dr_Frankenstein

      Yes perfectly safe to do upgrades, your torrent progress etc is all stored with the config files in /docker/qbittorrent – the container is disposable and has no impact on the config files if you delete it etc.

  4. LL LL

    Thank you. Beginner question but does the services ever disconnect from the VPN with this script?

Leave a Reply

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

drfrankenstein.co.uk – writing Synology Docker Guides since 2016 – Join My Discord!