Dedicated Servers/Linux

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:

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:

2. Install SteamCMD

Now switch to the dragonwilds user.

Once you are the dragonwilds user, download and install SteamCMD:

3. Download the Server Files

As the dragonwilds user, download the dedicated server:


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:

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:

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:

SettingDescription
OwnerIdYour 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.
ServerNameThe name of your server, no matter what world it may run.
DefaultWorldNameUpon startup, your dedicated server will create a default world. This configuration value allows you to decide how you want it to be named.
AdminPasswordAnyone 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

SettingDescription
WorldPasswordWill 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:

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:

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:

Paste the following into the file:

Save and exit (Ctrl+O, Enter, Ctrl+X in nano).

2. Enable and Start

Run these commands from an account with sudo privileges:

3. Managing the Server

Run these commands from an account with sudo privileges:

ActionCommand
Check if the server is runningsudo systemctl status dragonwilds
Stop the serversudo systemctl stop dragonwilds
Restart the serversudo systemctl restart dragonwilds
Watch the server logs livesudo journalctl -f -u dragonwilds

4. Updating the Server

Run these commands from an account with sudo privileges:

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:

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):

The systemd unit runs SteamCMD before each start, so this keeps the server updated without touching your config or saves.