[Guide] Dedicated server on Mac, Windows or Linux using Docker

Posts: 59
Joined: Wed 5 Oct 2011 14:25

[Guide] Dedicated server on Mac, Windows or Linux using Docker

Postby Looter » Thu 21 Jan 2016 03:08

I have created a Docker image that will allow you to run a Wargame dedicated server on Mac, Windows or Linux very easily, even on 64 bit platforms. The primary requirement is that you read the docker docs on how to get docker setup and working on your operating system properly. Once that is finished and you have ensured Docker is working correctly on your machine, setting up the server takes less than 5 minutes.


From the Docker terminal, run the following, making sure you change the rcon password and IP to the correct values.

Code: Select all

docker run -d --privileged -p 10001:10001 -p 10001:10001/udp -p 10002:10002 -p 10002:10002/udp --name=wargame looterz/wargame +port 10001 +rcon_port 10002 +port_mms 10804 +rcon_password changeme +ip x.x.x.x

This will download and install the wargame server image to your virtual machine and start it automatically. Since the required information to run a server is not setup yet, let's go ahead and do that now.

First, we need to find out the ContainerID that was generated by Docker, to do this run the following

Code: Select all

docker ps

You should see one container currently which is the wargame server. Save this ID, and run the following to open a terminal session on the virtual machine.

Code: Select all

docker exec -it ContainerID bash
export TERM=xterm

We are now inside of the virtual machine and can edit all of the configuration files using nano or vim, whichever you prefer. Fill in your provided details from Eugen Support inside of login.ini, tweak the variables for the server inside of variables.ini, and when finished exit back to your main operating systems terminal.

Restart the server with the new configuration by running the following,

Code: Select all

docker restart ContainerID

Let's now forward the ports inside the VM using ufw

Code: Select all

ufw allow 10001/tcp
ufw allow 10001/udp
ufw allow 10002/tcp
ufw allow 10002/udp
ufw enable

Now, the last step is to forward ports 10001-10002 for your machine and network so that the server can communicate with wargame's master servers properly. Since this part is widely dependant on your OS and Router theres not much advice I can offer, other than if you are on Windows or Mac and are using VirtualBox to work with Docker you need to configure VirtualBox to forward the ports as well, which is on the documentation for docker.


You can easily host multiple servers using this image by changing the ports from 10001, 10002 to 10003, 10004, etc. increment the range for each server for up to 5 servers per wargame key.

If you would rather edit the configuration files on your desktop, you can easily transfer files to the container using the following,

Code: Select all

docker cp file.ini containerid:/home/wargame3_server/file.ini

If you would like to view the server log without going into a terminal session, you can do so as follows

Code: Select all

docker restart containerid
docker logs containerid

The source code for this docker image is available here and contributions are welcome.
Last edited by Looter on Sun 24 Jan 2016 15:17, edited 2 times in total.

User avatar
Lieutenant General
Posts: 4226
Joined: Wed 13 Jul 2011 16:06

Re: [Guide] Dedicated server on Mac, Windows or Linux using Docker

Postby Shifu » Thu 21 Jan 2016 18:59

Changed topic type to: Sticky.

Posts: 28
Joined: Wed 11 Dec 2013 17:55

Re: [Guide] Dedicated server on Mac, Windows or Linux using Docker

Postby ccrraaiigg007 » Sat 23 Feb 2019 21:13

The repository for this project appears to be gone.

Return to “Dedicated Server”

Who is online

Users browsing this forum: No registered users and 2 guests