How to make Duplicati start automatically with Ubuntu?

#1

According to how I understand the material I have read so far on Duplicati, it can be set to start up automatically when I (re)boot Ubuntu, but I can’t see that setting anywhere, and it does NOT start automatically with Ubuntu (18.04).
Thank you.

1 Like
Can't restore from linux to Windows
#2

I’m not sure if the ubuntu DEB installs a systemd file (it should). If it did, just run:

sudo systemctl enable duplicati

If this fails, you don’t have a systemd file. You can grab the file here:
https://raw.githubusercontent.com/duplicati/duplicati/master/Installer/debian/debian/duplicati.service

Put that file in /etc/systemd/system

Then run the command above. And it will auto-start duplicati.
You can then use sudo systemctl start duplicati and sudo systemctl stop duplicati to start or stop the service.

2 Likes
#3

Thank you! It seems to work. Copy from Terminal:

henrik@Henrik-L570:~$ sudo systemctl enable duplicati
[sudo] password for henrik:
Created symlink /etc/systemd/system/multi-user.target.wants/duplicati.service → /lib/systemd/system/duplicati.service.
henrik@Henrik-L570:~$

#4

NO! I didn’t work! I have restarted Ubuntu, and Duplicati isn’t running.
(At least the icon is not shown!)

1 Like
#5

The icon comes from the tray-icon (Duplicati.GUI.TrayIcon.exe), what you enabled (with @prez’s help) was the SERVICE.

The service is actually the important part where Duplicati does it’s thing - it will even run scheduled backups even if the tray icon isn’t showing or a user isn’t logged into the computer.

If you want the tray icon to start when you log into the the computer, you’ll need to add the tray-icon to your session / startup info.

Note that different distributions may work differently, but this should give you a starting point…

#6

Hi!

Thank you for your response.
But My Duplicati does NOT look like yours.
My Duplicati has a web interface - http://localhost:8300/ngax/index.html - with the following menu:

Home
Add backup
Restore
Settings
About
Log out

So I don’t know what you are talking about?

Best regards,
Henr

#7

Henr,

If you followed my instructions, the service should be running.

You can confirm this by running: ps -ef | grep -i Duplicati

You should see output similar to:
root 8144 1 0 Jun14 ? 00:00:00 DuplicatiServer /usr/lib/duplicati/Duplicati.Server.exe
root 8834 8144 51 Jun14 ? 1-04:13:35 /usr/bin/mono-sgen /usr/lib/duplicati/Duplicati.Server.exe

It might not be exactly the same, but that does show it is running. You should also be able to open your web browser to http://localhost:8200 and see your duplicati config screen.

The tray icon is not how you know if duplicati is running - the tray icon is more a way to start it manually (kind of). If you want to run something automatically, and in the background, even if you have not yet logged in, you have to do it as a service, which is what the instructions I gave you achieve. But you won’t have a tray icon if you do it that way (but it WILL be running).

#8

Hi prez

Yes, thank you! That ‘ps’ command gives me a similar result (+3 lines more about GUI.TrayIcon).

It’s just a bit frustrating and confusing that the other guy - JonMikelV - refers to a screen/menu that I haven’t seen/found…

  • Henr
1 Like
#9

Sorry if I made things more confusing. The screens I showed were not Duplicati specific, they are generic “here’s how you can get ANY app to start when you log into Ubunutu based LinuxLite” steps that just happen to be using Duplicati as the app to be started.

@prez is spot on in his explanation so feel free to ignore what I’ve said and. :slight_smile:

#10

I ran this, nothing was returned, and Duplicati does not start at startup.

Ubuntu 18.04.2 LTS

http://localhost:8300/ngax/index.html says “Unable to connect”.

If I start Duplicati from Applications → System Tools, then that URL works, but it doesn’t start at startup.