How to set up a Simutrans serverguide for revision 4851 and above (new listings server)1. Opening ports
Your server needs to be able to accept incoming connections from the Internet. If you are hosting it on server directly connected to the Internet this shouldn't be a problem, however if you are running it on your home DSL connection (for example) you may need to forward the port the server is listening on from your Router/Firewall to your server.
The default port is 13353 however you can change this by specifying a different port when you run the game. A reasonably fast connection is required to host a game, 10MBit/s is recommended.2. Starting the server
To run the game in server mode append the -server command line switch, e.g.:
simutrans -server 13356
The port number is optional and defaults to 13353. If you wish to run multiple instances of the game on one machine you'll need to specify different ports for each one.
When starting a dedicated server on a remote machine, it is advised to compile it for yourself, using the posix backend. It will run without graphics, but will require much less CPU time, so it can even run decently on a virtual server.3. Publicizing your server
For players to be able to connect to your server and play they first need to be able to find it. A central listings server (http://servers.simutrans.org
) is provided for this purpose. To make use of this facility you need only to enable server announcements either via the command line flag or an entry in simuconf.tab:
simutrans -server -announce -server_dns my.domain.com -server_name "My Server Name"
This will run a server on the default port (13353) and enable announcements. The "-server_dns" flag must be set to the external address (or DNS name) of your server. This can be a DNS name, IPv4 or IPv6 address. E.g.:
Note: The listings server will not accept announcements claiming to be from a different address than the one they are announcing for. So if your server's Internet address is 22.214.171.124 and you configure it to announce itself as 126.96.36.199 the listings server will ignore it. In the case of DNS names a DNS query will be performed for the name and the list of IP addresses returned will be compared to the IP address of the announce request. If none of these match the announce will be ignored.4. Further options
simuconf.tab permits configuring of further options:
# Automatically announce server on the central server directory (http://servers.simutrans.org/)
# 0 (default) = off, 1 = on
#server_announce = 0
# Interval of server announcement (if enabled)
# Value is number of seconds between server announcements, default is 900 (15 minutes)
# Minimum value is 60 (1 minute), for accurate listing it is recommended not to increase
# this value to greater than 3600 (1 hour)
# To disable announcements set server_announce to 0
#server_announce_interval = 900
# Fully Qualified Domain Name (FQDN) or IP address of your server (IPv6 or IPv4)
#server_dns = 127.0.0.1
# Name of server in server listing
#server_name = My Simutrans Server
# Additional information about your server (for display on the list server)
#server_comments = Comments about my server
# Email address of server maintainer (for display on the list server)
#server_email = email@example.com
# Pakset download URL (for display on the list server)
#server_pakurl = http://your.domain/pakset.zip
# Server info URL (for display on the list server)
#server_infurl = http://your.domain/server-info.html
All of these fields are displayed on your server's listing on the listings server:http://servers.simutrans.org/list
The only essential ones are server_announce and server_dns.
When selecting a pakset, you should either use a "standard" set or give a download for the entire modified pak. Please, remember that pak sets nightlies are updated every sunday night.
When creating a game, you can do as you like. However, the time to download/save/load a game is somewhat critical, as it will happen quite often. Therefore you might consider to create a map without trees and just distribute trees/forest manually.
If industry growth is enabled, but you still want some control about the locations of primary industries (coal mines, forest, ... ) you can place them also beforehand. When new industries appear, they will try to connect to those first.
It's good practice to lock the "human" player and rename it to "Spectator", this means that new players joining your server are forced to pick a player slot (since all new players connect in slot 0).
I'd also recommend locking the Public Service player to avoid abuse.
An example command to start up a server in full:
simutrans -log 1 -debug 2 -server 13353 -announce -server_dns 188.8.131.52 -lang en -load network1
Whenever a client joins or leaves the game an autosave checkpoint is created. These are saved as "server<portnumber>-network.sve" under the root of the Simutrans game directory. If you start up the game without the "-load" flag it will automatically reload this checkpoint save. This can be used to recover from a crash.
Edit by Igor: Topic formatting