This is an old revision of the document!
This guide outlines useful information for installing, running and maintaining a crossfire server.
Make sure you have the following available to you:
The watchdog feature can be enabled manually in the server/include/config.h at server_compiling as #define WATCHDOG 1 .
The watchdog port number is hardcoded inside void watchdog(void) located in the server/socket.loop.c source file as 13325 .
The watchdog feature may not work as it should currently until incl. server v1.70.0 to create
Further it would create an additional socket, and that may lead to problems that the code does not work to add a new client. You may better not enable that feature!
Visit the Crossfire website for the latest binarys here
For information about compiling crossfire servers go to the crossfire server compile guide
After your server and network is setup and configured, there are additional steps to consider.
Player account information is stored in the /var directory (on linux this is usually /usr/games/crossfire/var/crossfire/).
/usr/games/crossfire/etc/crossfire/dm_file
Example entries: master:topsecret:* (name must be master, password is topsecret, allow any host) *:notelling:* (only matches password)
DM notelling
help command
The actual location of the metaserver2 file will depend on how the server was originally installed (i.e., by source or by precompiled package, dedicated user account for running the server) so be sure to check the following possible locations:
/usr/games/crossfire/etc/crossfire/ /etc/crossfire/metaserver2 /home/crossfire/etc/crossfire/metaserver2
One weakness of the crossfire-server binary is that any fatal error will result in your server going offline. To avoid lengthy delays whilst attending to other less important work, most server hosts choose to run the crossloop script. This handy script will restart the server if a crash occurs and create handy log files in the directory of your choosing. Crossloop is usually located within the server install directory (e.g. for linux /usr/games/crossfire/bin/).
Please note:
NOTE : Make sure, that the crossloop script, if it is a #!/bin/bash script,
has the ulimit -c <SIZE>
command ready;
Bash ulimit actually creates the core file by the -c argument, not the crossfire-server binary by itself. Until at least crossfire-server v.1.12.0 the ulimit -c unlimited line was not included in crossloop .
bash
help ulimit-c the maximum size of core files createdulimit -a
core file size (blocks, -c) 0ulimit -c unlimited
ulimit -acore file size (blocks, -c) unlimited
To start crossloop create a folder for the log files:
$ mkdir crossloop_dump
Change directory to crossloop_dump
$ cd crossloop_dump
You can now run crossloop simply by:
$ nohup /usr/games/crossfire/bin/crossloop
You can check that the server is running by running ps aux:
$ ps aux|grep cross
You should see something like:
username 1069 0.0 0.0 13696 2360 pts/40 S+ 21:53 0:00 grep --color=auto cross username 32126 0.0 0.0 4476 708 pts/39 S 21:37 0:00 /bin/sh /usr/games/crossfire/bin/crossloop username 32129 0.6 0.0 284264 26240 pts/39 Sl 21:37 0:05 /usr/games/crossfire/bin/crossfire-server -d -tmpdir /tmp/crossfire -log /tmp/crossfire/crossfire-2016-04-18-21:37.log
Crossloop does not of itself provide a means of starting crossfire upon a system reboot. Due to power failures and other uncontrolled reboots it is generally wise to include this in your system start-up to avoid server downtime. just make sure it su's to the appropriate user before running.
explain how to create init.d entry.
If you want to attract players and build a community on your server - your server will need to be reliable, which means:
If you intend to ban players who exploit bugs, PK other players, disrupt gameplay for others, etc. - say so in the server rules file so if/when something like this happens you can take action and avoid the long “debate” afterwards (filename rules)
There are two approaches to banning problematic player(s) and/or network(s)