Docker Container

Hi,

i try to use duplicati as docker container. but i have problems with some settings. my yaml looks like this:

services:
  duplicati:
    image: duplicati/duplicati:latest
    container_name: duplicati
    restart: unless-stopped
    ports:
      - "8200:8200"  # Exponiere den Webport
    volumes:
      - /opt/docker_container/Duplicati/data:/data  # Speichert die Konfigurationsdateien
      - /opt/docker_container/Duplicati/backups:/backups  # Speichert die Backup-Daten
      - /path/to/documents:/source
    environment:
      - TZ=Europe/Berlin  # Zeitzone anpassen
      - DUPLICATI__WEBSERVICE_PASSWORD=pw

In general it work and i can set backups. but when i change my Gui password its not persistant. I tried removing - DUPLICATI__WEBSERVICE_PASSWORD=pw after setting a new without success (also restart container). In the gui under settings, i also cannot set remote acces to off. I mean i can but not persistant. I tried to access the container an set it manual in the database but without succes as well. Also i didn´t found /etc/ssh/ in the container so maybe its not a topic?! Also docker log duplicati say that my databas isn´t encrypted. Would love to know how to set encryption pesistent.

Any help welcome :slight_smile:

You also need to have the /data folder mounted somewhere on the local system.

That details is described in the readme:
https://hub.docker.com/r/duplicati/duplicati

Preserving configuration

All configuration is stored in /data inside the container, so you can mount a volume at that path to preserve the configuration:

$ docker run --name=duplicati -v duplicati-data:/data duplicati/duplicati

This allows you to delete and recreate the container without losing your configuration:

Without this, the settings database will be recreated on each startup, making the settings reset to defaults.

Hi,

thx for your answer :). But is not exactly my Volume option “/opt/docker_container/Duplicati/data:/data” what you mean? It saves the data folder on my system under /opt/docker_container/Duplicati/data, or where did i go wrong?

Best regards

Sorry, you are right, I misread that line (the first one).

Going back to the original problem, in your folder /opt/docker_container/Duplicati/data you should have a file called Duplicati-server.sqlite that you can view with any SQLite tool (I suggest SQLiteBrowser). In database there is a table called “Settings” and in here a field with the name SERVER_PASSPHRASE. This is a PBKDF value so it does not make much sense on its own, but what I would suggest is to make a copy of Duplicati-server.sqlite, then restart the container, and check if the value has changed. This value should only change if the password is being changed.

Once we know if the password is indeed changed, we can try to track down the issue further.

I’m not sure if i have done it right but thats what i’ve done. first copied Database. Then changed PW. Then stop and start container again. Then i looked inside Databases (Backup and actual one)

what i get for both, for the value you mentioned, is:
Duplicati

its the same like before (as i mentioned i’ve done this before with console to check values). I’m still confused by this cause the pw i set with:

environment:
- TZ=Europe/Berlin # Zeitzone anpassen
- DUPLICATI__WEBSERVICE_PASSWORD=pw

works. even if i delete - DUPLICATI__WEBSERVICE_PASSWORD=pw in .yml an restart container. So i don´t know whats happening here, and need help :smiley:

This sounds like the opposite of before?

The way it is supposed to work is, that every time you start Duplicati, it will take the password as input, run it through a PBKDF and save the value in the database. Each login is then run through the same PBKDF to see if the values match.
If you start Duplicati without a passphrase set, it will just use the last recorded PBKDF (matching the last provided password).

There was a bug with 2.1.0.111, .112 and .114 where it would refuse ANY login due to an incorrect library file being present. From your config it looks like you have :stable meaning 2.1.0.5.

Is it now working as expected?

for testing i removed - DUPLICATI__WEBSERVICE_PASSWORD=pw and add it again to set a new one. This worked for me for changing pw persistant.

This was the behaviour i had, GUI pw set just worked for the session.

Now i tried again (GUI), and it seemed that when i change pw by gui it works as well, and is persistant after restart the container. so this seems to work now. but i don´t know why, maybe container update?!

But the Option remote acces is till not persistant when i turn it off in the gui. for now i just set ports:
- “127.0.0.1:8200:8200” to get what i want.

Also i set a user for the container. but there seems to be a problem too, when i try to save volumes from other containers. I set the owner of the volumes with the user id of the container service and also i’ve done setfacl -R -m u:USERID-Duplicati:rX path/to/dir to get permissions right. When i do it works. But after restarting the container i get permission acces problems here. when id do setfacl -R -m u:USERID-Duplicati:rX path/to/dir again it will work again.

don´t know whats happening here and at this point im to afraid to ask! Maybe you can help me here

I got this. just forgot to set permissions for future data with
setfacl -R -m d:u:user:rX path/to/dir