Dragonwilds:Dedicated Servers/Linux
More actions
Linux-based Dragonwilds:Dedicated Servers can be set up with a systemd service and the instructions below.
This guide is tested on [https://www.debian.org/releases/bookworm/ Debian 12 (Bookworm).
Prerequisites
Before setting up the service, install the required system dependencies and prepare a dedicated user account. Running the server as root is a security risk.
System Dependencies
Run these commands from an account with sudo privileges:
<syntaxhighlight lang='bash'>
- SteamCMD and the server need 32-bit libraries — enable 32-bit support first
sudo dpkg --add-architecture i386 sudo apt update
- Install what SteamCMD and the server need
sudo apt install wget tar lib32gcc-s1 libc6:i386 libstdc++6:i386 -y </syntaxhighlight>
Manual Setup (First Run)
These steps create the dedicated user and download the server files. You only need to do this once. Skipping this phase will cause the systemd service to fail with permission errors.
1. Create the Dedicated User
Create the dragonwilds user account.
Run these commands from an account with sudo privileges:
<syntaxhighlight lang='bash'>
- Create the dragonwilds user as a user account
sudo useradd -m -s /bin/bash -U dragonwilds
- Create folders for the server and for SteamCMD
sudo -u dragonwilds mkdir -p /home/dragonwilds/rs_server sudo -u dragonwilds mkdir -p /home/dragonwilds/steamcmd </syntaxhighlight>
2. Install SteamCMD
Now switch to the dragonwilds user.
<syntaxhighlight lang='bash'>
- Switch to the dragonwilds user
sudo su - dragonwilds </syntaxhighlight>
Once you are the dragonwilds user, download and install SteamCMD:
<syntaxhighlight lang="bash">
- Go to the steamcmd folder
cd ~/steamcmd
- Download SteamCMD
wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz
- Extract it
tar -xf steamcmd_linux.tar.gz
- Run it once to finish setup (type "quit" when you see the Steam> prompt)
./steamcmd.sh </syntaxhighlight>
3. Download the Server Files
As the dragonwilds user, download the dedicated server:
<syntaxhighlight lang='bash'>
- Go to the server folder
cd ~/rs_server
- Download the Dragonwilds dedicated server (AppID: 4019830)
~/steamcmd/steamcmd.sh +force_install_dir /home/dragonwilds/rs_server +login anonymous +app_update 4019830 validate +quit
- Make the startup script runnable
chmod +x /home/dragonwilds/rs_server/RSDragonwildsServer.sh </syntaxhighlight>
4. First Start (Generate the Default Config)
The config file referenced in the next step doesn't exist yet and it's only created the first time the server binary runs. As the dragonwilds user, start the server manually once to generate it:
<syntaxhighlight lang='bash'>
- Still as the dragonwilds user, from
~/rs_server/RSDragonwildsServer.sh -log -NewConsole -Port=7777 </syntaxhighlight>
Wait until the console shows the server has finished starting up, then stop it with Ctrl+C. This first run creates DedicatedServer.ini (with a fresh, auto-generated ServerGuid) and a default "Standard" world save. Both are expected and you'll customize the config in the next step, and if you want a different starting world, that's handled in Resetting to a Fresh World below.
5. Configure the Server
As the dragonwilds user, edit the config file:
<syntaxhighlight lang='bash'> nano ~/rs_server/RSDragonwilds/Saved/Config/LinuxServer/DedicatedServer.ini </syntaxhighlight>
Fill in the settings below, then save and exit (Ctrl+O, Enter, Ctrl+X). Type exit when done to return to your account with sudo privileges.
Mandatory Settings
The server will not start without these values:
| Setting | Description |
|---|---|
OwnerId
|
Your RuneScape: Dragonwilds Player ID. It can be found in game at the bottom of the Settings Menu. Don't hesitate to use the copy button to add it to your clipboard. The server will not start without your owner ID. |
ServerName
|
The name of your server, no matter what world it may run. |
DefaultWorldName
|
Upon startup, your Dedicated Server will create a default world. This configuration value allows you to decide how you want it to be named. |
AdminPassword
|
Anyone who knows this password can enter the Server Management tab in the Pause Menu > Settings menu. They will be considered as Admins until the Admin Password is changed again. You can see the list of people who have used the Admin Password to enter the Server Management screen by going to Files > RSDragonwilds > Saved > Config > LinuxServer > DedicatedServer.ini. |
Optional Settings
| Setting | Description |
|---|---|
WorldPassword
|
Will supersede any password stored in the world. Can be left empty if you want anyone to be able to join your world. |
Changes to DedicatedServer.ini while the server is running will be lost — always stop the server first, then edit, then start.
6. Port Forwarding
The dedicated server listens on UDP port 7777. If you want players outside your local network to connect, you must forward this port on your router and any firewall between your server and the internet. If the server appears in the public list but is not join-able, port forwarding has likely failed somewhere.
To play locally, connect directly using the server's local IP address. You can find it with:
<syntaxhighlight lang='bash'> ip a </syntaxhighlight>
Resetting to a Fresh World
On startup, the server loads the latest .sav file it finds there; if the folder is empty, it generates a new default world using the values currently in DedicatedServer.ini.
To start over with a fresh world while keeping your server files and config intact:
<syntaxhighlight lang='bash'>
- As the dragonwilds user, stop the server first (see Managing the Server below)
- Clear the save folder and the server will generate a new world on next start.
rm -rf ~/rs_server/RSDragonwilds/Saved/Savegames/* </syntaxhighlight>
Then start the server normally (sudo systemctl start dragonwilds). A new world generates using the current DefaultWorldName and other values from DedicatedServer.ini.
Automation with Systemd
Once the manual setup is finished, the following systemd service automates three things:
- Starting the server automatically when the system boots
- Updating the server via SteamCMD before each start
- Restarting the server if it crashes
Service file created by MikeWho3.
1. Create the Service File
Run these commands from an account with sudo privileges:
<syntaxhighlight lang='bash'> sudo nano /etc/systemd/system/dragonwilds.service </syntaxhighlight>
Paste the following into the file:
<syntaxhighlight lang='systemd'> [Unit] Description=RuneScape Dragonwilds Dedicated Server Wants=network-online.target After=network-online.target
[Service] Type=simple User=dragonwilds Group=dragonwilds TimeoutStartSec=10min
WorkingDirectory=/home/dragonwilds/rs_server
- Make sure the backup folder exists
ExecStartPre=/bin/mkdir -p /home/dragonwilds/dragonwilds_backups
- Back up the config file before updating
ExecStartPre=/bin/bash -c "cp /home/dragonwilds/rs_server/RSDragonwilds/Saved/Config/LinuxServer/DedicatedServer.ini /home/dragonwilds/dragonwilds_backups/DedicatedServer.ini.bak || true"
- Update the server via SteamCMD
ExecStartPre=/home/dragonwilds/steamcmd/steamcmd.sh +force_install_dir /home/dragonwilds/rs_server +login anonymous +app_update 4019830 +quit
- Restore the config file after updating
ExecStartPre=/bin/bash -c "cp /home/dragonwilds/dragonwilds_backups/DedicatedServer.ini.bak /home/dragonwilds/rs_server/RSDragonwilds/Saved/Config/LinuxServer/DedicatedServer.ini || true"
- Make sure the startup script is still executable
ExecStartPre=/bin/bash -c "chmod +x /home/dragonwilds/rs_server/RSDragonwildsServer.sh"
- Start the server
ExecStart=/home/dragonwilds/rs_server/RSDragonwildsServer.sh -log -NewConsole -Port=7777
- Restart automatically if it crashes
Restart=always RestartSec=15
[Install] WantedBy=multi-user.target </syntaxhighlight>
Save and exit (Ctrl+O, Enter, Ctrl+X in nano).
2. Enable and Start
Run these commands from an account with sudo privileges:
<syntaxhighlight lang='bash'>
- Tell systemd about the new service
sudo systemctl daemon-reload
- Start the server now
sudo systemctl start dragonwilds
- Make it start automatically on boot
sudo systemctl enable dragonwilds </syntaxhighlight>
3. Managing the Server
Run these commands from an account with sudo privileges:
| Action | Command |
|---|---|
| Check if the server is running | <syntaxhighlight lang='bash' inline>sudo systemctl status dragonwilds</syntaxhighlight> |
| Stop the server | <syntaxhighlight lang='bash' inline>sudo systemctl stop dragonwilds</syntaxhighlight> |
| Restart the server | <syntaxhighlight lang='bash' inline>sudo systemctl restart dragonwilds</syntaxhighlight> |
| Watch the server logs live | <syntaxhighlight lang='bash' inline>sudo journalctl -f -u dragonwilds</syntaxhighlight> |
4. Updating the Server
Run these commands from an account with sudo privileges:
<syntaxhighlight lang='bash'> sudo systemctl restart dragonwilds </syntaxhighlight>
Restarting the service runs SteamCMD and pulls the latest version automatically.
Your DedicatedServer.ini is backed up and restored during each update.
5. Optional: Scheduled Restarts
Run these commands from an account with sudo privileges:
<syntaxhighlight lang='bash'>
sudo crontab -e
</syntaxhighlight>
When presented with a option to pick the editor choose nano and add the following line, then save and exit (Ctrl+O, Enter, Ctrl+X):
<syntaxhighlight lang='bash'>
- Restart Dragonwilds daily at 4 AM to pick up updates
0 4 * * * systemctl restart dragonwilds </syntaxhighlight>
The systemd unit runs SteamCMD before each start, so this keeps the server updated without touching your config or saves.