[Unit] Description=PON Fleet web server (MCMS tools, multi-user) Documentation=https://git.vanvikinternet.no/Svorka/ponfw After=network-online.target Wants=network-online.target [Service] Type=simple User=ponfw Group=ponfw # The repo is cloned to /opt/ponfw; the server lives in its web/ subdir. WorkingDirectory=/opt/ponfw/web ExecStart=/usr/bin/env node server.js # Defaults; override anything in /etc/pon-fleet-web.env (optional). Environment=NODE_ENV=production EnvironmentFile=-/etc/pon-fleet-web.env Restart=on-failure RestartSec=3 # --- Hardening (the app reads its repo, writes nothing to disk) --- NoNewPrivileges=true PrivateTmp=true ProtectSystem=strict ProtectHome=true ProtectKernelTunables=true ProtectKernelModules=true ProtectControlGroups=true RestrictSUIDSGID=true RestrictNamespaces=true LockPersonality=true # V8 needs writable+executable memory for its JIT, so do NOT deny W^X. MemoryDenyWriteExecute=false [Install] WantedBy=multi-user.target