Duplicati on Synology DS216+II - Connection lost and GUI not accessible from other systems in network

Hi,
My first topic here so please move if incorrectly placed…

I have the following problem: I installed Duplicati on a Synology DS216+II. The installation went ok (following How to install Duplicati on Synology / DSM). When starting from the GUI on the Synology diskstation itself I got the “Connection lost” problem. My user is part of the HTTP group so that is not the cause.
Out of itself, I wouldn’t mind it that much as I prefer to configure it from my workstation (same LAN) anyway. Problem is that I seem to be unable to reach it, whenever I try to connect to it I a “Cannot make a connection” error.

Output from relevant SSH commands (obfuscated user and host name for anonymity):

@:~$ sudo netstat -ap | grep mono
tcp 0 0 localhost:8200 0.0.0.0:* LISTEN 17234/mono-sgen
@:~$ sudo netstat -ap | grep uplic
@:~$ sudo ps -aux | grep upli
root 17216 0.0 2.2 153252 21128 ? Sl 20:30 0:00 mono /volume1/@appstore/Duplicati/Duplicati.Server.exe
root 17234 0.0 4.7 1123364 43972 ? Sl 20:31 0:01 /volume1/@appstore/Mono/usr/local/bin/mono-sgen /volume1/@appstore/Duplicati/Duplicati.Server.exe
32543 0.0 0.1 23128 964 pts/7 S+ 21:01 0:00 grep --color=auto upli

As far as I can interprete the above, Duplicati is running and there is a Mono process listening on port 8200; but I cannot seem to access it.
I have the same problem on multiple workstations in my LAN. I also don’t have a firewall rule in the router (I can perfectly access the Synology web client interface from the workstations) that could block the access. NAS and workstations I am trying this with are all connected (NAS and 1 workstation wired, another one wireless) with a router that is directly connected to the internet (basic local ISP-device, this is a home setup).

If accessing it from another workstation won’t work, can anybody help me with the “Connection lost” problem?

I guess there’s some small thing somewhere that I don’t see… Can anybody help me? Much appreciated!

This is because it’s listening on port 8200 on localhost only:

tcp 0 0 localhost:8200 0.0.0.0:* LISTEN 17234/mono-sgen

To change it so Duplicati listens on all interfaces, you will need to adjust a setting in the Web UI. Check this box and put the correct hostname for your NAS (if you have one - if you connect by IP only you can leave it blank):

Capture

But you may have trouble doing this if you keep getting “Connection lost” when trying to access the web UI on the NAS itself! Kind of a chicken and egg problem…

Hi,

Thanks for your answer.
To get around the “Chicken and egg” problem I tried to start Duplicati via the command line (SSH session to NAS) via the following command lines:
mono /volume1/@appstore/Duplicati/Duplicati.Server.exe --webservice-interface=*
and sudo mono /volume1/@appstore/Duplicati/Duplicati.Server.exe --webservice-interface=*

Both get stuck with no feedback. I have to stop them via Control C.

Is there a config file somewhere that I can change to allow the remote access without passing via the web interface?

Of course, the “cleanest” solution here seems to be able to log in via the Synology interface. Is there something I can do to solve this? User is part of the HTTP group…
Is there some log file somewhere that I can check to see what’s going on?

I believe that’s actually normal. The mono process does not automatically drop into the background, so you won’t get your prompt back until Duplicati is shut down.

Did you test the web interface before hitting CTRL+C?

If you still can’t access http://ip-of-synology:8200 remotely, hit Ctrl+C and try this command instead:

mono "/volume1/@appstore/Duplicati/Duplicati.Server.exe" --webservice-port=8200 --webservice-interface=any

I don’t recall off-hand if you can use an asterisk instead of “any”. I know for sure “any” works!

Many thanks! I got it to start with the command line that you gave. I can now log in via the workstation, so that’s working.

Now I’m trying to find out on how to make Duplicati start automatically when starting the NAS (which is not the case now). I want the command line to run on start of the NAS but via the task planner doesn’t seem to work. I’ll search for it further and if I’m stuck again I’ll just start a new topic.

I am trying to use Task Scheduler to start Duplicati on bootup, but I don’t think it automatically starts for me either. It DOES work when I tell Task Scheduler to manually run that task. Does that part at least work for you?

I so rarely reboot my NAS I haven’t bothered looking into it more yet.
Someone else on the forum uses this method and it works fine for them.

Here’s how I have mine configured:

And the contents of /volume1/_Duplicati/start.sh:

#!/bin/sh

mono "/volume1/@appstore/Duplicati/Duplicati.Server.exe" --webservice-port=8200 --webservice-interface=any --server-datafolder=/volume1/_Duplicati --tempdir=/volume1/_Duplicati/tmp &

The nice thing about this approach (compared to starting Duplicati through Package Center) is that I can set variables for data folder, temp dir, etc. I don’t want that stuff stored in /root/.config/Duplicati because the folder can get wiped out during major DSM upgrades.

A downside to this approach is that you can’t shut it down without ssh’ing to the NAS and killing the process.

For some reason the email alerting part also doesn’t work for me. I get other email alerts fine from the NAS, but nothing about this task…

I can start it by executing the task from the Task planner manually. But indeed, for some reason it won’t start when booting the NAS.

Is it required to manually kill the Duplicati process when shutting down the NAS? I would expect the process to stop gracefully when the NAS is being shut down (which takes a minute or so, it’s not just power off).

No, you don’t have to kill it when shutting down/rebooting. But you would have to kill it if you want to install a newer version of Duplicati.

I got it starting automatically now by adding “sleep 60” before the line with the Mono command running the Duplicati job (saw this in Synology - Duplicati service won't autostart).

So, lots of thanks for your support!

Great! I’m going to try that. Thanks for the tip.

By the way - does the email notification part of Task Scheduler work for you?

No, doesn’t seem to send a mail neither. I was not planning on using that anyway.

Is the possibility to send a mail from within Duplicati an option for you?

Yep I already use Duplicati to send out emails on backup failures, and duplicati-monitoring.com sends me alerts if backups haven’t happened in X days. So I’m good there. Probably don’t really need the email alerting in task scheduler…