Automatically running Duplicacy Web on TrueNAS Scale Without Systemd Unit

Hello,

I’m trying to set up duplicacy web on my TrueNAS Scale server and I’m running into some problems getting it to auto start and also continue running without a shell. I can log in and run the binary and everything works fine, but if I try to run it in the background with nohup and then disown the process to log out, I get the following errors when backups attempt to run:

Running backup command from /root/.duplicacy-web/repositories/localhost/0 to back up /mnt/default
Options: [-log backup -storage b2 -threads 20 -stats]
fork/exec /root/.duplicacy-web/bin/duplicacy_linux_x64_3.2.3: function not implemented

Regarding auto starting, I tried to add a post-init task in the TrueNAS Web UI which does launch duplicacy web, however it does not see /root/.duplicacy-web at all and cannot initialize it somewhere else because the root partition is read-only on TrueNAS scale:

AFAIK this also means you can’t create a systemd service like others have recommended.

So, has anyone managed to achieve this? Is there some undocumented flag for the duplicacy-web binary that allows you to point it at a .duplicacy-web folder?

Thanks!

The common approach of running things on TrueNAS is to schedule a single script from the startups/shutdown configuration. The script can live on a separate dataset, along with all supporting files. The script shall do configuration of systemd services if they are missing (e.g. after update) before starting them.

If you cannot add system wide systemd service — add it in use scope (that goes to user home folder). I would also create a separate user for duplicacy.

You can define HOME env variable to point somewhere, .duplicacy_web folder will be created there.

Thanks, I’m not sure what the rest of that means but setting HOME in the script worked, everything seems to be good now :slight_smile:

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.