User Tools

Site Tools


server:hosting

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
server:hosting [2016/04/18 07:03]
saru Added a lot more detail to the crossloop entry including how-tos for linux
server:hosting [2019/06/16 02:33] (current)
saru [Crossfire Metaserver]
Line 17: Line 17:
     * Connections issues can occur within the Crossfire client if the domain name is not full qualified.     * Connections issues can occur within the Crossfire client if the domain name is not full qualified.
   - Network security to allow remote connections and communication to the metaserver (if a public server).  ​   - Network security to allow remote connections and communication to the metaserver (if a public server).  ​
-    * The server runs on port 13327+    * The server runs (by default) ​on port **13327**
       * if you have a firewall, it will need to allow that port for incoming connections, ​       * if you have a firewall, it will need to allow that port for incoming connections, ​
       * if you are running NAT, you will need to make sure that the connection to port 13327 gets routed to the correct server.  ​       * if you are running NAT, you will need to make sure that the connection to port 13327 gets routed to the correct server.  ​
-    * The metaserver runs on port 13326 and 80 (HTTP)+    * The metaserver runs (by default) ​on port **13326** and 80 (HTTP)
       * if you have a firewall, it will need to allow 13326 and 80 for incoming connections, ​       * if you have a firewall, it will need to allow 13326 and 80 for incoming connections, ​
       * if you are running NAT, you will need to make sure that the connection to port 13326 gets routed to the correct server.       * if you are running NAT, you will need to make sure that the connection to port 13326 gets routed to the correct server.
       * For metaserver2 updates, it is an outgoing connection to standard HTTP port (80), so very few firewalls should block it.       * For metaserver2 updates, it is an outgoing connection to standard HTTP port (80), so very few firewalls should block it.
  
 +==== Watchdog ====
 +The watchdog feature can be enabled manually in the //​server/​include/​config.h//​ at [[:​server:​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 ​
 +  * a port at startup already ( but will create it after %503 ticks )
 +  * an //udp// port of the number 13325 ( but some random udp-port above 32768 )
 +:!: 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!
  
 ===== Installing a Crossfire Server from a Binary ===== ===== Installing a Crossfire Server from a Binary =====
Line 46: Line 53:
  
  
-==== Server Settings ====+====== Hosting the Server ====== 
 + 
 +===== Server Settings ​=====
  
   * Edit and update the MOTD (Message of the Day) information (filename motd)   * Edit and update the MOTD (Message of the Day) information (filename motd)
Line 55: Line 64:
     * The file controls many aspects of play - permadeath or not, number of starting stat points, etc.     * The file controls many aspects of play - permadeath or not, number of starting stat points, etc.
  
-=== DM account ===+==== Players accounts ==== 
 +Player account information is stored in the /var directory (on linux this is usually /​usr/​games/​crossfire/​var/​crossfire/​). 
 +   * The account file in the var directory includes account name and password information. 
 +   * The accounts file is linked to each player file in the file with the same name stored in /account 
 +   * Each player file is stored within the directory /players 
 +   * You will need to back up each of these in order to be able to keep an archive for your players. It is generally a good idea to set up an automatic archiving script such that if something gets broken any account or player may be recovered. 
 + 
 +==== DM account ​====
   * All servers should ensure that a DM account is setup and accessible   * All servers should ensure that a DM account is setup and accessible
     * DM accounts are managed via the dm_file usually located in      * DM accounts are managed via the dm_file usually located in 
Line 76: Line 92:
   help command   help command
  
-=== Crossfire Metaserver ===+==== Crossfire Metaserver ===
 + 
 +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
  
   * If running a public server, you will most likely want to advertise your server via the metaserver (filename metaserver2)   * If running a public server, you will most likely want to advertise your server via the metaserver (filename metaserver2)
Line 90: Line 112:
  
  
-=== Guilds ===+==== Guilds ​====
  
   * Consider limiting how many guilds are initially available ​   * Consider limiting how many guilds are initially available ​
Line 98: Line 120:
  
  
-=== Crossloop ===+====== Crossloop ====== 
 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/​). 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/​).
  
Line 104: Line 127:
     * crossloop.web is similar to crossloop, but also e-mails a stack trace and makes data available on the web.  To use, some variables at the top of the file need to be changed. ​ Note that make install will overwrite this file, so you will want to make a copy of it.     * crossloop.web is similar to crossloop, but also e-mails a stack trace and makes data available on the web.  To use, some variables at the top of the file need to be changed. ​ Note that make install will overwrite this file, so you will want to make a copy of it.
     * The script files assume that the core file will just be called **core**. ​ If the name is different, eg, core.//​pid//,​ crossloop will not be able to properly save the core files (but the fact that the name is fairly unique does mean it is less likely they will be overwritten)     * The script files assume that the core file will just be called **core**. ​ If the name is different, eg, core.//​pid//,​ crossloop will not be able to properly save the core files (but the fact that the name is fairly unique does mean it is less likely they will be overwritten)
- +:!: NOTE : Make sure, that the crossloop script, if it is a #!/bin/bash script, \\ 
-==Linux instructions==+has the ''​ulimit -c <​SIZE>''​ command ready; \\  
 +//​[[https://​linux.die.net/​man/​1/​bash|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 created 
 +>ulimit -a 
 +>>​core file size        (blocks, -c) 0 
 +>ulimit -c unlimited 
 +>ulimit -a 
 +>>​core file size        (blocks, -c) unlimited 
 +=====Linux instructions=====
 To start crossloop create a folder for the log files: To start crossloop create a folder for the log files:
  
Line 116: Line 149:
 You can now run crossloop simply by: You can now run crossloop simply by:
    
-  ​$ nohup /​usr/​games/​crossfire/​bin/​crossloop ​&+ 
 +  ​$ nohup /​usr/​games/​crossfire/​bin/​crossloop
   ​   ​
 You can check that the server is running by running ps aux: You can check that the server is running by running ps aux:
Line 129: Line 163:
  
   ​   ​
-==Start crossloop on reboot==+====Start crossloop on reboot====
 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. 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.
  
-==Linux instructions==+====More ​Linux instructions====
 FIXME explain how to create init.d entry. FIXME explain how to create init.d entry.
  
Line 139: Line 173:
   - All crossfire files are text, so generally easy to back up and restore. Since files are text, one can even attempt to repair damaged/​corrupted files.   - All crossfire files are text, so generally easy to back up and restore. Since files are text, one can even attempt to repair damaged/​corrupted files.
   - Consider using Munin (http://​munin-monitoring.org/​) for monitoring and tacking server resources, more of a server host or administration benefit   - Consider using Munin (http://​munin-monitoring.org/​) for monitoring and tacking server resources, more of a server host or administration benefit
-==== Social Management ==== + 
-=== General Tips ===+====== Social Management ​====== 
 +===== General Tips =====
 If you want to attract players and build a community on your server - your server will need to be reliable, which means: If you want to attract players and build a community on your server - your server will need to be reliable, which means:
   * Available on a consistent basis   * Available on a consistent basis
Line 150: Line 185:
   * Become very, very familiar with the DM commands and how to use them   * Become very, very familiar with the DM commands and how to use them
  
-=== Banishment ===+===== Banishment ​=====
 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) 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)
  
server/hosting.1460981020.txt.gz · Last modified: 2016/04/18 07:03 by saru