Dedicated Servers/Linux
Linux-based 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:
# 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
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:
# 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
2. Install SteamCMD
Now switch to the dragonwilds user.
# Switch to the dragonwilds user sudo su - dragonwilds
Once you are the dragonwilds user, download and install SteamCMD:
# 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
3. Download the Server Files
As the dragonwilds user, download the dedicated server:
# 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
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:
# Still as the dragonwilds user, from ~/rs_server/RSDragonwildsServer.sh -log -NewConsole -Port=7777
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 customise 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:
nano ~/rs_server/RSDragonwilds/Saved/Config/LinuxServer/DedicatedServer.ini
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:
ip a
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:
# 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/*
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:
sudo nano /etc/systemd/system/dragonwilds.service
Paste the following into the file:
[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 +login anonymous +force_install_dir /home/dragonwilds/rs_server +app_update 4019830 validate +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
Save and exit (Ctrl+O, Enter, Ctrl+X in nano).
2. Enable and Start
Run these commands from an account with sudo privileges:
# 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
3. Managing the Server
Run these commands from an account with sudo privileges:
| Action | Command |
|---|---|
| Check if the server is running | sudo systemctl status dragonwilds
|
| Stop the server | sudo systemctl stop dragonwilds
|
| Restart the server | sudo systemctl restart dragonwilds
|
| Watch the server logs live | sudo journalctl -f -u dragonwilds
|
4. Updating the Server
Run these commands from an account with sudo privileges:
sudo systemctl restart dragonwilds
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:
sudo crontab -e
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):
# Restart Dragonwilds daily at 4 AM to pick up updates 0 4 * * * systemctl restart dragonwilds
The systemd unit runs SteamCMD before each start, so this keeps the server updated without touching your config or saves.
Źródło: Zobacz na oficjalnej wiki (Treść pochodzi z RuneScape Wiki, CC BY-NC-SA 3.0)