Server Setup

From #openttdcoop wiki

Revision as of 18:29, 10 March 2014 by Taede (Talk | contribs) (Server details)

Jump to: navigation, search

Server details

publicserver-new.openttdcoop.org
Name Address Port Admin Port IRC channel Directory
Public Server publicserver-new.openttdcoop.org 3979 (3983) 4079 (3980) #openttdcoop ~/svn-publicserver/
games.openttdcoop.org
Name Address Port Admin Port IRC channel Directory
Nightly nightly.openttdcoop.org 3997 3996 #openttdcoop.nightly ~/svn-nightly/
ProZone pz.openttdcoop.org 3982 3981 #openttdcoop.pro ~/svn-prozone/
Welcome Server stable.openttdcoop.org 3999 3098 #openttdcoop.stable ~/svn-stable/

Permanent servers should have unique game- and adminports assigned to them. Temporary servers should all share the same ports, and also the same irc-channel. This makes it easier to switch CoopServer between them. Portnumbers in () are temporary, and will be removed once the ports are updated

Directory Structure

Each server should adhere to the following directory structure:

Top directory

Contains the SVN checkout, existing files should not be altered manually. The subdirectories bin/, bundle/, media/, os/, projects/ and src/ are also part of the SVN checkout and should not be altered manually.

Patches/ (NOT YET IMPLEMENTED)

Contains patches to applied to the source. Unless the server is meant to test patches for multi-player compatibility, patches in here should be multi-player safe. No changes in savegame allowed either, we want people to be able to download and play these games in vanilla OpenTTD.

Server/

In here is the actual running server. important files include:

  • content_download: This should sym-link to shared content_download per user, generally ~/content_download/
  • ofs-*: Filehandling scripts used by Soap. These can be executed manually for troubleshooting.
  • openttd: The game, need I say more? Preferably use ofs-start.py to start it rather than simply running ./openttd. Ofs-start will ensure the right cfg file and latest autosave gets loaded
  • openttd.cfg: Server configuration file
  • openttd.log: As OpenTTD now gets started with -D -f and no longer within a screen session, the console output gets logged into this file. use 'tail -f openttd.log' if you need a live feed of console output
  • openttd.pid: Used by ofs-start to determine wether openttd is already running or not. Contains the pid from the last time ofs-start started the server
  • save/autosave/: Ofs-start will load the most recent savegame from here, including autosavesoap.sav (generated when Soap shuts down the server for restart/update etc.)
  • save/uploads/: Set ofs-getsave to download savegames into this directory.

Web/

This directory willbe accessible through http as http://<serveraddress>/<port>/. Ofs-scripts will place some files here needed by tools such as Zuu's Ottdau.

  • finger/openttd: Contains a line similar to the ones in openttd.org's finger.txt, with the branch and revision used.


Required extras

Openttd File Scripts (OFS, http://dev.openttdcoop.org/projects/ofs)

These file scripts should be installed in the server/ directory, where the server binary is located. Configure these for the above directory structure by editing the appropriate scripts. Each one contains a few configuration lines at the top of the file. For more information see the included README.txt


CoopServer (Soap)

A bot-owner has to add the server to the CoopServer irc-bot.

  1. Make CoopServer join the channel using '!join #channel'
  2. Use '!config channel plugins.Soap.<variable> <value>' from within the channel to set up the various settings. See Soap's config.py (available online at http://dev.openttdcoop.org/soap) for a description of what each one does. The defaults make sense. Make sure that you do not set the adminport password in the channel!! For that use '!config channel <channel> plugins.Soap.password <password>' in a private message to the bot.
  3. Last but not least, the channel will need to be added to plugins.Soap.channels. First use '!config plugins.Soap.channels' without any value to get the current one. run the same command again, this time adding the existing channellist as well as the channel to be added: '!config plugins.Soap.channels #openttdcoop #openttdcoop.stable'.
  4. use '!reload Soap' to reload the plugin so that it will read the new server configuration. Warning: will cause all existing servers to momentarily lose connection. Those with autoConnect=True will automatically reconnect though.
  5. Test it. use '!start' and '!apconnect' to check that everything works as you expect it to work.
Powered by MediaWiki