[email protected] 796 B

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