---
name: "civserver"
section: "6"
platform: "linux"
package: "freeciv-server"
version: "2.1.5-2"
release: "Debian 5.0 (Lenny)"
platforms: ["linux"]
url: "https://new.carta.tech/civserver"
---

# civserver(6)

The server for the Freeciv game

## NAME

civserver - The server for the Freeciv game

## SYNOPSIS

**civserver \[ -b\|--bind *address* \] \[ -d\|--debug *level\_number* \] \[ -e\|--exit-on-end \] \[ -f\|--file *filename* \] \[ -h\|--help \] \[ -l\|--log *filename* \] \[ -M\|--Metaserver *address* \] \[ -m\|--meta \] \[ -p\|--port *port* \] \[ -P\|--Ppm \] \[ -q\|--quitidle *time* \] \[ -R\|--Ranklog *filename* \] \[ -r\|--read *filename* \] \[ -S\|--Serverid *id* \] \[ -s\|--saves *directory* \] \[ -v\|--version \]**

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

## 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 [*civclient*(6)](/civclient/6.md)

This manual page only lists the command line arguments. For details of the directives necessary to configure **civserver** see the Server Manual which can be found at http://www.freeciv.org/ ⟨⟩ as well as the documentation which is part of the Freeciv distribution.

## OPTIONS

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

- **-a, --auth**

  Enables server authentication and allows access to registered players only.

- **-b *address*, --bind *address***

  Sets the *address* on which the server will listen for clients.

- **-d *level\_number*, --debug *level\_number***

  Sets the amount of debugging information to be logged in the file named by the *-l* option. Acceptable values for the *level\_number* are:

  **0**    for fatal messages only.

  **1**    for fatal and error messages.

  **2**    for fatal, error and normal messages.

  **3**    for fatal, error, normal, and verbose messages.

- **-e, --exit-on-end**

  When a game ends, exit instead of restarting.

- **-f *filename*, --file *filename***

  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. The distribution comes with such scenarios, typically stored in */usr/local/share/freeciv/scenario*:

-

  • *british-isles-85x80-v2.80.sav*

  • *earth-160x90-v2.sav*

  • *earth-80x50-v2.sav*

  • *europe-200x100-v2.sav*

  • *hagworld-120x60-v1.2.sav*

  • *iberian-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.

- **-l *filename*, --log *filename***

  Defines a log file, *filename*, to be produced during processing. Use the *-d* option to set how much is logged.  By default, fatal and normal messages are  printed to standard output.  With a log file, such messages go to the log instead.

- **-M *address*, --Metaserver *address***

  Specifies the *address* of the metaserver to send your server's information to.

- **-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.

- **-N, --Newusers**

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

- **-p *port*, --port *port***

  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.

- **-P, --Ppm**

  Save map ppms to savegames.

- **-q *time*, --quitidle *time***

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

- **-R *filename*, --Ranklog *filename***

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

- **-r *filename*, --read *filename***

  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 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/*.

- **-S, --Serverid *id***

  Sets the server *id*.

- **-s *directory*, --saves *directory***

  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.

- **-v, --version**

  Causes the server to display its version number and exit.

## EXAMPLES

- **civserver --file oldgame.sav --port 2244**

  Starts a server on port *2244*, loading the save game file  *oldgame.sav*.

- **civserver -R ranklog -l logfile -r script -f oldgame.sav.gz -p 2244**

  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*.

- **civserver -m -a -q 60 -p 2244 -d 2 -l logfile -r script -s ~/saves**

  Starts a server on port *2244* with authentication enabled and communicates  its existence to the standard Freeciv metaserver. Fatal, error, 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.

## 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.

## FILES

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

• *default/buildings.ruleset*

• *default/cities.ruleset*

• *default/game.ruleset*

• *default/governments.ruleset*

• *default/nations.ruleset*

• *default/techs.ruleset*

• *default/terrain.ruleset*

• *default/units.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 **help rulesetdir** for more information.

## 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 data encoding (used for data files, savegames, and network strings).

- **FREECIV\_INTERNAL\_ENCODING**

  Sets the internal encoding (used for GUI strings).

- **FREECIV\_LOCAL\_ENCODING**

  Sets the local encoding (used for terminal output).

- **FREECIV\_MULTICAST\_GROUP**

  Sets the multicast group (for the LAN tab).

- **FREECIV\_PATH**

  A colon separated list of directories pointing to the **freeciv** data directory. 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" in the user's home directory; and the directory where the files are placed by running "make install".

- **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.

## BUGS

Please report bugs to http://bugs.freeciv.org/ ⟨⟩ .

## MORE INFO

The Freeciv homepage is located at http://www.freeciv.org/ ⟨⟩ .

Updates and new info is first posted there.

## AUTHORS

The Freeciv Team \<freeciv-dev AT freeciv.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.

## SEE ALSO

[*civclient*(6)](/civclient/6.md) and the Server Manual on the Freeciv homepage.
