Running duplicati server as current linux user

The first time I ran duplicati (right after installation) it started as a service and the DB files were stored under ~/.config/Duplicati/ (even though in the original installation I used sudo for each command, as described in the docs). It was the case for about a week, but once I restarted the computer to install updates it started the service as root, “forgot” where the config files are, and when I imported the backup config file I exported as suggested it said the DB wasn’t correct and need to be repaired. Now it re-creates the DB files under /root/.config/Duplicati and it takes forever. Why did it change location? What should I do if it happens again?

Now it re-creates the DB files under /root/.config/Duplicati

That’s because of the way they do it and having it at /root won’t work well anyway. At least with a systemd based distro the following can work. You would have to adjust that to your distro path it uses if different and adjust the user path to your user.

sudo gedit /etc/default/duplicati
`HOME=/home/user`
systemctl restart duplicati.service

There might be something else and its not a great way to do it. I got rid of Linux recently to simplify and use only Windows now so I won’t help any further. If they have a different way now, I don’t know, but it sounds like they don’t.

2 Likes

How so? I know it’s an issue on Synology because DSM upgrades tend to wipe /root, and it’s also small.
A similar issue happens on Windows service when SYSTEM profile gets used, and Windows upgrades.
Regardless, the current imperfect plan is to locate based on Duplicati process user, and maybe $HOME.

If @itaibh could say who owns the files in ~/.config/Duplicati/ that might offer some further clues.
Or if things are good enough now, fine, but there seemed to be some curiousity about what happened…

FWIW, I just tested Linux Enable, start and check running status of the duplicati service steps, and they worked for me, starting Duplicati service as the root user. The challenge is what to do next to get into it.

Browsing to http://localhost:8200 will do it, but if one runs duplicati to get a TrayIcon, one gets a new Duplicati running as that user, not as root, and this would store its config in current linux user profile.

The TrayIcon does take a --no-hosted-server option if one would rather attach it to the server-run-as-root.
Without that, it searches for a free port (see its doc) so might take port 8300 if the service took 8200 first.

Seems like I own them…

That suggests that you had a Duplicati up as you. If you’re ever not sure, see About → System info

UserName : root

Possibly you can also check in your browser history to see if you were ever using localhost:8300.

Being able to run multiple Duplicati as different users on different ports can be a confusing feature…