Difference between revisions of "Server Administration"

From #openttdcoop wiki

Jump to: navigation, search
m (Editing the openttd.cfg)
(Basic SVN Commands)
Line 28: Line 28:
  
 
=== Basic SVN Commands ===
 
=== Basic SVN Commands ===
* We are updating our Server's via SVN: '''svn up -r $revision_number && ./configure -D && make'''
+
 
 +
Use the update script: '''./update''' (automatically update to last nightly revision)
 +
 
 +
<div style="font-size: x-small;">* We are updating our Server's via SVN: '''svn up -r $revision_number && ./configure -D && make'''
  
 
* Sometimes everything is screwed up and we need to check out a new version (its very bad if this happens):
 
* Sometimes everything is screwed up and we need to check out a new version (its very bad if this happens):
Line 34: Line 37:
 
** Remove the corrupt copy: '''rm -rf ~/svn-coop'''
 
** Remove the corrupt copy: '''rm -rf ~/svn-coop'''
 
** Check out a new working copy via svn: '''svn co -r $revision_number svn://svn.openttd.org/trunk svn-coop'''
 
** Check out a new working copy via svn: '''svn co -r $revision_number svn://svn.openttd.org/trunk svn-coop'''
<!--
 
** The Source should be patched with dihedrals reload patch.: '''patch -p0 < ~/network_nextgame_reload_cfg.patch''' (Sometimes, there are also other patches.)
 
** Configure and Compile: '''./configure --revision=r$revision_number && make''' (without M)
 
-->
 
 
** Restore files from the backup like grfs and openttd.cfg
 
** Restore files from the backup like grfs and openttd.cfg
** folder save is linked to webpage: '''ln -s ~/website/blog/files/publicserver_archive save''' in ./bin
+
** edit ~/website/rev to $revision_number</div>
 +
 
 +
'''Revision URL: Please check <nowiki>http://$server/rev</nowiki> for showing current revision.'''
  
 
=== Using rcon ===
 
=== Using rcon ===

Revision as of 14:32, 4 April 2008

On this page all the needed commands are shown to administrate a Server via SSH and especially those for administrating the #openttdcoop Servers

Directories (Addresses)

Starting the Server (via autopilot)

  • Start a new game: ./autopilot.tcl new
  • Load the default savegame (save/game.sav): ./autopilot.tcl load
  • Load another savegame: ./autopilot.tcl load save/game/path.sav

Reloading the Server (via console)

  • configure settings with Progman's Config Tool
  • save current game with save game$Number (Recommend to add a number, so you can find it better for archiving.)
  • Reload server: newgame

Editing the openttd.cfg

Common things should be edited with the Configuration Tool: http://openttdcoop.org/config/

Before you start a new game, the config file has to be edited. Map-Size, diff_custom, NewGrfs and need to be set.
  • To edit openttd.cfg via SSH you should use vim: vi openttd.cfg
  • To search for a string change to search-mode with ? and type your search string, with n you can jump to next result.
  • To edit a value you have to change to the insert mode with i, then you can edit the values
  • To save and leave vim, leave any mode first with ESC, and type :wq (: = command mode)
  • To leave without saving type :q!
  • Some values are a bit confusing, i.e. diff_custom, you can find details about this value on the openttd.org wiki page

Basic SVN Commands

Use the update script: ./update (automatically update to last nightly revision)

* We are updating our Server's via SVN: svn up -r $revision_number && ./configure -D && make
  • Sometimes everything is screwed up and we need to check out a new version (its very bad if this happens):
    • Backing up the old data: i.e. cp -r ~/svn-coop/bin ~/backup
    • Remove the corrupt copy: rm -rf ~/svn-coop
    • Check out a new working copy via svn: svn co -r $revision_number svn://svn.openttd.org/trunk svn-coop
    • Restore files from the backup like grfs and openttd.cfg
    • edit ~/website/rev to $revision_number

Revision URL: Please check http://$server/rev for showing current revision.

Using rcon

Some values have to be change in runtime, you can do this really easy with Remote Connection in-game. If you are connected to the Server toggle the Console with ^ and use commands:

  • To pause/unpause the game: rcon password pause/unpause
  • To change a patch setting: rcon password "patch patch_setting value" (don't forget the breakets)
    • To view a value of a setting: rcon password "patch patch_setting"
    • Some settings use namespaces: i.e. "patch yapf.rail_use_yapf"

Archiving a Game

If a game is done do the following steps via SSH:

  • exit (=save+exit) the game, the game will be saved to the default save: save/game.sav
  • copy the file to the archive: cp save/game.sav save/PublicServerGame_$Number_Final.sav (save is linked to web)
  • add a Report to the Wiki (if you don't have time, add at least the date and the used revision!)

Dedicated Servers

Ammler's server for high usage games.

SSH: ottdc@mozart.ammler.ch

Powered by MediaWiki