How to install Duplicati on Synology / DSM

Well that looks good, so I’m definitely puzzled why you get “connection to the server is lost”

So is this a bug ?
Or i’m not Lucky …

Has it ever worked for you? Or are you setting it up for the first time?

no never, it’s the first setup on synology

While I have a Synology, I stopped using the native Synology package and switched to using a Docker container about a year ago. If you have Docker experience you might want to consider going that route - personally I find it easier to maintain. If you’ve never used Docker there is a learning curve.

Otherwise hopefully some other Synology users can provide assistance.

ok, thanks for helping.
I don’t know docker, and i have no time to learn it just for this feature.
So hope someone else have an idea :wink:

I have it running on a DS920+ right now, running DSM 6.2.3-25426 Update 3.

For the record… I think this is the order of things as they happened last night:

  • Installed Mono
  • Installed Duplicati package downloaded from duplicati.com and opened Duplicati from within DSM
  • Got Duplicati error message in its own window within DSM
  • Changed local hostname in browser address bar from https://synology:5000 to https://[ip]:5000
  • Got another Duplicati error message in its own window within DSM
  • Checked if user was a member of the http group. It was. Removed it from the group and re-added. Made no difference. Rebooted the machine
  • Was able to open Duplicati in its own window within DSM
  • Wanted to set up a Duplicati backup, found encryption settings were not present
  • Right clicked on a blank place inside the Duplicati window within DSM, and selected ‘open this frame in a separate tab’, which resulted in http://[ip]:5000/webman/3rdparty/Duplicati/ngax/index.html#/

Once Duplicati had its own browser tab and was accessed through the Synology IP address (instead of the local hostname) all seemed to work like it should. Encrypted back ups are being made. (That said: I have yet to attempt/test a restore.)

(Initially it seemed that, while setting up a backup, I also had to manually enter the ssh fingerprint (ssh-rsa) into the Duplicati back up settings, which I did, and which worked, but which I later on for other backups did not have to do anymore.)

//edit: after setting ‘synology’ as a trusted host name in the Duplicati settings, I can now also visit http://synology:5000/webman/3rdparty/Duplicati/ngax/index.html#/ instead of only via the IP address.
However, opening the Duplicati window from within DSM still won’t show any encryption options when setting up new back up schedules. It does show encryption settings though for back up schedules that were made earlier in the separate Duplicati browser tab.

So… After two days I noticed DSM complaining about ‘Insufficient capacity for update’ (DSM update, that is.). A quick google showed that this notification usually means something is eating up disk space in the root of the system.

So I did a df -h, and this was the top one…

Filesystem Size Used Avail Use% Mounted on
/dev/md0 2.3G 2.3G 0 100% /

I then found a Reddit post by someone who had this happen to him after installing/running Duplicati…
Interesting.

I uninstalled Duplicati in the DSM Package Manager, hoping this would clean up things, but it didn’t.

At this point the DSM GUI wouldn’t let me login anymore, because of “no space left on device”, it actually said.

I mounted /dev/md0 to /tmp/why and used du -hs * in an attempt to find the culprit.
In /root/.config/Duplicati/ I found almost 1.5GB of data. All sqlite related.
Since I had already clicked ‘remove’ in the package manager for Duplicati, I figured I could at least move this almost 1.5GB to /volume1/somesharedfolder.
This “fixed” it. It went from 100% usage to 45% usage for /dev/md0, and the DSM GUI was available again.

The question that remains… What did I do wrong? Why did Duplicati do this? Or is it expected behaviour in a way? Or is this an actual Duplicati problem? :hushed:

This is “normal” behavior with the current version of Duplicati on DSM, and is definitely not good behavior. The root filesystem is small, PLUS it tends to get wiped out during major DSM upgrades. There is an open issue about it, but it has not been resolved yet.

Back when I ran Duplicati directly on DSM, my solution was to use a symlink. I now run Duplicati in a docker container and don’t have to deal with that issue any more.

appeared earlier in this rather long thread. The original post is said to be a Wiki. Can anyone add a step? Possibly a dedicated editor could find some other useful steps. I don’t have a Synology, so won’t attempt.

I see. Thanks. So docker it will be I guess.

Thanks. I must have missed that. But I guess it’s now confirmed.

To be clear, docker isn’t required to avoid this issue if you use symlinks or other methods. And if you have never used docker before, there is a learning curve. That being said, I do like the docker approach because the software is self-contained and you don’t need to worry about installing the mono package on the Synology itself.

I now have Duplicati running in Docker on my Synology. I can open the Duplicati GUI.
I’m using this opportunity to learn something more about Docker, and then read this:

Then, open http://localhost:8200 on the host to access the Duplicati web interface and configure backups. Any host directory that you want to back up needs to be mounted into the container using the -v option.

Now I see there is a terminal page in the Duplicati Docker window in DSM, but I am unsure on how to proceed. I know how to mount a drive in a regular Linux install. But I get the feeling this is not quite the same, and am unable to find what I’m looking for when Googling.

Do you have any experience in this you can share?

Thanks.

On Synology you manage the volume mappings here:

The “File/Folder” column is the location on your NAS, and the “Mount Path” column is where the folder is mounted inside your docker container.

It is vital that you set up a redirection for “/data” otherwise your Duplicati configuration and job databases will be stored inside the container, violating a core principle of docker where nothing important is saved inside the container itself. You want to be able to destroy/recreate containers easily.

You also want to set up mappings for the various shares on your NAS. I used a naming scheme like “Share” → “/volume1/Share”. Doing this will let Duplicati see all of your shares under “/volume1”.

Note that if you’re using a docker image besides the official duplicati one (linuxserver has one, for example), then you need to check its documentation to see where the local data is stored. The official Duplicati image uses “/data” as mentioned above but others may use something else.

1 Like

Thanks! Very helpful.
You say that I can manage the volume mappings over there in the GUI… However, I’m in that specific Docker/Duplicati GUI part right now, but I do not see how to actually create/add a mapping. What am I not seeing?

You can only change the mappings while the container is not running. So you’ll need to stop it first, then you can Edit it:

Hopefully you haven’t done much configuring of Duplicati inside the docker container at this point, because when you set up the mapping for /data and restart the container, Duplicati will behave as if it is unconfigured. It’s vital that you map this outside of the container though!

I encourage you to get comfortable with these aspects of docker. Practice deleting/recreating the container, etc. If you do it right you won’t lose any data inside the container (eg, the Duplicati configuration).

Synology makes it easy to export your container configuration so you can recreate it later:

capture

Don’t use that second option “Export container contents and settings” - that is not a good approach to docker. Just train yourself not to store any data inside the containers. :slight_smile:

1 Like

Been working perfectly for a couple of days now. Many thanks!!!

1 Like

Found Duplicati runs fine on the DS220+ but encountered some logistical issues.
I installed Mono from SynoCommunity . I got the Missing XSRF Token message but that didn’t seem to prevent setting up and running a backup.
My backup was 2.8TB and it stopped, probably because the database size grew too big for the default location, it will be over 5GB (changing database location mentioned in another post).
The DS220+ doesn’t have a lot of grunt or RAM and the initial backup was looking like 6 days before it stopped.
I am now running the backup with Duplicati from a PC, sucking off the NAS and onto my removable media. Initial runs should be <24hrs.
I have yet to confirm by re-testing but I think Duplicati stops the hard drives sleeping if it is running as shown in the package manager (not backing up).

Update: The disk station stopped because the USB mount dropped (unmounted) and the mount point in the system file area filled up with the backup volumes rather than the USB drive. The file system was easily cleaned by SSHing into the DSM.