How to install and setup Duplicacy CLI on Synology?


#1

Hello,
I was using HubiC with Hyper Backup on my Synology but now Synology didn’t support it anymore and my backup task is corrupted (and I had many trouble with Hyper Backup anyway). So I’m looking to use Duplicacy on my Synology to backup to my HubiC account.

I have seen mention of people using is natively on Synology (by SSH) and other says they are a third party repo with a package. But I didn’t found neither clear instruction to install in CLI in SSH nor any repo with the package.

I’m not totally new to SSH and I have installed many third party tools on my Synology but I just want to be sure to do it right as backup is something very important and I must relay on it for long time once installed.

Optionally if I can use the WebUI beta on the Synology it would be top.


#2

I would recommend not installing anything directly to your storage device (even though duplicacy is a self contained executable so this is less of an issue) and instead run it in docker container. There are a bunch of ready-made duplicacy containers you can find on hub.docker.com or searching this forum or you can just make your own.

For the web GUI in the container specifically you can take a look at this post

A few people including myself put together their incarnation of container and shared it on docker hub for everyone to use or modify. FWIW I run it myself on Synology 1618


#3

I think we should make a #how-to post dealing specifically with synology (since it has issues with the ssh daemon)
I don’t have a nas (using an intel nuc for everything) so i’m asking if anyone is interested in starting that post, and we can edit it together as needed.


#4

I don’t need enterprise availability level, it’s home storage and backup, so it makes more sense to run everything I could on a single machine that run 24:7 and I choose a NAS because it’s quite economical regarding power consumption versus functionality.
I’ll try the Docket way, I had mixed results with Docker on Synology so far, especially when there need to give access to some folder and open/forward ports. For example I have Home Assistant working fine at first try but I never success to make IPFS works. Also Nextcloud was hard to setup in Docker while I had more luck by installing manually directly.


#5

Yes it would be great. What is that issue with SSH? It’s general or only related to Duplicacy?

I was thinking many time to have a separate machine for services like this, Download, IPFS, maybe a Tor Relay but at the end I don’t want to maintain 2 machines up and running 24:7, I have a quite powerful NAS, I try to do everything with it and it’s where the data are so it makes sense to have the services on it so they have direct access to data without additional load on the local network.


#6

I don’t need enterprise availability level, it’s home storage and backup, so it makes more sense to run everything I could on a single machine that run 24:7 and I choose a NAS because it’s quite economical regarding power consumption versus functionality.

Yes, I did not imply separate VM server – NAS provides sufficient performance for these types of tasks. Docker recommendation is not for high availability but simply to contain dependencies. Software is almost never built with synology toolchain and environment and synology’s linux version has severely stripped down user mode environment; docker on the other hand lets you run you software in the environment it was designed and built for which improves reliability and compatibility and isolation and as a result is much easier to install, configure and manage

I had mixed results with Docker on Synology so far

We can help you address those issues. I’m running duplicacy, Crashplan and a bunch of other tools in docker for a very long time now, also on synology units. Besides idiotic synology’s docker UI behavior that selects random local port by default – there were no issues of any kind.

Access to folders and port forwarding is never an issue – docker does not have any impact on folder permissions; Port mapping works fine but you can always run container in docker’s host network (for services that only broadcast in local subnet for example – your Home Assistant could be one of those, I haven’t used it so cannot comment)

Also Nextcloud was hard to setup in Docker while I had more luck by installing manually directly.

For most of these products there are ready-made containers, you don’t have to create you own. Also, I’d argue that these types of complex applications must be isolated – if they are compromised or just buggy – which is not “if” really due to their complexity – you want that to be preventing from impacting other Diskstation services.

Again, with Duplicacy and other golang projects either way is fine due to them being self-contained executables; but using ready-made docker image will simplify your life – all the scheduling and initialization is already done so all is left to be done is customize the config, and let it run.


#7

There is only one known quirk with how sshd on Diskstation handles notion of “home folder” so you end up needing to add another slash after the host name to specify absolute path to destination folder when you backup to Synology via SFTP:

e.g. duplicacy init blah sftp://synobox.local//backups/duplicacy <-- note extra /

So for the lack of any other synology specifics not sure if this is worthy of separate post…


#8

So I run a Docker image of Duplicacy with web UI (i named it duplicacy). I can access the web UI but HubiC is not in the storage provider list.
Is there a possibility to only add in CLI the storage hubic and then continue with Web UI ?


#9

You have several options:

In the Docker UI on Synology, you can go on the last page of Details of your running container:

and under Create select Launch with command, and specify command /bin/sh or /bin/bash:

Screen Shot 2019-03-05 at 12.24.06 PM.png

You’ll get shell process in your already running container.

You can do the same in the ssh – like so:

sudo docker exec -it saspus-duplicacy-web2 /bin/sh

Where saspus-duplicacy-web2 is your container name; this command will run /bin/sh in your already running container. If the container is not yer running - you can run it with run command instead of exec.

But I would do none of that. Your configuration directory is (should be!) mapped out to external volume - you can just modify the config files directly.