syncthing.service 722 B

123456789101112131415161718192021222324252627
  1. [Unit]
  2. Description=Syncthing - Open Source Continuous File Synchronization
  3. Documentation=man:syncthing(1)
  4. StartLimitIntervalSec=60
  5. StartLimitBurst=4
  6. [Service]
  7. Environment="STLOGFORMATTIMESTAMP="
  8. Environment="STLOGFORMATLEVELSTRING=false"
  9. Environment="STLOGFORMATLEVELSYSLOG=true"
  10. ExecStart=/usr/bin/syncthing serve --no-browser --no-restart
  11. Restart=on-failure
  12. RestartSec=1
  13. SuccessExitStatus=3 4
  14. RestartForceExitStatus=3 4
  15. # Hardening
  16. SystemCallArchitectures=native
  17. MemoryDenyWriteExecute=true
  18. NoNewPrivileges=true
  19. # Elevated permissions to sync ownership (disabled by default),
  20. # see https://docs.syncthing.net/advanced/folder-sync-ownership
  21. #AmbientCapabilities=CAP_CHOWN CAP_FOWNER
  22. [Install]
  23. WantedBy=default.target