Server administration (Wurm Unlimited)

From Wurmpedia
Jump to: navigation, search
Wurm unlimited 25pc.png

This article is intended for advanced users that wish to run a dedicated Wurm Unlimited server. This is not a requirement for playing Wurm Unlimited. Please see the Getting Started guide for running Wurm Unlimited with the bundled server.

Installation

General Requirements

Network Configuration

The following ports will need to be opened:

8766 TCP/UDP
Required for general Steam communication.
27016-27030 UDP
Required for Steam queries. This allows the server browsers to see your server through Steam.
3724 TCP
The Wurm Unlimited server communicates with clients on this port. (This port may be modified, see Local Server Configuration)

The following ports should be allowed by your firewall only if you are using multiple servers. Even then, you should ensure that your network security only allows traffic from known sources to these ports:

7220, 7221 TCP
Warning: Do not under any circumstances open these ports to external access. These are ports used for RMI and intra-server communication. These must be open on the local machine but should NOT be publicly available. They bind to the Local IP address. (These ports may be modified, see Local Server Configuration)

Note: Your server will start without the Steam ports opened, but it will only be visible on the LAN tab of the server browser, and only to local clients.

If your ports are opened on your system's firewall, you may need to have your router forward those ports to your local area IP address. Please refer to your router's manual or your ISP for information on configuring port forwarding on your router.

Read more: Required Ports for Steam

Windows & Linux

Please see the Getting Started guide for information on installing Steam. Once installed, you will find the Wurm Unlimited Dedicated Server under the Tools category of your Steam library. Once installed, you may launch the server by double-clicking the icon on your desktop or by using Steam to launch it. Alternatively, you may launch the server directly by running WurmServerLauncher in the server's installation folder.

The dedicated server comes with a Java Runtime Environment (JRE) on both platforms, but you may install one for additional debugging tools.

Headless

The Wurm Unlimited Dedicated Server may be run on a headless system. This means that the server may be started from the command line without a graphical interface. You will need to install SteamCMD, from the instructions here: https://developer.valvesoftware.com/wiki/SteamCMD

  • Headless mode is not officially supported by Code Club. The instructions provided have been tested on and are intended for an Ubuntu/Debian system.
  • You must have good knowledge of SQL as well as command-line utilities to run the server in a headless state.
  • It's highly recommended that you run the dedicated server on a local system with a graphical interface to perform the initial set up of your server and then copy that server's folder to your headless system.

If you see an error: [S_API FAIL] SteamAPI_Init() failed; unable to locate a running instance of Steam, or a local steamclient.so., you can resolve it by typing this into your root folder:

cp ./linux64/steamclient.so ./nativelibs

To install the server, run SteamCMD and log in with: login <account> <password> or login anonymous. Next you set the install folder by typing force_install_dir <folder name>, for example: force_install_dir wu. Finally, start the update with app_update 402370.

Multi-Server

A multi-server setup requires more detailed configuration.

Running the Server

Windows

You may run the server from within Steam, or by double-clicking the icon on your desktop. Alternatively you may run WurmServerLauncher.exe from the installation folder.

Linux Headless

The Standard Widget Toolkit for GTK+ Java library and a virtual frame buffer such as Xvfb will need to be installed:

sudo apt-get install libswt-gtk-3-java xvfb
Xvfb :99 &
export DISPLAY=:99

Once installed, you can launch the server and automatically start it by going into the install folder and typing either ./WurmServerLauncher start=<ServerFolder>. Example: ./WurmServerLauncher start=Creative

Command Line Arguments

The server launcher accepts the following command line arguments:

adminpwd=<password>
Unlocks the admin commands from within the game, that can be used to change the gameplay settings of the server, such as skill gain rate and field growth time.
epicsettings=<true/false>
If true the server will follow the rules from the Epic servers in Wurm Online. For instance it will use the skill curve.
externalport=<port>
Used to set the port which the client connects through (Default 3724 TCP)
homeserver=<true/false>
If the server is a home server ( belongs to a single kingdom ).
homekingdom=<id>
The kingdom the server belongs to.
ip=<ip address>
The ip the server will bind to.
loginserver=<true/false>
Defaults to true, should only be set to false if the server is intended to be connected with another server that is going to act as a loginserver.
maxplayers=<number>
Sets the max number of players allowed on the server, if this is set through this command line option then the internal game commands to change the player limit will not work.
pvp=<true/false>
Toggles PvP on or off on the server.
queryport=<port>
Used to set the steam query port (27016-27030 UDP)
rmiport<port>
Used for server to server communication.
rmiregport=<port>
Used for server to server communication.
servername=<name>
The name of the server that will be visible in server browsers. If the name contains spaces, surround it with "". For example servername="my private server"
serverpassword=<password>
Sets the password that is used when trying to connect to the server.
start=<name>
Starts the launcher with the configuration and world data from the subdirectory specified in <name>.

Launcher Configuration

Under most circumstances the server should run without needing customisation of its launch configuration. If necessary however, configuration of the server launcher may be done by editing the configuration file in the following location within your steam folder: steamapps\common\Wurm Unlimited Dedicated Server\LaunchConfig.ini

This file contains the options for starting the Java runtime. To override the in-built runtime that is used, set the following options in the Runtime section (replace with your own Java path):

OverrideJavaRegEntry=true
JavaPath=C:\Program Files\Java\jdk1.8.0_60\jre\bin\server

User Interface

On launch, the server GUI should appear:

Select Game Database

WU Server GUI - Select Game Database.png

Select database to use
This selects the directory from which the world will be loaded. This list is populated from the game subdirectories of the server executable.
Start Server
Starts the server with the current configuration.
Seconds to shutdown
Controls the number of seconds to wait after the shutdown button is pressed before initiating shutdown.
Reason for shutdown
When shutdown is initiated, this is broadcast to players as the reason for the shutdown.
Shutdown server
Initiates server shutdown, as configured by the seconds to shutdown and reason for shutdown.
Modify the current selected database
These allow modification of the currently selected database. A database may be renamed, deleted, or copied under a new name.

Local Server

This controls aspects of the main server

1. Server Settings

WU Server GUI - Local Server - Server Settings.png

Server Name
This names the server, and will be the name that appears in the server browser lists in the Wurm Unlimited client.
Server External IP Address
This is the IP address of the computer on which the server is run. For a new server, this is the external IP address detected by the configuration application for the computer on which it has been launched. When it is run, the server will attempt to bind to this IP address. Note that for computers on a LAN, this will be the IP address of the computer on that LAN. Linux users in particular should check this field, as it may default to 127.0.0.1 if the autodetection fails.
Server External IP Port
This is the port on which the server will communicate with clients.
Steam password
Servers may allow any Wurm Unlimited client to connect, or to restrict access to those with the required password. If set, players need to provide this in order to connect to your server.
Maximum number of players.
This sets the limit on the maximum number of players allowed at any one time. When the server reaches its maximum, no players will be able to connect until another has disconnected.
Allow PvP
Allows player-versus-player combat, building destruction and theft.
Epic settings
Turns on Epic mode, where skillgain is faster and missions affect Valrei.
Home server
A Home server can only have settlements from one kingdom.
Kingdom
For Home servers, this value indicates the kingdom to which the server belongs. Built-in kingdom values are:
  • 0 - No kingdom
  • 1 - Jenn-Kellon
  • 2 - Mol-Rehan
  • 3 - Horde of the Summoned
  • 4 - Freedom
Message of the day
A message to display upon login

2. Advance Server Settings

WU Server GUI - Local Server - Advanced Server Settings.png

Server ID
This number is a unique identifier for the server in a server cluster. When the server gui is first launched with no preconfigured servers, this number is randomly generated so as to avoid clashing with any existing servers ids.
Server Internal IP Address
This is the IP address that is used to communicate with other servers. When it is run, the server will attempt to bind to this IP address for inter-server communication. This is also the IP that the RMI ports will bind to.
Note: For security purposes, this should be a LAN IP or the local loopback (127.0.0.1). Set to an external (public) IP at your own risk.
Server Internal IP Port
This is the port on which the server will communicate with other servers in a multi-server environment.
RMI Registration Port
The server allows commands to be executed and information retrieved through Java RMI (Remote Method Invocation). This port is the registration port for RMI calls. RMI is not enabled unless USE_INCOMING_RMI is set to true in the configuration file.
RMI Port
This is the port over which Remote Method Invocation calls are made. RMI is not enabled unless USE_INCOMING_RMI is set to true in the configuration file.
Intra server password
When running multiple servers together, this is password is used for cross-server communication.
Login server
The login server is the central cluster node responsible for bank accounts and cross communication
Test server
Running as a test server turns on a number of additional settings and debug options.
Random spawn points
If set, new players with spawn in a randomised location unless a permanent kingdom village is set. If a server has spawn items in the world (eg. Soulstones), the spawn location will be based on one of these items chosen at random.
Spawnpoint x
Where players generally spawn, tile x.
Spawnpoint y
Where players generally spawn, tile y
Kingdom 2 spawnpoint x
Where kingdom 2 players spawn, tile x
Kingdom 2 spawnpoint y
Where kingdom 2 players spawn, tile y
Kingdom 3 spawnpoint x
Where kingdom 3 players spawn, tile x
Kingdom 3 spawnpoint y
Where kingdom 3 players spawn, tile y
Note: If no spawn items exist, the location will be on a tile chosen at random in the world, providing it satisfies the following constraints:
  • Height greater than -1
  • Steepness < 20

3. Gameplay Tweaks

WU Server GUI - Local Server - Gameplay Tweaks.png

Skill gain rate multiplier
Multiplies the server skill gain rate. Higher means faster skill gain. It's not exact depending on a number of factors.
Characteristic start value
Start value of Characteristics such as body strength, stamina and soul depth
Mind Logic skill start value
Start value of Mind Logic Characteristic (used for controlling vehicles)
Body Control skill start value
Start value of Mind Logic Characteristic (used for controlling mounts)
Fight skill start value
Affects start value of the overall fighting skill
Overall skill start value
Start value of all other skills
Player combat rating modifier
Modifies player combat power versus creatures
Action speed multiplier
Divides the max standard time an action takes. Higher makes actions faster.
Hota Delay
The time in minutes between Hunt Of The Ancients rounds
Max Creatures
Maximum number of creatures in the world.
Aggressive Creatures
Approximate maximum percentage of aggressive creatures in the world.
Settlement upkeep enabled
If enabled, settlements require upkeep money. Once a settlement runs out of upkeep it is disbanded.
No deeding costs
If enabled, deeding is free and costs no money
Trader max money
The max amount of money a trader will receive from the pool
Trader initial money
The initial amount of money a trader will receive from the pool
Minimum mining hits required
The minimum number of times you need to mine before a wall disappears
Breeding time modifier
A modifier which makes breeding faster the higher it is.
Field growth timer, hour
The number hours between field growth checks
Tree Spread Odds
Chance for a Tree with a Sprout to propagate, value is used a % as x/100 chance to propagate.
Money pool
This is the amount of money that will be in the money pool after server restart.

4. Twitter Settings

The Twitter Settings dropdown contains optional values that, if set, determine what credentials the server uses to post to Twitter.

WU Server GUI - Local Server - Twitter Settings.png

Consumer key
Twitter consumer key
Consumer secret
Twitter consumer secret
Application token
Twitter application token
Application secret
Twitter application secret

5. Maintenance

WU Server GUI - Local Server - Maintenance.png

Maintenance
Select to start the server in maintenance mode. A server in maintenance mode does not allow any players of power 0 to connect. Players set to 1 or higher will still be able to connect.

Server Neighbors

This tab allows configuration of the network settings for connecting to server neighbours.

WU Server GUI - Server Neighbors.png

1. Server Settings

Server Name
Name of the neighboring server.
Server ID
This number is a unique identifier for the server in a server cluster.
Server External IP Address
External IP of the neighboring server.
Server External IP Port
Port of the neighboring server.
Server Internal IP Address
This is the IP address that is used to communicate with other servers.
Server Internal IP Port
This is the port on which the server will communicate with other servers in a multi-server environment.
RMI Registration Port
The server allows commands to be executed and information retrieved through Java RMI (Remote Method Invocation). This port is the registration port for RMI calls. RMI is not enabled unless USE_INCOMING_RMI is set to true in the configuration file.
RMI Port
This is the port over which Remote Method Invocation calls are made. RMI is not enabled unless USE_INCOMING_RMI is set to true in the configuration file.
Intra server password
When running multiple servers together, this is password is used for cross-server communication.
Login server
The login server is the central cluster node responsible for bank accounts and cross communication

Server Travel

This tab configures the direction of travel to neighboring servers. Neighbors need to be configured in the Server Neighbors tab before they will appear in this one.

WU Server GUI - Server Travel.png

North
Drop-down box to select a server in the current cluster to transfer players to when they travel north.
South
Drop-down box to select a server in the current cluster to transfer players to when they travel south.
East
Drop-down box to select a server in the current cluster to transfer players to when they travel east.
West
Drop-down box to select a server in the current cluster to transfer players to when they travel west.

Players

This tab allows changes to specific players

WU Server GUI - Players.png

Select Player
A drop-down box that will populate with players as they are created on the server. You may need to switch to another tab and back to see players created after you've viewed the tab.

Once a player has been chosen from the drop-down, the following options are available:

Player Name
The name of the player.
Position in X
The X position of the player.
Position in Y
The Y position of the player.
Note: These are real X and Y positions, not tile positions.
Player Game Management Power
A value that represents the player's current GM level.
  • 0 - Normal Player. Cannot use any wands.
  • 1 - Hero: Has limited abilities and can mostly move around invisible and teleport but not see character details or affect anything. They can be given a wand of teleportation to move around with.
  • 2 - GM: Standard GM-level. This level and above can set players as CA or CM, move players, ban players, lookup player information etc. This level can use the ivory wand to invoke various GM powers.
  • 3 - High God: A higher level than GM. There's no significant difference in power between a High God and a GM.
  • 4 - Arch GM: High level GM that can spawn items and creatures, set skills, shutdown servers, and so on. This level can do nearly everything a level 5 can and has the ability to use the ebony wand as well as the ivory wand.
  • 5 - Implementor: Highest level, very little difference from Arch GM.
Server ID of the player
The server ID where the player is currently located. Changing this to a bad value will make the player unable to log in.
Whether the player is undead
Allows the player to play as undead.

Server Configuration file

On startup, the server reads from the wurm.ini file in the folder of the server that is loaded from the interface or with the start= argument. This configuration file (details of the syntax are specified by Java's Properties.load method) sets a number of parameters:

Terrain and Resources

CAVEIMG
When true, the ores on the map will be saved to a file named Ore.png in the server directory on startup. If not specified, defaults to false.
CREATESEEDS
If true, on startup the server will assign random forage/botanize resources to random tiles. If not specified, defaults to false.
PROSPECT
When true, randomly changes any non-exposed ores in the rock layer and sets itself to false when the configuration file is saved. If not specified, defaults to false.

Database Connections

DB_HOST
Use the specified directory for the database. This option is ignored if the server world directory is chosen through the GUI.
USE_LOGIN_DB
When true, uses a separate directory for the login database, otherwise uses the same database directory as DB_HOST. If not specified, defaults to false.
LOGIN_DB_HOST
Specifies the directory for the login database. This option is ignored unless USE_LOGIN_DB is true.

Challenge and Epic

CHALLENGEDAYS
Only used if STARTCHALLENGE is true. The number of days for the challenge timer to run. If not specified, defaults to 30.
STARTCHALLENGE
Sets the start and end timers on a challenge server, using the duration specified in CHALLENGEDAYS.
WEB_PATH
Certain data such as player ranking, battles and Valrei map entities are written to xml files. This config item specifies the path in which these file will be created.

Multi-Server

USE_INCOMING_RMI
When true, the server will listen and respond to incoming messages via Java Remote Method Invocation (RMI), which allows command execution and querying by external systems. If not specified, defaults to false. Note that this option should not be enabled without first securing the server host ports, and is not recommended that this be run on a multi-user host as RMI is not inherently secure.
IS_GAME_SERVER
When true, indicates that direct login is allowed on this server. It is possible to configure a cluster of servers such that one acts as a dedicated login server, in which case the login server would have this set to false while the others would be true. If not specified, defaults to true.

Logging

These settings control the mechanisms and amount of logging that is performed.

DEVMODE
Turns on additional logging and disables email sending. If not specified, defaults to false.
LAG_THRESHOLD
Certain long-running operations are logged if they are over a certain threshold, as specified in milliseconds by LAG_THRESHOLD. If not specified, defaults to 1000.
PLAYERLOG
Indicates the log file to which player statistics will be written at regular intervals. Must have a .log extension and write access or the default will be used. The syntax of the file path may be in standard Java path format, eg.
PLAYERLOG=d:/path/to/players.log
and may be an absolute or a relative path, eg:
PLAYERLOG=logs/numplayers.log
If backslash path characters are preferred on a Windows environment, they need to be escaped:
PLAYERLOG=d:\\path\\to\\players.log
If not specified, defaults to numplayers.log in the server directory.
USE_DATABASE_FOR_SERVER_STATISTICS_LOG
When true, server statistics will be logged to the wurmlogs database. This is in addition to MRTG logging. If not specified, defaults to false.
USE_ITEM_TRANSFER_LOG
When true, item transfers are logged to the database.
USE_TILE_LOG
When true, logs tile event details to the database. If not specified, defaults to false.

Maintenance/Diagnostics

ANALYSE_ALL_DB_TABLES
When true, analyses database tables on startup. If not specified, defaults to false.
CHECK_WURMLOGS
When true, checks the logs database tables if and only if a database table maintenance task option (ANALYSE_ALL_DB_TABLES) is also true. This is usually a long running task. If not specified, defaults to false.
CRASHED
When true, players have their fatigue reset and are given full sleep bonus on startup. This setting is not automatic, and needs to be set to true or false manually. If not set, defaults to false.
MAINTAINING
When true, indicates that the server is running in maintenance mode, in which only players with power level > 0 may log in. If not specified, defaults to false.
PRUNEDB
If true, removes old players from the database. Players are removed only if all of the following hold:
  • Player is power 0
  • Playing time is less that one day
  • The player last logged out at least three months ago
  • Player payment expiry date is 0
Note: If all the above hold and the player has more than 5 silvers in the bank, 5 silvers is deducted, last logout is set to current time and an email is sent warning of impending account deletion. If not specified, defaults to false.

Advanced

The following options are for advanced users only. Changing these may adversely affect your server and is not recommended for live servers without testing.

NUMBER_OF_DIRTY_MESH_ROWS_TO_SAVE_EACH_CALL
Number of terrain mesh rows to be saved each time the scheduled executor performs a save.
NUMBER_OF_DB_CREATURE_POSITIONS_TO_UPDATE_EACH_TIME
The number of creatures in the database to update each time the creature position updater runs. If not specified, defaults to 500.
NUMBER_OF_DB_ITEM_DAMAGES_TO_UPDATE_EACH_TIME
The number of items in the database to update each time the item damage upsdater runs. If not specified, defaults to 500.
NUMBER_OF_DB_PLAYER_POSITIONS_TO_UPDATE_EACH_TIME
The number of player positions to update each time the scheduled executor is called. If not specified, defaults to 500.
PLAYER_CONN_MILLIS
Number of milliseconds to wait between player connections. If not specified, defaults to 1000.
SCHEDULED_EXECUTOR_SERVICE_NUMBER_OF_THREADS
Specifies the number of threads to be allocated to the scheduled executor pool.
USE_SCHEDULED_EXECUTOR_TO_UPDATE_PLAYER_POSITION_IN_DATABASE
When true, use a scheduled executor to update player positions in the database instead of the main server thread. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR
When true, use a scheduled executor to write the MRTG logs instead of from the main server thread. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_COUNT_EGGS
When true, use a schedule executor to count eggs instead of the main server thread. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_FOR_SERVER
When true, use a scheduled executor to run the Server thread. When false, uses a timer task. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_SEND_TIME_SYNC
When true, use a scheduled executor to send time sync commands instead of from the main server thread. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_SWITCH_FATIGUE
When true, use a scheduled executor to update player fatigue instead of in the main server thread. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_UPDATE_CREATURE_POSITION_IN_DATABASE
When true, use a schedule executor to update a creature's position in the database. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_UPDATE_ITEM_DAMAGE_IN_DATABASE
When true, use a scheduled executor to update an Item's damage in the database instead of the main server thread. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_UPDATE_TWITTER
When true, use a schedule executor to update twitter instead of the main server thread. If not specified, defaults to false.
USE_DIRECT_BYTE_BUFFERS_FOR_MESHIO
Use direct allocation for reading from and writing to the meshes. If not specified, defaults to false.
USE_MULTI_THREADED_BANK_POLLING
When true, multiple threads will be used to poll the banks. If not specified, defaults to false.
USE_SCHEDULED_EXECUTOR_TO_TICK_CALENDAR
When true, a scheduled executor is used to tick the calendar instead of the main server thread. If not specified, defaults to false.

Reserved Options

The following options are reserved for future and/or internal use and it is recommended that they be left as they are in the default configuration file:

CHECK_ALL_DB_TABLES
DB_DRIVER
DB_PASS
DB_PORT
DB_USER
DBPATH
DBSTATS
LOGIN_DB_DRIVER
LOGIN_DB_PASS
LOGIN_DB_PORT
LOGIN_DB_USER
PREPSTATEMENTS
RUNBATCH
SITE_DB_DRIVER
SITE_DB_HOST
SITE_DB_PASS
SITE_DB_PORT
SITE_DB_USER
TRACK_OPEN_DATABASE_RESOURCES
USE_POOLED_DB
USE_QUEUE_TO_SEND_DATA_TO_PLAYERS
USE_SITE_DB
USE_SPLIT_CREATURES_TABLE
USEDB

Troubleshooting

Server is not visible in the server browser
This usually indicates that the Steam query ports 27016-27030 are not open, or have not been forwarded to the server host.
On login, players get this message: <You can not log on to this type of server. Contact a GM or Dev>
This message indicates that the server is not configured to allow logins, using the IS_GAME_SERVER flag. Set IS_GAME_SERVER=true to allow logins on this server.
Twitter is not working
You may need to download the commons-codec.jar and place it in the lib folder of your server. The library is available here: Apache Commons. Note that this issue should be fixed in current versions.
On a computer with touchscreen enabled, clicking on a drop down box causes the launcher to stop responding
This is a known issue with JavaFX on Windows 10 with devices using touchscreens. You will need to disable the touchscreen. To do this:
  1. Go to start
  2. Right click on "This PC" and choose properties
  3. Choose device manager
  4. Find "Human Interface Devices"
  5. Find "HID Compliant touch screen", right click and disable.