How to setup a dedicated server - Robosturm/Commander_Wars GitHub Wiki

Recommend steps

  1. Compile the latest release with AUDIOSUPPORT and GRAPHICSUPPORT turned off to save diskspace on the server

Mandatory steps

  1. Install the game on the server
  2. Optional: Install the fan mods you want to support without sounds and graphics on the server
  3. Optional (but highly recommended): Setup a mail-adress or mail server which gets smtp access to support. Resetting of account passwords.
  4. Setup the server in a way that it's reachable via the internet.
  5. Create a batch/shell-script to start the exe with the following command line options
    • -noUi --> to disables the rendering an poping of any window
    • -noAudio --> to disable any sound support
    • -createSlaveLogs --> optional but might be useful for debugging issues on the server. Note: This will create a log-file for each game started on the server
    • -server 1 --> to start the dedicated server upon launching
    • -slaveOptions --> a list of ip-adresses and port ranges which server uses to make games reachable for players. E.g ::1&10000&20000;::1&50000&65535 would allow the server to create games on the ip-address ::1 and the ports 10000 to 20000 and 50000 to 65535. The amount of port-ranges is the maximum amount of parallel games supported on your dedicated server
    • -serverListenAddress ::1 --> The ip-address on which the server will listen for new clients
    • -serverListenPort 9010 --> The port on which the server will listen for new clients.
    • -serverSlaveListenAddress ::1 --> The ip-address used by the server to exchange information with the running games hosted on the server. ::1 should be could enough in most cases
    • -serverSlaveListenPort 9009 --> The port used by the server to exchange information with the running games hosted on the server.
    • -serverSlaveDespawnTime 60000 --> Time in seconds after which inactive games get deleted on the server. Note: Finished games get closed immediatly after being finished
    • -mailServerAddress smtp.gmail.com --> optional email server address used to send smtp mails to accounts
    • -mailServerPort 465 --> port on the mail server used to send smtp mails
    • -mailServerConnectionType SSL --> connection type for the smtp server (TLS, TCP, SSL)
    • -mailServerUsername dummy --> Username for the mail server
    • -mailServerPassword dummy --> Password for the mail server
    • -mailServerSendAddress [email protected] --> Mail-Adress used to send the smtp mails
    • -mailServerAuthMethod Login --> login method on the mail server (Plain, Login)

Note: Several of this command line options can also be setup in the Commander_Wars.ini-file depending on your preference

Example startline:

commanderwars.exe -noUi -noAudio -createSlaveLogs -server 1 -slaveOptions ::1&10000&20000;::1&50000&65535 -serverListenAddress ::1 -serverListenPort 9010 -serverSlaveListenAddress ::1 -serverSlaveListenPort 9009 -serverSlaveDespawnTime 60000 -mailServerAddress smtp.gmail.com -mailServerPort 465 -mailServerConnectionType SSL -mailServerUsername dummy -mailServerPassword dummy -mailServerSendAddress [email protected] -mailServerAuthMethod Login