Headless Duplicati on CentOS (Guide)

This is more or less split from:

My Use Case

I have a CentOS VM that mounts my entire NAS over NFS (read-only) so that it can back it up to various places in various ways. I’m using Duplicati for encrypted, incremental backups to Google Drive. When I set it up, I found the documentation for a headless CentOS install was kind of scattered. As a result, I figured it might be useful to consolidate it here.

Commands

This should work on a vanilla CentOS install (run as root or use sudo).

yum install yum-utils

rpm --import "http://keyserver.ubuntu.com/pks/lookup?op=get&search=0x3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF"

yum-config-manager --add-repo http://download.mono-project.com/repo/centos7/

yum install mono-devel

yum install epel-release

yum install libappindicator

curl -O https://updates.duplicati.com/beta/duplicati-2.0.3.3-2.0.3.3_beta_20180402.noarch.rpm #get updated link from https://www.duplicati.com/download

yum install duplicati*

firewall-cmd --add-port=8200/tcp --permanent
firewall-cmd --reload

echo "[Unit]
Description=Duplicati Backup software
[Service]
ExecStart=/usr/bin/mono /usr/lib/duplicati/Duplicati.Server.exe --webservice-interface=any
Restart=on-failure
RestartSec=30
[Install]
WantedBy=multi-user.target" > /etc/systemd/system/duplicati.service

systemctl enable duplicati
systemctl start duplicati

Web GUI

From there, you can go to http://ipaddress:8200/ and configure your backups with the web gui. It’s pretty self-explanatory, but the official documentation is good from that point if you need help.

I didn’t run into any conflicts with SELinux, but as always, it could rear it’s ugly head if you’re backup up from somewhere it thinks should be protected.

That’s It!

I hope someone finds this useful! Any suggestions for additions/revisions are welcome.

Special thanks to @Ruffalo for turning me on to Duplicati.

2 Likes

If you do run a GUI, you will want to run with “–no-hosted-server --server-url=http://localhost:8200” to get the trayicon. The way Duplicati does it by default is pretty stupid, with the GUI trayicon also running the server.

I suggest setting your upload volume size to at least 250MB just to limit the number of files. I use 500MB myself.

Also there are a number of settings you’ll need for email notifications.

send-mail-from (whatever you want)
send-mail-to (address to send to)
send-mail-username (a Gmail username, not necessarily your main one)
send-mail-password (Gmail application password if you have 2FA setup)
send-mail-url (smtps://smtp.gmail.com for Gmail)
send-mail-level (All to test, then Warning,Error,Fatal)

1 Like

Are those mail settings also just tagged onto the executable?

ExecStart=/usr/bin/mono /usr/lib/duplicati/Duplicati.Server.exe [email protected]

Seemed like everything was done that way and not through a config file.

No, you go to Settings, Add Advanced Setting and then select each one from the dropdown. It’s not the most elegant configuration ever.

1 Like

Got it. Thanks for clarifying.

Thank you this helped me tremendously!
How is this not on the official website???

Again, great work, thank you :blush:

1 Like

thanks so much, ¡you saved me!, really thanks

1 Like