Files
c-relay/systemd/c-relay.service
2025-09-06 07:12:47 -04:00

43 lines
868 B
Desktop File

[Unit]
Description=C Nostr Relay Server
Documentation=https://github.com/your-repo/c-relay
After=network.target
Wants=network-online.target
[Service]
Type=simple
User=c-relay
Group=c-relay
WorkingDirectory=/opt/c-relay
ExecStart=/opt/c-relay/c_relay_x86
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=c-relay
# Security settings
NoNewPrivileges=true
ProtectSystem=strict
ProtectHome=true
ReadWritePaths=/opt/c-relay/db
PrivateTmp=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
# Network security
PrivateNetwork=false
RestrictAddressFamilies=AF_INET AF_INET6
# Resource limits
LimitNOFILE=65536
LimitNPROC=4096
# Environment variables (optional)
Environment=C_RELAY_CONFIG_PRIVKEY=
Environment=C_RELAY_PORT=8888
Environment=C_RELAY_HOST=127.0.0.1
[Install]
WantedBy=multi-user.target