Install the app
How to install the app on iOS

Follow along with the video below to see how to install our site as a web app on your home screen.

Note: This feature may not be available in some browsers.

Duplicate container, settings are gone for qBittorrent

450
92
NAS
DS923+ (16GB)
Router
  1. RT6600ax
Operating system
  1. Windows
When experimenting with installing qBittorrent In DSM 7.2 I have to duplicate the container to change the settings (stupid if you ask me, but perhaps someone knows a reason..). But it seems, everytime I do this, I loose the settings for qBittorrent. I have to reconfigure the adminpassword, change portsettings once again. Is this some kind of feature, should it be like this or what have I missed?
 
Last edited:
Synology's Docker used to be the only one that allowed modifying existing container. Vanilla Docker neither supported or supports this feature, nor to create duplicating containers. Updating the container configuration always meant to remove the old container and create a new container based on the new settings. If volumes were mapped into container paths that store persistent data, the new container would directly pick up where the old ended. Without those volumes, the new container would retain no state.

If you are not already using docker compose to store your container configuration, you should definitely start using it. You could have made changes to the container configuration in a compose file and deploy the changes (as in replace the old container with a new container based on the new settings) within 1-2 minutes.
 
I guess I have some studying to do.. So, what does this mean for us mortals? :) Assume I want to change a path in the docker configuration. ContainerManager duplicates it all settings but does not maintain some kind of state in the container itself which is causing my need of reconfigure the settings within qBittorrent.
I have not experienced this problem with other containers (don't have that many though...).
Will Docker Compose take care of my issues?
 
What @one-eyed-king means are two things in your case.

1) using compose in terms to be more flexible when altering existing containers configuration and deployment
2) using volumes or volume bindings to persist the configuration state of the container

The fact is that containers are short lived by "nature". Once you change the configuration, the old container is destroyed and a new one with new setup is created. If in that case you have no volumes in use to persist the destruction of the container, all settings, data and everything else is zeroed out and you start fresh.

YAML:
version: "3.5"
services:
  name_of_service:
    image: name_of_the_image
    container_name: name_of_nonVPN_container
    volumes:
      - "local_path:/container_path"
      - ...
    restart: always

This is an example of a compose file. Any modification to this file and redeployment is much easier than navigating the Container Manager UI (btw, CM supports compose files as well).

In order to persist data for any container (depending on how the container image was built and designed) you can use volumes or volume bind (as in this example).

YAML:
    volumes:
      - "local_path:/container_path"

So the "left" side is your local path on the NAS where you want to main and keep the data saved, that lives inside the container in the path written on the "right" side.

Example: "/volume1/docker/mysql:/var/lib/mysql"
 
Last edited:
This feels much like a foreign language to me I'm sad to say. :) I appreciate all explanations though.
Dockerstuff is obviously not something you work out by trial-and-error as things seems to screw up even if it looks good at first, for me anyway. :)
So, how should I have setup my qBittorrent client in the first place doing things "by the book" to be able to adjust parameters later without the risk of loosing configurationdata? Should I "script" them in the Project-tab in Container Manager instead?
Any beginners/newbie/idiots guide out there that is good?
 
Should I "script" them in the Project-tab in Container Manager instead?
That would be best, yes.

YAML:
---
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1000
      - PGID=1000
      - TZ=Etc/UTC
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /path/to/qbittorrent/appdata:/config
      - /path/to/downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped

This would be a compose file for qbit.

What needs to change here are the volume paths (left side, NOT right side!) to configure the container to present those internal folders to your NAS. Also, create those destination on your NAS ahead of time!

PUID and PGID need to be configured to your DSM account ID value as well as the group value.

To get that info, log into your NAS via SSH. First activate SSH port (22) in the Control Panel>Terminal.

Then log into the nas using ssh username@NASIPADDRESS command via your SSH application (PUTTY on Win, Terminal on macOS or Linux).
Once logged in your will enter id and hit return. This will list PUID and PGIDs for your account.

PUID (user ID) will be 1026 or higher number and PGID (Group ID) will be 100 for the users group or 101 for the admin.

So one final example of the compose file that you will run inside the Container Manager/Project section is:

YAML:
---
services:
  qbittorrent:
    image: lscr.io/linuxserver/qbittorrent:latest
    container_name: qbittorrent
    environment:
      - PUID=1026
      - PGID=100
      - TZ=Europe/Paris
      - WEBUI_PORT=8080
      - TORRENTING_PORT=6881
    volumes:
      - /volume1/docker/qbit:/config
      - /volume1/docker/downloads:/downloads #optional
    ports:
      - 8080:8080
      - 6881:6881
      - 6881:6881/udp
    restart: unless-stopped

Keep in mind this is one example and you will need to alter the left paths to match your desired locations. Also Linux is caps sensitive, so be mindful of that.

If you manage to get the contianer to start, check its logs to see any major issue (under the contianer details in Container Manager), and than try and access the app via http://nasipaddress:8080
 
The "Projects"-tab was the way to go! Thanks again guys for your patience and help!
 
@Rusty, thank you for your detailed explanation and sample scripts, just starting to research containers, and this gives a great understanding of data persistence, thanks for taking the time with this and other contributions you make!
 
If I need to move my docker/container manager to another volume, I just do that and can run the composer file again to set it up?
 

Create an account or login to comment

You must be a member in order to leave a comment

Create account

Create an account on our community. It's easy!

Log in

Already have an account? Log in here.

Popular tags from this forum

Similar threads

  • Question Question
Hi, I am trying to install a Radiology reporting related software as a Docker container running on...
Replies
0
Views
196
  • Solved
Hi all!!! I'm going to give a brief summary of the solution I've implemented to have a good backup of our...
Replies
43
Views
5,572
  • Question Question
Just to note the difference between the old Docker package and Container Manager: in Docker you can stop...
Replies
6
Views
4,128
  • Question Question
Welcome to the forum! Are you running those containers via their "project" files (YAML) or using the...
Replies
1
Views
718
I’m happy with what I’m doing. Use Portainer for tidying up and checking things, used to be more useful in...
Replies
6
Views
5,471

Thread Tags

Tags Tags
duplicate

Welcome to SynoForum.com!

SynoForum.com is an unofficial Synology forum for NAS owners and enthusiasts.

Registration is free, easy and fast!

Trending content in this forum

Back
Top