Toggle menu
Toggle preferences menu
Toggle personal menu
Not logged in
Your IP address will be publicly visible if you make any edits.

Dragonwilds:Dedicated Servers/Linux

From SAS Gaming Wiki

Linux-based Dragonwilds:Dedicated Servers can be set up with the following code (created by MikeWho3) and instructions below.

  • This is a systemctl service, and requires you to create and/or modify the user.
    • The user is dragonwilds

<syntaxhighlight lang='systemd'> [Unit] Description=RuneScape Dragonwilds Dedicated Server Wants=network-online.target After=network-online.target

[Service]

  1. Run as the server user, not root

Type=simple User=dragonwilds Group=dragonwilds

  1. The directory where the files live

WorkingDirectory=/home/dragonwilds/rs_server

  1. 0. Ensure our safe, isolated backup directory exists

ExecStartPre=/bin/mkdir -p /home/dragonwilds/dragonwilds_backups

  1. 1. Backup the config to the safe folder

ExecStartPre=/bin/bash -c "cp /home/dragonwilds/rs_server/RSDragonwilds/Saved/Config/LinuxServer/DedicatedServer.ini /home/dragonwilds/dragonwilds_backups/DedicatedServer.ini.bak || true"

  1. 2. Run SteamCMD update without the stupid destructive 'validate' flag

ExecStartPre=/home/dragonwilds/steamcmd/steamcmd.sh +force_install_dir /home/dragonwilds/rs_server +login anonymous +app_update 4019830 +quit

  1. 3. Restore the saved config file from the safe folder

ExecStartPre=/bin/bash -c "cp /home/dragonwilds/dragonwilds_backups/DedicatedServer.ini.bak /home/dragonwilds/rs_server/RSDragonwilds/Saved/Config/LinuxServer/DedicatedServer.ini || true"

  1. 4. Guarantee script is executable (in case SteamCMD wipes the permissions)

ExecStartPre=/bin/bash -c "chmod +x /home/dragonwilds/rs_server/RSDragonwildsServer.sh"

  1. The command to start the server

ExecStart=/home/dragonwilds/rs_server/RSDragonwildsServer.sh -log -NewConsole -Port=7777

  1. If the server crashes or is killed, restart it after 15 seconds

Restart=always RestartSec=15

[Install] WantedBy=multi-user.target </syntaxhighlight>

Template:Game mechanics