Skip to content
ihptru edited this page Jan 12, 2013 · 9 revisions

Original developer keks-n
Ported into OpenRA by ihptru


State: working; search for dedicated related bug reports


Requirements:
Linux - works
Windows - help testing
Mac OSX - help testing

Mods supporting dedicated:
RA - yes
CNC - yes
D2k - yes


To run:

  • Fetch required version of OpenRA
              If you compile from sources you will have to edit mods/<mod name>/mod.yaml to specify correct version!
              a) Compile ( make all )
  • It's better if you run OpenRA Dedicated server from bash script with "while loop" because it can crash and you won't even know about it.
        a) Create a file "start.sh" inside of OpenRA root directory
        b) Put next contents into it:
#!/bin/bash
Name="My_Dedicated_Server"
Mod="ra"
Dedicated="True"
DedicatedLoop="True"
ListenPort=1234
ExternalPort=1234
AdvertiseOnline="True"
Map="ba403f6bcb4cae934335b78be42f714992b3a71a"

while true; do
     mono OpenRA.Game.exe Game.Mods=$Mod Server.Dedicated=$Dedicated Server.DedicatedLoop=$DedicatedLoop \
     Server.Name=$Name Server.ListenPort=$ListenPort Server.ExternalPort=$ExternalPort \
     Server.AdvertiseOnline=$AdvertiseOnline Server.Map=$Map
done
  • Change file permissions ( chmod +x start.sh ) and run it ( ./start.sh )

Special notes:

  • Using Null Renderer, Null SoundEngine
  • Ignores DEV versions to join
  • A first client is admin; if admin leaves, last connected client becomes a new admin
  • A new instance is spawned once previous game is finished (counting that you are using Server.DedicatedLoop=True). If game is started with 1 client, a new instance is spawned immediately (we can destroy OpenRA process - it will not affect client's game)
  • If you know some coding, you can easily forbid cheats/kick/bots/force-start/spot-clothing on server side.

Special abilities:

  • You can configure TimeOut after which started game have to be self-eliminated. Settings option:
             Server.TimeOut=value
              where <value> is a digit in miliseconds (1000 miliseconds = 1 second)
  • You can create a Black-IP-List containing a list of IP addresses which are forbidden to join server. Settings option:
             Server.Ban: IP1,IP2,IP3,...,IPn

You can add a MOTD on your server by creating file motd_<modname>.txt (where <modname> is ra, cnc or d2k) in OpenRA Support Directory, which is /home/<user>/.openra/ in Linux.

Clone this wiki locally