Skip to content

Instantly share code, notes, and snippets.

@mozarcik
Created December 14, 2020 08:33
Show Gist options
  • Save mozarcik/495b741ae9224093ea7575adc1da51b7 to your computer and use it in GitHub Desktop.
Save mozarcik/495b741ae9224093ea7575adc1da51b7 to your computer and use it in GitHub Desktop.
cat /usr/lib/systemd/system/syncthing@.service
[Unit]
Description=Syncthing - Open Source Continuous File Synchronization for %I
Documentation=man:syncthing(1)
After=network.target
[Service]
User=%i
ExecStart=/usr/bin/syncthing -no-browser -no-restart -logflags=0
Restart=on-failure
RestartSec=5
SuccessExitStatus=3 4
RestartForceExitStatus=3 4
# Hardening
ProtectSystem=full
PrivateTmp=true
SystemCallArchitectures=native
MemoryDenyWriteExecute=true
NoNewPrivileges=true
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment