How to configure the Duplicacy Web Edition as a systemd service in Linux

For anyone needing assistance with this:

3 Likes

Very useful, thank you. There are not a lot of examples that i’ve been able to find on this topic.

I was looking for something like this to run the :d:CLI on my server so i can initiate checks there rather than from the client. This will save me time :slight_smile:

I will use it on the server without the --user option, but on the future clients (i’m switching my parents to Linux thanks to Win11 hardware requirements) this reminder is appreciated:

systemctl --user start duplicacy-web.service

This tip is also gold on a multi-user system:

sudo loginctl enable-linger <username>

I did not know of that at all before now. However, i’m not sure how to use it on a system that has 3 users. I guess i will set it with my login (as i am their helpdesk, i have a login on their PC).

Putting the full content here in case the site disappears for some reason. Can this be pinned as a “How To”?

How to configure the Duplicacy Web edition as a systemd service

Introduction

The Duplicacy Web Edition is a single binary file that can be run directly from the Linux command line.

This makes it simple to run and does not require installation.

However, if you prefer to run this as a systemd service that automatically starts up in the background, you can create a custom systemd service.

Configuration

  1. Copy the Duplicacy binary file to the /usr/bin/ directory.

For example:

sudo cp duplicacy_web_linux_x64_1.8.0 /usr/bin
  1. Change the permissions to 755.
sudo chmod 755 /usr/bin/duplicacy_web_linux_x64_1.8.0
  1. Create a systemd service unit in the /usr/lib/systemd/user directory.

For example:

sudo vi /usr/lib/systemd/user/duplicacy-web.service

The contents should look like the following:

[Unit]
Description=Duplicacy Web service
After=network.target

[Service]
Type=simple
ExecStart=/usr/bin/duplicacy_web_linux_x64_1.8.0

[Install]
WantedBy=default.target
  1. Reload the systemctl daemon.
sudo systemctl daemon-reload
  1. Enable the service.
systemctl --user enable duplicacy-web.service
  1. Start the service.
systemctl --user start duplicacy-web.service
  1. Run the loginctl command with the linger option to make sure the service runs in the background even when logged off from the system.
sudo loginctl enable-linger <username>

Change <username> to your actual username.

The Duplicacy web GUI will now automatically start and run in the background as a systemd service.

2 Likes