Files
opendht/tools/systemd/dhtnode.service.in
T
copilot-swe-agent[bot]andaberaud 4b24f1da38 Replace deprecated systemd directives with current alternatives
Replace ReadOnlyDirectories with ReadOnlyPaths and ReadWriteDirectories with ReadWritePaths as per modern systemd.exec(5) documentation

Co-authored-by: aberaud <101827+aberaud@users.noreply.github.com>
2026-02-03 16:35:58 -05:00

44 lines
898 B
Plaintext

[Unit]
Description=OpenDHT standalone node
Documentation=man:dhtnode(1)
After=network.target
[Service]
Type=simple
User=opendht
Group=opendht
ExecStart=@bindir@/dhtnode -s $DHT_ARGS
Restart=on-failure
RestartSec=2s
LimitNOFILE=65536
DynamicUser=yes
EnvironmentFile=@sysconfdir@/dhtnode.conf
KillMode=process
WorkingDirectory=/tmp
# Hardening
CapabilityBoundingSet=CAP_NET_BIND_SERVICE
LockPersonality=yes
NoNewPrivileges=yes
PrivateDevices=yes
PrivateTmp=yes
PrivateUsers=yes
ProtectClock=yes
ProtectControlGroups=yes
ProtectHome=yes
ProtectHostname=yes
ProtectKernelLogs=yes
ProtectKernelModules=yes
ProtectKernelTunables=yes
ProtectSystem=strict
ReadOnlyPaths=/
ReadWritePaths=-/proc/self -/var/run
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6
RestrictNamespaces=yes
RestrictRealtime=yes
SystemCallArchitectures=native
SystemCallFilter=@system-service
[Install]
WantedBy=multi-user.target