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
Last revision Both sides next revision
server:hosting [2016/04/18 21:32]
saru Added a section on where account and player data is stored so that server hosts can archive it
server:hosting [2018/03/05 07:08]
karl take the social management out of the linux table
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.
  
-=== Players accounts ===+==== Players accounts ​====
 Player account information is stored in the /var directory (on linux this is usually /​usr/​games/​crossfire/​var/​crossfire/​). 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 account file in the var directory includes account name and password information.
Line 62: Line 71:
    * 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.    * 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 ===+==== 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 83: Line 92:
   help command   help command
  
-=== Crossfire Metaserver ===+==== Crossfire Metaserver ​====
  
   * 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 97: Line 106:
  
  
-=== Guilds ===+==== Guilds ​====
  
   * Consider limiting how many guilds are initially available ​   * Consider limiting how many guilds are initially available ​
Line 105: Line 114:
  
  
-=== 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 111: Line 121:
     * 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 137: Line 157:
  
   ​   ​
-==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 148: Line 168:
   - 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 ==== +====== Social Management ​====== 
-=== General Tips ===+===== 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 159: Line 179:
   * 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.txt · Last modified: 2019/06/16 02:33 by saru