Previous Contents Next

10. Running a Server

This section describes how to run your own online Knights server.

Installation

For Windows, the Knights server program is available as a separate download from the Knights web site. The file should be unzipped to a directory of your choice, and then you can run the server from the command line by cd-ing into that directory and typing "knights_server".

For Linux, the server is built and installed automatically as part of the normal build process. To run the server type "knights_server" on the command line.

The configuration file

The server needs to read a configuration file before it can run. The default is to look for a file named "knights_config.txt" in the current directory. If you want to use a different config file you can specify it using the -c option, for example:

knights_server -c path/to/my_config.txt

The file itself is a plain text file consisting of "Setting = Value" pairs, for example, "MaxPlayers = 50". There is one setting per line. Comment lines may also be included by starting them with a # symbol. An example knights_config.txt file is included in the distribution.

Please note that changes to the config file will not take effect until the server is restarted.

The full list of settings is as follows:

Keeping the server running

The distribution contains a Unix shell script, start_knights_server.sh, which checks whether the server is running, and if not, starts a new copy of the server. This allows the server to be automatically re-started in the event that it crashes. For instructions read the comments within the file.

Allowing players to find your server

If the server is running on a LAN then (if you are lucky) the game client should be able to detect the server automatically using the broadcast feature. However, broadcast packets are often blocked by firewalls, so this may not work; in that case, players will have to type in the IP address or hostname of the server manually.

For Internet servers, there is currently no way for the game client to automatically find the server, so you will have to publish the hostname or IP address of your server somewhere, and players will have to manually type the address into the game client.

Previous Contents Next
Game Options Building/Installing from Source