# A Tidewall dedicated server as a systemd service. It expects the layout the Docker # image uses: the engine at /opt/tidewall/engine/godot, the imported game in # /opt/tidewall/game, the wrapper at /usr/local/bin/tidewall-server and the # configuration in /etc/tidewall/server.cfg. Then: # # sudo cp tidewall-server.service /etc/systemd/system/ # sudo systemctl daemon-reload && sudo systemctl enable --now tidewall-server # journalctl -u tidewall-server -f # # systemctl stop sends SIGTERM to the wrapper, which asks the server to stop cleanly. [Unit] Description=Tidewall dedicated server Documentation=https://gitea.eom.dev/claude/tidewall After=network-online.target Wants=network-online.target [Service] Type=simple ExecStart=/usr/local/bin/tidewall-server --config=/etc/tidewall/server.cfg # Only the wrapper gets SIGTERM; it passes the request on and waits. KillMode=mixed KillSignal=SIGTERM TimeoutStopSec=20 Restart=on-failure RestartSec=5 DynamicUser=yes RuntimeDirectory=tidewall-server Environment=TIDEWALL_STATE=%t/tidewall-server ProtectSystem=strict ProtectHome=yes PrivateTmp=yes PrivateDevices=yes NoNewPrivileges=yes ProtectKernelTunables=yes ProtectKernelModules=yes ProtectControlGroups=yes RestrictAddressFamilies=AF_INET AF_INET6 AF_UNIX RestrictNamespaces=yes LockPersonality=yes CapabilityBoundingSet= SystemCallArchitectures=native [Install] WantedBy=multi-user.target