[Unit]
Description=NetHack MCP server
After=network.target
[Service]
Type=simple
User=nethack-mcp
Group=nethack-mcp
StateDirectory=nethack-mcp
StateDirectoryMode=0750
RuntimeDirectory=nethack-mcp
RuntimeDirectoryMode=0750
WorkingDirectory=/var/lib/nethack-mcp
ExecStart=/usr/bin/nethack_mcp --config /etc/nethack-mcp.toml
Restart=on-failure
RestartSec=3
UMask=0077
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
PrivateTmp=true
PrivateDevices=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
LockPersonality=true
RestrictSUIDSGID=true
RestrictRealtime=true
[Install]
WantedBy=multi-user.target