Files
FunConnect/deploy/funmc-server.service

37 lines
747 B
Desktop File

[Unit]
Description=FunMC Main Server - Minecraft Multiplayer Assistant API
Documentation=https://gt.funmc.cn/xiaobai/FunConnect
After=network.target postgresql.service
Requires=postgresql.service
[Service]
Type=simple
User=funmc
Group=funmc
WorkingDirectory=/opt/funmc
ExecStart=/opt/funmc/server
Restart=always
RestartSec=5
StandardOutput=journal
StandardError=journal
SyslogIdentifier=funmc-server
# 环境变量
Environment=RUST_LOG=funmc_server=info,tower_http=info
Environment=LISTEN_ADDR=0.0.0.0:3000
EnvironmentFile=/opt/funmc/.env
# 安全限制
NoNewPrivileges=yes
ProtectSystem=strict
ProtectHome=yes
ReadWritePaths=/var/log/funmc
PrivateTmp=yes
# 资源限制
LimitNOFILE=65536
LimitNPROC=4096
[Install]
WantedBy=multi-user.target