How to create and maintain a dom2 server

I have this linux box at my house that hosts one of my websites and does mail for me and stuff, so I was thinking why not put up a dom2 server. Is there any guides out there?

Nick or Zen will be along shortly I am sure :)

Peter

Easy peasy.

Here is Le Puma’s guide to having your own dom2 server in 10 simple steps.

I. Take dom2 disk and install game. Yes, the linux install is on the same disk as the windows install. Fire up a game and play a little to make sure the install is good.

  1. Configure your mail subsystem so you can use sendmail from scripts. For some people this is the hardest part. It sounds like you’ve already got that configured, so lucky you :)

  2. Configure your firewall+router to allow incoming connections to your linux server on a random port. Pick a port number above 1024 that isn’t already used for something else. Each game you host gets it’s own port number so if you want to host multiple games you do this for a whole list of ports.

  3. Find some players and have everyone give you pretender files and email addresses.

  4. Start your dom2 on your linux server and create the game through the gui, just like a normal SP game except that you specify lots of human nations and no AI nations. Make sure you set a master password and make sure the game name is memorable and easy to type.

  5. Create a notification script to send emails to everyone when the turn advances. Mine looks like this:

#!/bin/bash

[email protected]
[email protected]
[email protected]
[email protected]
[email protected]
[email protected]

sendmail [email protected] -FDomserver $PLAYER1 $PLAYER2 $PLAYER3 $PLAYER4 $PLAYER6 $PLAYER7 <<EOF
From: Nick’s Dom2 Server <[email protected]>
Subject: QT3Journal has hosted
Please connect to host YYYY port XXXX to play your next turn
.
EOF

Obviously the email addresses, the server name/port, and the from addresses will need to be tweaked for your local values.

  1. Start the game. This is done from the commandline with a command similar to

nohup dom2 --textonly --tcpserver --port XXXX --hours 48 --quickhost --postexec /some/dir/mynotificationscript.sh GAMENAMEHERE &

  1. Check the output file (nohup.out) every once in awhile to make sure the game doesn’t crash.

  2. ??

  3. Profit

The Le Puma/Underpants Gnome merger has finally punched through. Damn investment sharks!

Good one! Can this … er… be done in windows somehow easily? :o

…Dom2 needs more servers. I look forward to playing on it :)

Peter

It’s as easy but without command lines.

You can find a Perl script to automate Emails (as well as placing Perl on your system). Bruce has this availiable on his site as well as walkthru.

Because of the nature of Dom2 (currently) it is also unadvisable to use the same Dom2 directory for multiple games on a server, as sometimes the .tmp file will overlap causing corruptions. Though that is currently being fixed by IW.

Ok, so you can run it from command line? cool. I suppose I could cron it for the length of the game.

???

Is there a specific write-up of the causes/symptoms of that little bug? I run 5 games concurrently and never run into problems.

No need to use cron to schedule anything. The game takes care of accepting network connections from clients, uploading/downloading trn/2h files, and forcing the turn turn to advance either when everyone is done or when a timer has passed. Pretty sweet actually.

[quote=“Zen”]

The Le Puma/Underpants Gnome merger has finally punched through. Damn investment sharks![/quote]

<Dom2 Nerd>
Are you kidding, with those 3-earth and that built in reinvig+rp bonus+immortality+construction bonus, who wouldn’t want underpants gnomes on their side! The upkeep is a little steep, but you pay it for quality researchers.
</Dom2 Nerd>

[size=1]If I ever do a mod, it will be a tongue-in-cheek mod. And it will have underpants gnomes. And the lords of hell will wear berets.[/size]

No need to use cron to schedule anything. The game takes care of accepting network connections from clients, uploading/downloading trn/2h files, and forcing the turn turn to advance either when everyone is done or when a timer has passed. Pretty sweet actually.[/quote]

oh yeah, it’s in the command line. I didn’t notice that. Pretty cool indeed.

Yah, if you can guess the name of the script! I don’t see anyway to get a file listing from maladjustite. Do you have a link?

The Mighty Bolthorn and the moose legions respond:

http://www.maladjustite.com/dom2_hosting.htm

big old 404 on that one, good buddy. roger

Breaker, breaker, fuzz caught the end Mother Bird

http://www.maladjustite.com/dom2_hosting.html

Roger.

Cool.

Roger