M2.7: Host Game, backups, launchd/systemd samples, hosting and Tailscale guide
This commit is contained in:
36
server/emberwild-server.service
Normal file
36
server/emberwild-server.service
Normal file
@@ -0,0 +1,36 @@
|
||||
# Emberwild dedicated server as a systemd service (Linux).
|
||||
#
|
||||
# 1. Put the game where it'll live, e.g. /opt/emberwild (a git clone), and
|
||||
# install Godot 4.7+ as /usr/local/bin/godot.
|
||||
# 2. Make a user for it: sudo useradd -r -m -d /var/lib/emberwild emberwild
|
||||
# 3. Copy this file: sudo cp server/emberwild-server.service /etc/systemd/system/
|
||||
# and edit User, WorkingDirectory and GODOT below if yours differ.
|
||||
# 4. Start it, and on boot: sudo systemctl enable --now emberwild-server
|
||||
# Logs: journalctl -u emberwild-server -f
|
||||
# Stop / restart: sudo systemctl stop|restart emberwild-server
|
||||
#
|
||||
# server.json and the world live in the user's Godot data folder:
|
||||
# /var/lib/emberwild/.local/share/godot/app_userdata/Emberwild/server/
|
||||
# Admin commands: join the game and use chat (/help), or edit server.json and
|
||||
# restart. (The console needs a terminal, so it isn't used here.)
|
||||
|
||||
[Unit]
|
||||
Description=Emberwild dedicated server
|
||||
After=network-online.target
|
||||
Wants=network-online.target
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=emberwild
|
||||
WorkingDirectory=/opt/emberwild
|
||||
Environment=GODOT=/usr/local/bin/godot
|
||||
# run_server.sh checks the Godot version and imports a fresh copy first.
|
||||
ExecStart=/opt/emberwild/server/run_server.sh
|
||||
Restart=on-failure
|
||||
RestartSec=10
|
||||
# The world saves within 10 s of any change, so a stop loses at most that.
|
||||
KillSignal=SIGINT
|
||||
TimeoutStopSec=20
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
||||
Reference in New Issue
Block a user