The International Simutrans Forum

 

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

0 Members and 1 Guest are viewing this topic.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9238
  • Languages: De,EN,JP
How to set up a server (old)
« on: December 18, 2010, 07:41:01 PM »
If you want to set up a server, you need a connection with a decent upload, as a savegame transfer easily takes 1MB. Therefore at least 10MBit/s is recommended.

Technically you need to make sure that port the server uses is open and forwarded to your computer (in case you have to connect via a router/ADSL/cable modem). The default port is 13353, but you can specify any other port, when starting the server.

When starting a decicated 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.

There are some options in the simuconf.tab, which can/should be set for a server.

Code: [Select]
server_frames_ahead = 1 or 2
server_frames_per_step = 4
network_ms_ahead = 250 (maybe longer for cable modems)
server_frames_between_checks = 256
announce_server = server_id from the serverlist
server_name = [set to your savers name]
server_comment = [enter something here]

You should also go to http://simutrans-germany.com/serverlist/ and register your server there. Bookmark the link for editing, as it is the only way to remove a server from the list.

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. Hoever, the time to download/save/load a game is somewhat ciritcal, 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 undustries appear, they will try to connect to those first.

You should change the name of the public player to spectator and lock this player. All other stuff is with you.

When starting the server, I use "simutrans -log 1 -debug 2 -server 13353 -lang en -load network1"
After a crash, you can restart the last state when the last client joined with "simutrans -log 1 -debug 2 -server 13353 -lang en". In such a case it will load the fiel "server-network.sve" from the user directory.

(The option "-lang en" is only needed on the dedicated server, as I cannot change the language manually there.)
« Last Edit: November 03, 2011, 12:32:18 AM by Timothy »

Offline Frank

  • *
  • Posts: 1422
  • Languages: DE
Re: How to set up a server
« Reply #1 on: January 22, 2011, 08:46:21 PM »
@all Simutrans-server maintainter

update your server to r4198 or newer, please

Offline Frank

  • *
  • Posts: 1422
  • Languages: DE
Re: How to set up a server
« Reply #2 on: February 12, 2011, 09:52:17 AM »
@all Simutrans-server maintainter

update your server to r4198 or newer, please

4 server runs under a version smaller r4198

update your server in the next 24 hour, please
otherwise I disable this server

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: How to set up a server
« Reply #3 on: March 03, 2011, 01:01:28 PM »

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 17633
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to set up a server
« Reply #4 on: March 03, 2011, 10:56:03 PM »
That's a very useful and thorough guide - thank you for posting that!

Offline Frank

  • *
  • Posts: 1422
  • Languages: DE
Re: How to set up a server
« Reply #5 on: March 14, 2011, 06:20:05 PM »
@prissi

change this line in first post, please

announce_server = 1

to

announce_server = [serverid]

Offline jamespetts gb

  • Simutrans-Extended project coordinator
  • Devotee
  • *
  • Posts: 17633
  • Cake baker
    • Bridgewater-Brunel
  • Languages: EN
Re: How to set up a server
« Reply #6 on: June 07, 2011, 09:50:28 AM »
For specific information on how to set up a Simutrans-Experimental server, see here.

Offline sdog

  • Devotee
  • *
  • Posts: 2039
Re: How to set up a server
« Reply #7 on: September 18, 2011, 07:49:57 PM »
Timothy,
you had some of the busiest servers running. Can you give some advise on your experience in regard to Memory and Cpu demand?

Offline Ashley

  • Coder/Patcher
  • Devotee
  • *
  • Posts: 1288
    • entropy.me.uk
Re: How to set up a server
« Reply #8 on: September 18, 2011, 10:56:02 PM »
CPU demand is pretty low, spiking during player joins for save/load.

Memory scales with map size and map complexity (it'll creep up over time as a map is developed) so it's hard to give a firm recommendation really.

Offline prissi

  • Developer
  • Administrator
  • *
  • Posts: 9238
  • Languages: De,EN,JP
Re: How to set up a server
« Reply #9 on: September 20, 2011, 09:21:21 PM »
Virtual server tend to be really slow during maps downloads or so was rumored in the german forum. However during play not much problems (since simutrans loads the CPU not very uniform, and spikes are served using other virtual servers CPU time.) But you will need at least 256 MB (or 512 MB for larger paks) garanteed main memory.

Offline An_dz

  • Web Admin
  • Administrator
  • *
  • Posts: 2831
  • D'oh
    • by An_dz
  • Languages: pt, en, it, (de)
Re: How to set up a server
« Reply #10 on: September 21, 2011, 03:53:36 PM »
Just updated the Play Online page at the wiki and there's a lot of info on how to set and join a server.
Worth a look. Also with info for Experimental Servers. Not enough info? Feel free to edit it.