Author
Topic: How to set up a server (Read 23591 times)

How to set up a Simutrans serverguide for revision 4851 and above (new listings server)

1. Opening portsYour 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 serverTo run the game in server mode append the -server command line switch, e.g.:

simutrans -server 13356The 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 serverFor 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.:

myserver.example.com23.45.67.892001:8b0:345::23Note: 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 23.45.67.89 and you configure it to announce itself as 99.88.77.66 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 optionssimuconf.tab permits configuring of further options:

# 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

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

simutrans -log 1 -debug 2 -server 13353 -announce -server_dns 22.33.44.55 -lang en -load network1Whenever 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

« Last Edit: February 10, 2013, 02:28:52 PM by IgorEliezer »

Logged

Use Firefox? Interested in IPv6? Try SixOrNot the IPv6 status indicator for Firefox.Why not try playing Simutrans online? See the Game Servers board for details.

Wow, now this is a very helpful tutorial. Does the server send all the infos automatically or do i habe to change them? Thank you very much timothy. Its very interesting and i hope more people will join in server games. Btw how can i start the server graphicless?

Xelofino

edit: I tried to start the server as you wrote it down and it worked instantly. It has shown me all the very important infos on the listing page but there is a little problem. How can I now add additional information like pakset download or comment, e-mail etc. ? Do i have to make the server in the list first and then afterwards start it? But otherwise, great compliment!

OpiesRevenge

I have been trying to set up a server and I am still unable to get it to work. I am editing config.tab (the main one not the one in the pak128 file) I have edited the network info area, Im not sure if this is the right place.

It would be nice to see the page, I could just copy paste and add my info. Like if someone that has a server could just copy paste what I have to enter and tell me where to put it. I will add the ip and port. I set up my router to let traffic to the server using the default 13353 port (should it be TCP or UDP i have both to make sure for now). Also is there any thing I need to do diffrently since I have a router other then set it to forward the port to the server? Is there somthing I have to add to the config.tab to adjust for having 5 pcs on my router and 7 ip addresses used. If I need to enter the server ip where do I put it or will my isp ip do the trick alone if i set port forwarding and allow the firewall to let traffic threw.

Im sure you can tell that im not sure about code work or networking but am willing to do what I need to so I can set up a server for about 6 freinds and myself. I have played the game they have just seen it so it will be a trial and error game im sure.

It is also recommended o set the savegameformat for netgaming to zip unless you have a very slow upload. Generally for hosting only the upload speed is important. Even vserver seem to have enough CPU power for simutrans.

That really depends if you have a full Internet access or just running via a proxy like construct or a private IP address. Most IP4 wireless using a internal proxy. In such a case a server cannot work, as it has no unique IP address. It is the same as you would use a 192.168.0.1 IP from you router at home.

It may work with IP6 though, assuming you have a wireless modem in your computer. If you got an IP6 address, use this for Simutrans (Unfourtunately the listserver cannot handle IPv6 anymore, that was switched off last year from the provider.)

Maybe interesting for other users: I improved the start time of the clients (preparing and download of the map) additional by changing zip-level from standard (level 6) to the lowest compressing level 1. (0 would be uncompressed) This is only possibly by changing the source and a new compilation step. In case that is also interesting for English speaking users, i could translate this blog article. Maybe next days.

When I follow his started thread http://forum.simutrans.com/index.php?topic=9315.0 for this problem, so I estimate this "bug" was a special problem by very special conditions of his trials. But: One of the most detailed articles for compiling simutrans today is still his blog article. And this article contains a work-around paragraph for this problem.

This is some years ago. But my question to the insider: Is something of this bug still relevant? Maybe it would be time to write a "no more relevant comment" under his article.

I'm trying to set up a test server over Ubuntu 16.04, but I'm having trouble to identify my server (external DNS and/or so on) to announce it.It seems the game is already on, but I don't know how to discover the information needed to announce the server.

I'm trying to set up a test server over Ubuntu 16.04, but I'm having trouble to identify my server (external DNS and/or so on) to announce it.It seems the game is already on, but I don't know how to discover the information needed to announce the server.

Every help will be appreciated. Thanks in advance

you need to have added minimal: -server <port number> -announce -server_dns <your ip here> -server_name "My Server Name" also you need to add the port number you are running the server on to the port forwarding in your router.

Thanks, River!I suppose I'm having trouble in discovering what my IP is, but I'll give it a try

getting your ip address is easy, i just google "my ip address" and i find a page that shows it. you could try https://www.iplocation.net/find-ip-address also in the bottom right of your posts it shows your ip address on the forum.

This isnt very helpful, we dont know where we can create or set up a new server. We have the world and a very good internet connection and a port but where we can create or set up a server or LAN world. We think that simutrans need a own section for the simutrans server to play and create because this for to play with friends is too dificult.