[Unit] Description=RotRouter - N1MM antenna rotator router Wants=network-online.target After=network-online.target [Service] Type=simple Environment=ROTROUTER_CONFIG=/etc/rotrouter/config.json Environment=ROTROUTER_PUBLIC=/usr/share/rotrouter/public ExecStart=/usr/bin/node /usr/lib/rotrouter/rotrouter.cjs Restart=on-failure RestartSec=5 # Run as an unprivileged user that systemd allocates on start and releases on # stop; nothing has to be created at install time. Ports 8787 (HTTP) and # 12040 (N1MM UDP) are above 1024, so no capabilities are needed. User=rotrouter DynamicUser=yes CapabilityBoundingSet= AmbientCapabilities= NoNewPrivileges=yes UMask=0077 # Read-only view of the system; the service writes nothing to disk. ProtectSystem=strict ProtectHome=yes PrivateTmp=yes PrivateDevices=yes ProtectProc=invisible ProcSubset=pid ProtectClock=yes ProtectHostname=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectKernelLogs=yes ProtectControlGroups=yes RestrictAddressFamilies=AF_INET AF_INET6 RestrictNamespaces=yes RestrictRealtime=yes LockPersonality=yes SystemCallArchitectures=native SystemCallFilter=@system-service SystemCallErrorNumber=EPERM # MemoryDenyWriteExecute is deliberately not set: V8's JIT needs W+X memory. [Install] WantedBy=multi-user.target