[Unit]
Description=Hyperident P2P Gateway
Documentation=https://github.com/hyperident-gateway
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=root
Group=root
WorkingDirectory=/home/fleeky/projects/hyperident-gateway
# Bare runtime path (adjust if different)
ExecStart=/home/fleeky/.nvm/versions/node/v20.11.0/lib/node_modules/bare/node_modules/bare-runtime-linux-x64/bin/bare gateway.js --config config/gateway-config.json
# Restart policy
Restart=on-failure
RestartSec=5s
StartLimitInterval=60s
StartLimitBurst=3
# Logging
StandardOutput=journal
StandardError=journal
SyslogIdentifier=hyperident-gateway
# Security settings
# Note: We need CAP_NET_ADMIN for TUN device creation
# Running as root for simplicity, but could use capabilities with User=fleeky
AmbientCapabilities=CAP_NET_ADMIN
SecureBits=keep-caps
# Resource limits
LimitNOFILE=65536
LimitNPROC=4096
# Environment
Environment=NODE_ENV=production
[Install]
WantedBy=multi-user.target