Duplicacy as systemd service does not see keyring

Please describe what you are doing to trigger the bug:
Trying to use Duplicacy as a systemd service under linux, running like a normal user (non-root):

# /etc/systemd/system/duplicacy.service
[Service]
User=user
Group=users
ExecStart=/usr/local/bin/duplicacy.sh

Credentials were previously saved in the keyring when run as a normal user.
If run directly by a normal user - everything works as expected, Duplicacy does not ask for authentication, getting credentials from the keyring

Please describe what you expect to happen (but doesn’t):
Duplicacy gets credentials from a normal user’s keyring and uses them to authenticate

Please describe what actually happens (the wrong behaviour):
Authentication error as if Duplicacy does not see normal user’s keyring

I made it work. It was not working correctly when started as a system-wide service through systemctl’s “User=” and “Group=” unit paramenters, probably because it did not have the right environment set up for keyring to work.

However, if you start it non-privileged through “systemctl --user” - everything works as expected. So can be marked as solved.

1 Like