How to access the duplicacy web-interface remotely

web-ui

#1

By default, the #web-ui is only accessible locally, i.e. on from the same computer where duplicacy_web is running (http://127.0.0.1:3875/dashboard). If you are running duplicacy on a home server or NAS, you’ll probably also want to access it from other computers in your network. But as you will notice, accessing for example <server_ip>:3875/dashboard will give you a connection refused error.

To fix this, do this:

(In my case, I had to create the ~/.duplicacy-web/settings.json from scratch, i.e. a file just containing the above code.)

If you are wondering what the difference is between listening on 127.0.0.1 and listening on 0.0.0.0 is check out this. In a nutshell: 0.0.0.0 listens on all IP addresses of your computer, not just 127.0.0.1.

Please note that I’m not an export in server- or network administration and I assume that listening on all IP addresses may not be a good idea on a server exposed to the internet, so I recommend you only use this solution in your home network or if you know what you are doing. If the latter applies to you, please feel free to edit this post with further advice. (My guess is that the safe method for headless machines is to use "listening_address": "<server_ip>:8080")

Update: scroll down to this post for full instructions.


Unable to connect to web ui version
#2

For web ui 0.2.1, it seems the default port is 3875. Does that mean the code that needs to be put into settings.json is:

{
"Listening_address": "0.0.0.0:3875"
}

?


#3

You don’t have to use the default - that’s part of the reason for being able to specify it in the optional settings.json file - use whatever you want, so long as it doesn’t clash with another service.

But yes, 3875 is the default.


#4

On my qnap device the /root folder (~) is cleaned up at every restart.
Is there a command line option to store the settings file at another place?


#5

See the discussion at /root/.bash_profile changes aren't saved after reboot - QNAP NAS Community Forum

I haven’t tried myself, but I think the solution is to modify the autorun.sh file to recover duplicacy.json and settings.json.


#6

this crappy linux implementation from QNAP is always causing headache :frowning:
I guess I stick to the cli version


#7

I’ve been using Duplicacy command-line for a year or so on my headless server and have just switched to the Web GUI version. After installing Duplicacy as a service, I setup remote access over HTTPS using Nginx as a reverse proxy. In brief, here are the steps for Ubuntu Server 18.04.2 LTS.

Install Duplicacy

wget https://acrosync.com/duplicacy-web/duplicacy_web_linux_x64_1.0.0
sudo cp duplicacy_web_linux_x64_1.0.0 /usr/local/bin/
sudo chmod 700 /usr/local/bin/duplicacy_web_linux_x64_1.0.0
sudo ln -s /usr/local/bin/duplicacy_web_linux_x64_1.0.0 /usr/local/bin/duplicacy-web

Install as a service

sudo nano /etc/systemd/system/duplicacy.service

Paste the following:

[Unit]
Description=Duplicacy backup software`

[Service]
ExecStart=/usr/local/bin/duplicacy-web
Restart=on-failure
RestartSec=30

[Install]
WantedBy=multi-user.target

Enable and start the service

sudo systemctl enable duplicacy
sudo systemctl start duplicacy

Create settings file

mkdir ~/.duplicacy-web
nano ~./duplicacy-web/settings.json

Paste the following:

{
    "listening_address": "127.0.0.1:3875"
} 

Setup proxy bypass (I have assumed Nginx is already installed)

sudo nano /etc/nginx/conf.d/duplicacy.conf

Add the following to duplicacy.conf .

server {
  listen 80;
  server_name duplicacy.yourhost.name;

  access_log /var/log/nginx/duplicacy_access.log;
  error_log /var/log/nginx/duplicacy_error.log;
  location / {
     proxy_pass http://127.0.0.1:3875;
     proxy_set_header Host $host;
     proxy_set_header X-Real-IP $remote_addr;
     proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
  }
}

sudo nginx -t
sudo systemctl reload nginx

Make sure you have relevant entries in /etc/hosts plus DNS entries.

Enable HTTPS using Let’s Encrypt

sudo certbot --nginx --agree-tos --redirect --hsts --staple-ocsp --email you@yourdomain.com -d duplicacy.yourhost.name

That’s it. Simply point your browser to https://duplicacy.yourhost.name to access Duplicacy.