Author Topic: [Guide] Hosting a server on a Raspberry Pi (ARM) with Docker  (Read 2916 times)

your teammate

  • PGP
  • Posts: 7
I have occasionally seen people ask about this, and it turns out it's actually doable and somewhat simple.
The usual answer would be that it's impossible because the game is built only for x86 but the Raspberry Pi has an ARM CPU. But with the help of qemu we can emulate an x86 CPU on ARM! To avoid a lot of manual work we will use my docker image to run a dp2 server https://hub.docker.com/r/nukla/paintball2.
So first we have to install the necessary tools on Raspberry Pi OS:
Code: [Select]
sudo apt install qemu-user-static qemu-user docker.io
This will install docker and qemu. Qemu will be registered to run x86 binary files without any additional steps.
Then we create a folder that will hold the pball directory (maps/configs/etc.). Do it as a local user and not as root!
Code: [Select]
mkdir /some/random/path/to/a/folder/
Then we just run the docker image like this
Code: [Select]
docker run -p 27910:27910/udp -v  /some/random/path/to/a/folder/:/paintball2/pball/ -it nukla/paintball2
Be sure to replace /some/random/path/to/a/folder/ with your own path to your directory.
The server should be running now.

If you want to have the server auto-start and run in the background, run the docker command like this instead
Code: [Select]
docker run --restart=always -d -p 27910:27910/udp -v /home/pi/dp2serv/:/paintball2/pball/ nukla/paintball2

If you need custom launch arguments for the server have a look at the example in the docker hub readme.