logo
Free, unlimited AI code reviews that run on commit
git-lrc git-lrc GitHub Install Now We'd appreciate a star git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt git-lrc - Free, unlimited AI code reviews that run on commit | Product Hunt

freeciv-server - The server for the Freeciv game

Authors

       The Freeciv Team <freeciv-dev AT freelists.org>.

       This manpage was originally put together by Florian Ernst <florian_ernst AT  gmx.net>  using  the  Server
       Manual  and  the  comments in the sourcecode. It was updated by Ben Bettin <bwbettin AT gmail.com> to add
       new features, integrate information from the website's online documentation, and  for  slight  formatting
       adjustments. Feel free to use it as you wish.

Bugs

       Please report bugs to the Freeciv bug tracker .

Commands

       You may enter commands into the server at any time, either before or during the running of a game.

       Type "help" or "help help" for starters.

Description

       Freeciv is a free turn-based multiplayer strategy game, in which each player  becomes  the  leader  of  a
       civilization, fighting to obtain the ultimate goal: To become the greatest civilization.

       Players  of  Civilization  II®  by  Microprose®  should feel at home, since one aim of Freeciv is to have
       compatible rules.

       Freeciv is maintained by an international team of coders and enthusiasts, and is easily one of  the  most
       fun and addictive network games out there!

       This is the server program used to establish a Freeciv server - see also freeciv-client(6) .

       This  manual  page  only  lists  the  command  line arguments. For details of the directives necessary to
       configure freeciv-server see the Server Manual which can be found at the Freeciv website as well  as  the
       documentation which is part of the Freeciv distribution.

Environment

       The Freeciv server accepts these environment variables:

       FREECIV_CAPS
              A  string  containing  a  list  of  "capabilities" provided by the server. The compiled-in default
              should be correct for most purposes, but if you are familiar with the capability facility  in  the
              source you may use it to enforce some constraints between clients and server.

       FREECIV_COMPRESSION_LEVEL
              Sets the compression level for network traffic.

       FREECIV_DATA_ENCODING
              Sets  the character encoding used for data files, savegames, and network strings). This should not
              normally be changed from the default of UTF-8, since that is the format of the  supplied  rulesets
              and the standard network protocol.

       FREECIV_INTERNAL_ENCODING
              Sets the character encoding used internally by freeciv-server; this encoding should not be visible
              at any interface. Defaults to UTF-8.

       FREECIV_LOCAL_ENCODING
              Sets  the local character encoding (used for the command line and terminal output). The default is
              inferred from other aspects of the environment.

       FREECIV_MULTICAST_GROUP
              Sets the multicast group (for the LAN tab).

       FREECIV_DATA_PATH
              A colon separated list of directories pointing to the freeciv data directories. By default Freeciv
              looks in the following directories, in order, for any  data  files:  the  current  directory;  the
              "data"  subdirectory  of the current directory; the subdirectory ".freeciv/3.1" in the user's home
              directory; and the directory where the files are placed by running "make install".   If  not  set,
              FREECIV_SAVE_PATH  A colon separated list of directories pointing to the freeciv save directories.
              By default Freeciv looks in the following directories, in  order,  for  save  files:  the  current
              directory; and the subdirectory ".freeciv/saves" in the user's home directory.

              (This does not affect where the server creates save game files; see the --saves option for that.)

       FREECIV_SCENARIO_PATH
              A  colon  separated  list  of directories pointing to the freeciv scenario directories. By default
              Freeciv looks in the following directories, in order, for scenario files: the  current  directory;
              the    "data/scenarios"    subdirectory    of    the   current   directory;   the   subdirectories
              ".freeciv/3.1/scenarios" and then ".freeciv/scenarios" in  the  user's  home  directory;  and  the
              directory where the files are placed by running "make install".

              (This  does  not  affect  where  the server creates scenario files; see the --scenarios option for
              that.)

       HOME   Specifies the user's home directory.

       http_proxy
              Set this variable accordingly when using a proxy.

       LANG  or  LANGUAGE
              Sets the language and locale on some platforms.

       LC_ALL  or  LC_CTYPE
              Similar to LANG (see documentation for your system).

       USER   Specifies the username of the current user.

Examples

freeciv-server--fileoldgame.sav--port2244
              Starts a server on port 2244, loading the save game file oldgame.sav.

       freeciv-server-Rranklog-llogfile-rscript-foldgame.sav.gz-p2244
              Starts a server on port 2244, loading the save game file oldgame.sav.gz.  Ranking  related  events
              are  written  to ranklog, other logging information is written to logfile. When the server starts,
              it immediately executes the commands contained in script.

       freeciv-server-m-a-Dfc_auth.conf-q60-p2244-dnormal-llogfile-rscript-s~/saves
              Starts a server on port 2244 with authentication enabled and communicates  its  existence  to  the
              standard  Freeciv  metaserver.  Fatal, error, warning, and normal messages are written to logfile.
              When the server starts it immediately executes the commands contained in script. Save  game  files
              are  stored  in  the  ~/saves directory. When there are no users on the server for 60 seconds, the
              server will restart.

Files

       The  Freeciv  server  requires  the  following  files  in  the   Freeciv   data   directory,   which   is
       /usr/local/share/freeciv by default:

       • civ2civ3/buildings.rulesetciv2civ3/cities.rulesetciv2civ3/effects.rulesetciv2civ3/game.rulesetciv2civ3/governments.rulesetciv2civ3/nations.rulesetciv2civ3/styles.rulesetciv2civ3/techs.rulesetciv2civ3/terrain.rulesetciv2civ3/units.rulesetciv2civ3/script.luadefault/default.luadefault/nationlist.ruleset

       These are the default rule sets used for the game. Alternate sets of rules can be used by placing them in
       a separate directory and using the rulesetdir command to change your server's ruleset directory.

       Type helprulesetdir for more information.

More Info

       See the Freeciv homepage .

       Updates and new info is first posted there.

Name

       freeciv-server - The server for the Freeciv game

Options

       The  following options are accepted on the command line of the server. They may not be combined; that is,
       "freeciv-server -fp savegame.sav 5557" will not work, instead you would need to enter "freeciv-server  -f
       savegame.sav  -p  5557". Most options have a short form (single hyphen and single letter) and a long form
       (double hyphen and a complete word); their effects are identical.

       -Aprotocol,--Announceprotocol
              Uses protocol when announcing game in LAN.  Possible values for protocol are:

              IPv4IPv6none-a,--auth
              Enables server authentication  and  allows  access  to  registered  players  only.   Requires  the
              --Database option to be specified.

       -baddress,--bindaddress
              Sets the address on which the server will listen for clients.

       -Baddress,--Bind-metaaddress
              Sets  the  address  which  request  to  metaserver  are sent from. Defaults to address given by -b
              option.

       -dlevel,--debuglevel
              Sets the amount of debugging information to be  logged  in  the  file  named  by  the  -l  option.
              Acceptable values for the level are:

              fatal     for fatal messages only.

              error     for fatal and error messages.

              warning   for fatal, error and warning messages

              normal    for fatal, error, warning and normal messages (default).

              verbose   for fatal, error, warning, normal, and verbose messages.

       -Dfilename,--Databasefilename
              Specifies a database configuration file for authentication. This file specifies the details of the
              database. See README.fcdb in the Freeciv distribution for details of its format.

       -e,--exit-on-end
              When a game ends, exit instead of restarting.

       -F[signal_number],--Fatal[signal_number]
              Raise  a  custom  signal  on  failed  assertion.  If signal_number is not specified, then the ABRT
              signal will be used.

       -ffilename,--filefilename
              Loads a saved game (filename) into the server before initialization, instead  of  starting  a  new
              game.  This  is for reloading saved games, or for loading scenarios. See ENVIRONMENT for where the
              server looks for these files.

              The     distribution     comes     with     several     scenarios,     typically     stored     in
              /usr/local/share/freeciv/scenarios, for example:

              • british-isles-85x80-v2.80.savearth-160x90-v2.savearth-80x50-v3.saveurope-200x100-v2.savhagworld-120x60-v1.2.saviberian-peninsula-136x100-v1.0.sav-G,--Guests
              Allow guests to login as 'guest' when authentication is enabled.

       -h,--help
              Prints out a description of the command line options and exits.

       -iaddress,--identityaddress
              Reports the address to the metaserver.  Then, the metaserver will use this address to redirect the
              users.

       -Lmodule,--LoadAImodule
              Loads AI module. This option can appear multiple times to load different modules.

       -lfilename,--logfilename
              Defines  a log file, filename, to be produced during processing. Use the -d option to set how much
              is logged.  By default, fatal, error, warning, and normal messages are printed to standard output.
              With a log file, such messages go to the log instead.  If filename already exists, it is  appended
              to.

       -Maddress,--Metaserveraddress
              Specifies  the  address  of  the  metaserver to send your server's information to. By default, the
              standard metaserver run by the Freeciv maintainers will be used.

       -m,--meta
              Directs the server to communicate with a metaserver, a place where  Freeciv  servers  can  publish
              their  presence.  Freeciv  clients  consult  the metaserver to offer users a selection of games to
              join. By default the standard Freeciv metaserver is used. You may specify an alternate  metaserver
              with the -M option.

       -k,--keep
              Usually  freeciv  server  stops  sending  updates  to the metaserver, when there's problems on the
              connection once. With this option it keeps on trying to send further updates  even  after  it  has
              failed to send updated status once.  This option implies -m option.

       -N,--Newusers
              Allow new users to login and be registered in the players base if authentication is enabled.

       -pport,--portport
              Specifies  the  TCP port number to which clients will connect; players must know this number to be
              able to connect if they are not to use the default of 5556 decimal. You may need to  use  this  if
              5556 is not available for your use on your system, or if you would like to run multiple servers on
              the same system.

       -qtime,--quitidletime
              Quits if no players are present for the specified time, in seconds, and restarts a new server.

       -Rfilename,--Ranklogfilename
              Defines  a log file, filename, to be produced during processing. This log contains information for
              player ranking.

       -rfilename,--readfilename
              Specifies a file, filename, of server commands  which  the  server  will  automatically  read  and
              process,  as  if  you  had typed them in at the server's prompt. The distribution comes with a few
              examples, including files that set options to be similar to Civilization I® and Civilization II® .
              The files are named civ1.serv and civ2.serv, and are typically found at /usr/local/share/freeciv/.

       -Sid,--Serveridid
              Sets the server id. This is used to identify a particular running game.

       -sdirectory,--savesdirectory
              Specifies the directory to place save game files created by the server.  This is especially useful
              when you're running more than one server on the same system, as  it  inhibits  your  servers  from
              clobbering other's save game files.

              (This   does   not   influence   where  the  server  looks  when  loading  save  game  files;  see
              FREECIV_SAVE_PATH for that.)

       --scenariosdirectory
              Specifies the directory to place scenarios saved by the server (for instance, those  created  with
              the in-game editor).

              (This   does   not   influence   where   the   server  looks  when  loading  scenario  files;  see
              FREECIV_SCENARIO_PATH for that.)

       -v,--version
              Causes the server to display its version number and exit.

See Also

freeciv-client(6) and the Server Manual on the Freeciv homepage.

                                               December 10th 2011                                     FREECIV(6)

Synopsis

freeciv-server[-A|--Announceprotocol][-b|--bindaddress][-B|--Bind-metaaddress][-d|--debuglevel][-e|--exit-on-end][-F|--Fatal[signal_number]][-f|--filefilename][-h|--help][-i|--identityaddress][-k|--keep][-l|--logfilename][-M|--Metaserveraddress][-m|--meta][-p|--portport][-q|--quitidletime][-R|--Ranklogfilename][-r|--readfilename][-S|--Serveridid][-s|--savesdirectory][--scenariosdirectory][-v|--version]

       Auth  aware  servers  have  additional parameters: [-a|--auth][-D|--Databasefile][-G|--Guests][-N|--Newusers]

       Servers with AI module support have an additional parameter: [-L|--LoadAImodule]

See Also