GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages
FREECIV21-SERVER(6) Freeciv21 Manual FREECIV21-SERVER(6)

freeciv21-server - The server for the Freeciv21 game.

freeciv21-server [ -f|--file <FILE> ] [ -l|--log <FILE> ] [ -p|--port <PORT> ] [ -r|--read <FILE> ] [ -s|--saves <DIR> ] [ --ruleset <RULESET> ] [ -a|--auth ] [ -D|--Database <FILE> ] [ -G|--Guests ] [ -N|--Newusers ] [ -h|--help ] [ -v|--version ]

Freeciv21 is a free open source turn-based empire-building 4x strategy game, in which each player becomes the leader of a civilization. You compete against several opponents to build cities and use them to support a military and an economy. Players strive to complete an empire that survives all encounters with its neighbors to emerge victorious. Play begins at the dawn of history in 4,000 BCE.

Freeciv21 takes its roots in the well-known FOSS game Freeciv and extends it for more fun, with a revived focus on competitive multiplayer environments. Players can choose from over 500 nations and can play against the computer or other people in an active online community.

The code is maintained by the team over at Longturn.net and is based on the QT framework. The game supports both hex and square tiles and is easily modified to create custom rules.

An HTML version of this manual page along with much more information is available on our documentation website at https://longturn.readthedocs.io/.

This is the server program used to establish a Freeciv21 server. For more information on the game, refer to freeciv21-client(6).

This manual page only lists the command line arguments for the server program. For details of the directives a server administrator can use to control aspects of the server, see freeciv21-game-manual(6).

The following options are accepted on the command line of the server. They may not be combined as with other tools. For example: freeciv21-server -fp savegame.sav 5556 will not work. Instead you will need to enter each option separately, such as, freevic21-server -s savegame.sav -p 5556.

TIP:

It is generally considered a best practice to write a .sh script to run your server. This way you do not have to remember all the command line options to use every time you run your server.


Announce game in LAN using protocol PROTO (IPv4/IPv6/none). Default is IPv4. Options include: IPv4, IPv6, or none.
Connect to metaserver from this address. Default will be your public IP address assigned from your internet service provider.

NOTE:

With regard to the command line arguments concerning the metaserver, Freeciv21 does not have its own metaserver at this time and the legacy Freeciv metaserver does not support Freeciv21. This means, right now, that all commands related to the metaserver are held over from the fork from legacy Freeciv until the Longturn community creates a custom metaserver.


Listen for clients on ADDR. Default is the IP address of the server computer.
Set debug log level (fatal/critical/warning/info/debug). Default log level is info.
When a game ends, exit instead of restarting.
Raise a signal on failed assertion. An assertion is a code calculation error. With this set, the server process will SEGFAULT instead of issuing a warning message to the terminal console.
Load saved game FILE. Useful when wanting to restart a game.
Be known as ADDR at metaserver or LAN client.
Keep updating game information on metaserver even after failure. Default is not to keep updating.
Use FILE as logfile. Generally a very good idea when running a server.
Set ADDR as metaserver address. Allows you to point to a specific metaserver instead of the default: https://meta.freeciv.org/
Notify metaserver and send server's info.
Listen for clients on port PORT. Default is 5556 as assigned by IANA
Quit if no players for TIME seconds.
Use FILE as ranking logfile. Generally a very good idea when running a server.
Read startup file FILE.
Sets the server id to ID.
Save games to directory DIR. Generally a very good idea to save games at least every turn and depending on how long the turns are set to, to save within a turn. In the case of a server crash, restarting from a save comes in very handy.
Prints stats about elapsed time on misc tasks. Typically used to test code performance.
Warn about deprecated modpack constructs.
Load ruleset RULESET. Default is the Civ2Civ3 ruleset.
Save scenarios to directory DIR.
Enable database authentication (requires --Database).
Enable database connection with configuration from FILE.
Allow guests to login if auth is enabled. See
Allow new users to login if auth is enabled.
Display help on command line options and quits.
Display help including Qt specific options and quits.
Display version information and quits.

Here are some examples:

Starts a server on port 2224, loading the savegame named oldgame.sav.
Starts a server on port 2224, loading the savegame named oldgame.sav.xz. Player ranking events are logged to ranklog, other logging events are placed in logfile. When the server first starts, it immediately executes the server settings script named start-script. See freeciv21-server-manual(6) for more information on the server settings script.
Starts a server on port 2224 with authentication enabled (-a, -D, -G, and -N). If no activity for 60 seconds the server will quit (-q). Logging events are placed in logfile and periodic saves are placed in the ./saves directory.

The freeciv21-server requires the default ruleset files to be readable at start.

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

These files are for the default ruleset for the game (civ2civ3), which are loaded if you do not use the --ruleset argument. Alternate rules can be loaded with the rulesetdir directive in a start up script. Type help rulesetdir at the server command prompt for more information.

If you are going to enable user authentication, you will need the database.lua file. The file is available on the GitHub repository (see below).

The Freeciv21 server accepts these environment variables:

A string containing a list of "capabilities" provided by the server. The compiled default should be correct for most purposes, but if you are familiar with the capability string facility in the source you may use it to enforce some constraints between clients and server.
Sets the compression level for network traffic.
Sets the multicast group (for the LAN tab).
A colon separated list of directories pointing to the Freeciv21 data directories. By default Freeciv21 looks in the following directories, in order, for any data files: the current directory; the "data" subdirectory of the current directory; the subdirectory ".local/share/freeciv21" in the user's home directory; and the directory where the files are placed by running "cmake --target install".
A colon separated list of directories pointing to the Freeciv21 save directories. By default Freeciv21 looks in the following directories, in order, for save files: the current directory; and the subdirectory ".local/share/freeciv21/saves" in the user's home directory.

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

A colon separated list of directories pointing to the Freeciv21 scenario directories. By default Freeciv21 looks in the following directories, in order, for scenario files: the current directory; the "data/scenarios" subdirectory of the current directory; the subdirectory ".local/share/freeciv21/scenarios" in the user's home directory; and the directory where the files are placed by running "cmake --target install".

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

Specifies the user's home directory. For example, """http://my_proxy_address/""".
Set this variable accordingly when using a proxy.
Sets the language and locale on some platforms.
Similar to LANG (see documentation for your system).
Specifies the username of the current user.

Please report bugs to the Freeciv21 bug tracker at https://github.com/longturn/freeciv21/issues/new/choose

See the Longturn home page at https://longturn.net/. You can also find the code repository at https://github.com/longturn/freeciv21/.

Freeciv21 and Freeciv Contributors

GPL-3.0-or-later, Freeciv21 and Freeciv Contributors

July 17, 2025

Search for    or go to Top of page |  Section 6 |  Main Index

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with ManDoc.