New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add hardening options to systemd units #5286

Kriechi opened this Issue Oct 23, 2018 · 1 comment


None yet
2 participants
Copy link

Kriechi commented Oct 23, 2018

Feature request / request for comments:

systemd provides various options to increase security and control to the kernel and various filesystem paths:

I have used the following set in various other service / unit files:

      # ProtectHome=true (probably would block syncthing from creating new folders et al)

strelaysrv already includes some of these options:


syncthing does not include any at the moment:

There is an open PR for discosrv that includes similar options as strelaysrv:
(stale PR, should be closed - at least in that repo)

I would be interested in your thoughts or guidelines on improving service security by adding some of these options. Do you see a benefit? Would you recommend them - or even add them to the template service file included in the deb packages?

Version Information

OS Version: Ubuntu / Debian / Linux


This comment has been minimized.

Copy link

calmh commented Oct 23, 2018

Some of these should be fine to enable (the kernel stuff) but also mostly irrelevant as syncthing should not run as root. Others I don't know. Needs someone who knows systemd, and some testing.

@calmh calmh added the enhancement label Oct 23, 2018

@calmh calmh closed this in #5351 Dec 7, 2018

calmh added a commit that referenced this issue Dec 7, 2018

@calmh calmh added this to the v0.14.55 milestone Dec 11, 2018

@calmh calmh changed the title Security: systemd service hardening Add hardening options to systemd units Dec 11, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment