How to install Duplicati on Synology / DSM

Do file system and chattr command let you set mount point to be immutable to prevent future fill-ups?

I don’t know, but I suppose this could happen on any Linux system where the target is mounted to a local directory (cifs/usb/nfs) within the root file system and the mount point gets umounted somehow. I have never had a cifs or USB mount drop from a desktop or server before so not sure why the DSM dropped it.

I’ve seen the same happening on a DS412+ (upgraded to 2GB of memory). After a week of running an initial backup to Jottacloud it managed to fill up the /dev/md0 partition. Wow. No package EVER should put a 1.1GB SQLite Dbase on /dev/md0 imho (this is the volume where DSM is installed!). Tried to stop Duplicati, move and symlink the Dbase but that wouldn’t work. I was quick on giving up as I managed to get Duplicati installed using a Docker container instead (I used duplicati-duplicati). This has been WAY better, externalized the container’s /data to /volume1/docker/duplicati and all is running smoothly now (although the Synology has issues pushing bandwidth, probably because of its tiny CPU).

The issue with the “missing XSRF Token” is still alive and kicking; in an attempt to push more bandwidth I fired up a second container. When I do, both instances start giving me the missing token even though memory isn’t nearly full (around 66%) :frowning:

Welcome to the forum @ErikZ

Filling by DB is different than filling by backup volumes, just above. Filling by DB is closer to far above.
Synology: warn if server data folder in /root? #3143 is still open and may need a Synology user’s help.

which also (according to far above post), makes it subject to being wiped out by major DSM upgrades.

If there is an always-right place such data should go, and if there is a reliable test for Synology, please
post at the GitHub issue in the hope that a developer will solve the issue and find a Synology to test on.

The reliable test for Synology might not be needed if anything that can install from .spk fits the answer.
Add packages for WD in MyCloudOS 5 #4494 might be a question for a Synology-specific approach…

Although I don’t know Synology install or usage, It might be possible to solve this somewhere in install procedures or scripting, rather than hardcoding it in program logic which is probably far less flexible…

Duplicati.Server.exe or similar is presumably what’s running, and it has some options for DB location:

--server-datafolder
Duplicati needs to store a small database with all settings. Use this option to choose where the settings are stored. This option can also be set with the environment variable DUPLICATI_HOME.

--portable-mode
Activates portable mode where the database is placed below the program executable.

I generally see these if I try to open multiple Duplicati in one browser. I don’t know if you can avoid that in your setup, but if so, please give it a test. I’m not a web developer, but I suspect cookie confusion due to multiple use of what looks like the same site (I use localhost or 127.0.0.1) and path, but at different ports.

Yeah I still run it from .spk on my Synology, but I launch it manually, ssh’ed in as root, using two tricks:

  1. export TMPDIR=/volume1/somewhere/safe (because the sqlite library ignores Duplicati’s --tempdir command line switch)
  2. --server-datafolder=/volume1/somewhere/else/safe in order to keep DSM from wiping your configuration during an upgrade.

So the overall command line to run with GUI is something like this:

TMPDIR=/spacious/tmp/dir \
    /volume1/@appstore/mono/bin/mono-sgen \
    /volume1/@appstore/Duplicati/Duplicati.Server.exe \
    --server-datafolder=/persistent/data/dir \
    --webservice-interface=any --webservice-port=<port> \
    --webservice-password=<password>

… and yes passing the password like this is security insanity, plus you should also note that historically there have been some shell quoting issues which prevent certain password characters from being correctly communicated from the command line to the server. These can now be safely set in the configuration GUI, but you may find the command line switches useful while getting started.

2 Likes

@drwtsn32 If I may ask… You’ve been most helpful (thanks again), and it has been working flawlessly for two months now, but now there is an update for Duplicati, says the Duplicati GUI.
Are there default steps for Duplicati in Docker on Synology, to update Duplicati without breaking it?
Many Thanks.

If you set up the docker container properly (all important data is stored outside of the container), then it’s very easy! Go to the Registry and download the latest duplicati image:

cap1

cap2

The only complicating factor is if the “tag” is different from what you are currently running:

Once you get the notification that the download is complete, you can Stop the current container, then use the Clear command. This resets the container to the newest downloaded version. Then you just Start the container again.

It’s critical that you are storing your configuration information outside the container before doing this, otherwise you may lose important data! For the official duplicati docker image, you want to make sure /data is mapped to somewhere else on your NAS, as we discussed above.

1 Like

@drwtsn32 Wow. That was way easier than expected. Again: many thanks. It worked. And I learned something new :+1:

1 Like

I was running this docker version of duplicati for a couple of months with no issues at all. I recently upgraded DSM to 7.0.1 and now duplicati is no longer working. When I browse to IP:8200, i get nothing. The container is running fine, apparently. There are no logs from the container, and when I go to a terminal for the container I just get a blank screen.

I’ve tried recreating the container, but exactly the same result.

Yes, my data for duplicati is stored outside the container.

Any ideas would be greatly appreciated.

Thanks

I’m running DSM 7.0.1-42218 over here, and do not experience the problem you’re describing.
Did you also update Docker itself in the Package Center? I’m running 20.10.3-1239.

Also, is the screen (browser window) really completely blank? Or do see just the Duplicati menu, but all tasks seem to be gone? (I’ve had this happen to me a couple of times before, was unable to reproduce it though.)

I also upgraded from DSM 6.x to 7.0.1 recently. No issues with Docker for me though, it just continued to work. Can you confirm that it is still set to listen on port 8200? Click Details on your docker container and look here:

@BackupEverything @drwtsn32 Thanks for getting back to me.

The browser is not connecting on port 8200. Yes 8200 is set as the port in the container.

The container version:

This may not be a 7.0.1 issue, but might be a first reboot since installing issue…?

image

My duplicati config is in /data - did I screw up the config somehow? Does Duplicati not know how to find it?

Any other suggestions?

Thanks!

Your local port is actually 49156. Try going to http://<nas-ip>:49156 in your browser and see if the Duplicati UI shows up.

The 8200 in your screen shot is the port number from the container’s point of view. The local port is how you access it on your NAS, and it maps the traffic to the container at 8200. If you notice my screen shot I use 8200 for both. You can change this mapping if you stop Duplicati container and click the Edit button then go to the Port Settings tab.

If you want the docker files in “Shares/IT” on your NAS, then it’s ok. I leave my /data mapping set to “docker/duplicati” (I think that’s the default). But my preference is for each container to store its settings in the top level “docker” folder.

oohhh I feel dumb now :frowning:

You are exactly right… Silly me

Thanks for the help!

No problem - glad I could help!