Xonotic Forums
Docker Xonotic Dedicated Server - Printable Version

+- Xonotic Forums (https://forums.xonotic.org)
+-- Forum: Support (https://forums.xonotic.org/forumdisplay.php?fid=3)
+--- Forum: Xonotic - Server Administration (https://forums.xonotic.org/forumdisplay.php?fid=16)
+--- Thread: Docker Xonotic Dedicated Server (/showthread.php?tid=8116)



Docker Xonotic Dedicated Server - ich777 - 08-16-2019

Hello everyone!

I want to inform you that i've created a Docker image (mainly for Unraid) for Xonotic Dedicated Server it will automaticaly download the prefered version entered in the startup commands, download all the needed files and start it.

Here are the startup commands:

Code:
docker run --name Xonotic -d \
   -p 3979:3979/tcp \
   -p 3979:3979/udp \
   --env 'GAME_PARAMS=' \
   --env 'GAME_VERSION=0.8.5' \
   --env 'UID=99' \
   --env 'GID=100' \
   --volume /mnt/user/appdata/xonotic:/serverdata/serverfiles \
   --restart=unless-stopped \
   ich777/xonotic:latest


GAME_PARAMS = Enter your extra start up commands for the server if needed otherwise leave blank.
GAME_VERSON = Enter your prefered game version (downgrade and upgrade is always possible) the docker will check for a newer version or the prefered version on startup
UID = the UID of the User (don't change unless you know what you are doing)
GID = the GID of the Group (don't change unless you know what you are doing)
volume = the path where to save the files on your server to get easy acces to
restart=unless-stopped = the container will automaticaly restart if it crashes

If anyone has any questions feel free to ask. [Image: icon_wink.gif]


Regards, ich777


RE: Docker Xonotic Dedicated Server - poVoq - 08-20-2019

Very nice thanks for that. Maybe there could be an official repository for docker images?
One to run a dedicated server, maybe one to make reproducible builds of the engine etc.


RE: Docker Xonotic Dedicated Server - ich777 - 08-22-2019

(08-20-2019, 04:02 PM)poVoq Wrote: Very nice thanks for that. Maybe there could be an official repository for docker images?
I will maintain the docker very well and if something is not working go to the unraid forums or post a comment in this thread.


(08-20-2019, 04:02 PM)poVoq Wrote: One to run a dedicated server, maybe one to make reproducible builds of the engine etc.
I don't understand the question fully... What did you mean with reproducible builds of the engine?
I personally don't play the game i only made the docker because someone on the unraid forums requested it. Wink


RE: Docker Xonotic Dedicated Server - poVoq - 08-22-2019

(08-22-2019, 03:52 AM)ich777 Wrote:
(08-20-2019, 04:02 PM)poVoq Wrote: One to run a dedicated server, maybe one to make reproducible builds of the engine etc.
I don't understand the question fully... What did you mean with reproducible builds of the engine?
I personally don't play the game i only made the docker because someone on the unraid forums requested it. Wink

like explained here: https://sweetcode.io/using-docker-reproducible-build-environments/


RE: Docker Xonotic Dedicated Server - BuddyFriendGuy - 09-21-2019

Good job. I, too, have run my servers (game server + map server) under docker (with docker-compose) for a few years. I agree there should be at least two official images, or dockerfile/docker-compose.yml to make it easier for people to host their servers or work on the code.
1. Server
2. Compilation
I sort of remember seeing something done by -z-.
I don't have enough cycles these days to generalize the files, but would love to see this available for people.


RE: Docker Xonotic Dedicated Server - poVoq - 09-22-2019

(09-21-2019, 10:02 PM)Lyberta Wrote: How do you install Docker without installing proprietary software?

Could you explain your issue a bit better? Docker can be installed easily on any GNU/Linux system, no proprietary software involved AFAIK.


RE: Docker Xonotic Dedicated Server - poVoq - 09-23-2019

That is only referring to the Enterprise Edition.
When you install it from your regular packet manager you get the Community Edition, which really has all the features needed and is fully FOSS.
Putting it like that on the Wikipedia is pretty much spreading  FUD Sad


RE: Docker Xonotic Dedicated Server - Antibody - 09-24-2019

Yep, Docker is FOSS. Several of its components in the larger "Docker ecosystem" are not, however. I believe the tendency of that ecosystem to use more and more of those proprietary things was one of the driving forces behind the creation of rkt, which is most certainly Apache through-and-through.


RE: Docker Xonotic Dedicated Server - imome9a - 12-10-2019

Im using the following (slightly tweaked) docker run command:
docker run --name xonotic -d \
   -p 26000:26000/tcp \
   -p 26000:26000/udp \
   --env 'GAME_PARAMS=' \
   --env 'GAME_VERSION=0.8.2' \
   --env 'UID=99' \
   --env 'GID=100' \
   --env 'BASIC_URL=https://dl.xonotic.org/' \
   --volume /opt/docker-config/docker-xonotic:/serverdata/serverfiles \
   --restart=unless-stopped \
   ich777/xonotic:latest
I get the following errors as reflected in my docker logs for this container:
---Setting umask to 000---
---Xonotic not found!---
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file xonotic-0.8.2.zip: Permission denied
  0  945M    0 16384    0     0  20608      0 13:21:30 --:--:-- 13:21:30 20582
curl: (23) Failed writing body (0 != 16384)
---You probably entered a wrong version number the server zip is empty---
rm: cannot remove 'xonotic-0.8.2.zip': No such file or directory


RE: Docker Xonotic Dedicated Server - BuddyFriendGuy - 01-10-2020

(12-10-2019, 10:00 PM)imome9a Wrote: Im using the following (slightly tweaked) docker run command:
docker run --name xonotic -d \
   -p 26000:26000/tcp \
   -p 26000:26000/udp \
   --env 'GAME_PARAMS=' \
   --env 'GAME_VERSION=0.8.2' \
   --env 'UID=99' \
   --env 'GID=100' \
   --env 'BASIC_URL=https://dl.xonotic.org/' \
   --volume /opt/docker-config/docker-xonotic:/serverdata/serverfiles \
   --restart=unless-stopped \
   ich777/xonotic:latest
I get the following errors as reflected in my docker logs for this container:
---Setting umask to 000---
---Xonotic not found!---
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
  0     0    0     0    0     0      0      0 --:--:-- --:--:-- --:--:--     0Warning: Failed to create the file xonotic-0.8.2.zip: Permission denied
  0  945M    0 16384    0     0  20608      0 13:21:30 --:--:-- 13:21:30 20582
curl: (23) Failed writing body (0 != 16384)
---You probably entered a wrong version number the server zip is empty---
rm: cannot remove 'xonotic-0.8.2.zip': No such file or directory
Just saw this -- make sure your directory (/opt/docker-config/docker-xonotic) owner uid:gid is 99:100. It simply says curl cannot write into that directory.


RE: Docker Xonotic Dedicated Server - FAF - 04-02-2020

Thank you for this Smile
Can you provide a docker-compose v2 schema for easy stack deployment under portainer?


RE: Docker Xonotic Dedicated Server - UnsocialParrot - 09-29-2020

Hi. I've successfully installed this in docker, and it works. But how can I change server settings? I want to change server name, disable power-ups, and set 10-minutes time limit. I have tried to change those params in xonotic/server/server.cfg and restart the container, but that is not working. Should I use GAME_PARAMS instead?

UPD: I've found the solution. You should edit xonotic/data/server.cfg and not xonotic/server/server.cfg.


RE: Docker Xonotic Dedicated Server - BuddyFriendGuy - 10-08-2020

(04-02-2020, 02:59 PM)FAF Wrote: Thank you for this Smile
Can you provide a docker-compose v2 schema for easy stack deployment under portainer?

I lost my v2 schema, but here's my 3.7.


RE: Docker Xonotic Dedicated Server - ich777 - 12-07-2021

Sorry for the late response but seems like I didn't receive mails from the forum.

If someone needs the source there you go: https://github.com/ich777/docker-xonotic-server


RE: Docker Xonotic Dedicated Server - angelettif - 08-08-2022

Can you upgrade the image to 0.8.5 ?
also how do I use the param option, can you give an example ?


RE: Docker Xonotic Dedicated Server - ich777 - 08-09-2022

(08-08-2022, 10:43 PM)angelettif Wrote: Can you upgrade the image to 0.8.5 ?
also how do I use the param option, can you give an example ?

Sure thing, but my containers work a little different and they check for updates on each container start/restart
Simply append a variable like:
Code:
--env 'GAME_VERSION=0.8.5'
to your docker run command and it will pull the version that you specify there like described here.
Anyways I will update the container so that in the Docker file also has this version in it.

You are talking about the GAME_PARAMS option I think...
If so you can use it also as a variable at the docker run command for example if you want to add a specific server.cfg file:
Code:
--env 'GAME_PARAMS=+serverconfig server.cfg'


Hope that helps.


RE: Docker Xonotic Dedicated Server - FAF - 08-14-2022

(08-09-2022, 12:31 AM)ich777 Wrote:
(08-08-2022, 10:43 PM)angelettif Wrote: Can you upgrade the image to 0.8.5 ?
also how do I use the param option, can you give an example ?

Sure thing, but my containers work a little different and they check for updates on each container start/restart
How does it run?
How efficient?
How many players?

To run in Docker would solve a lot of issues, if it runs perfect that is.


RE: Docker Xonotic Dedicated Server - ich777 - 08-14-2022

(08-14-2022, 10:08 AM)FAF Wrote:
(08-09-2022, 12:31 AM)ich777 Wrote:
(08-08-2022, 10:43 PM)angelettif Wrote: Can you upgrade the image to 0.8.5 ?
also how do I use the param option, can you give an example ?

Sure thing, but my containers work a little different and they check for updates on each container start/restart
How does it run?
How efficient?
How many players?

To run in Docker would solve a lot of issues, if it runs perfect that is.

Just as if you run it on bare metal on Linux.
Just as efficient if you run it on bare metal on Linux.
I think that is up to you and how many players you machine can handle.

Nobody has yet responded that ti performs worse or is any different than if you run it on bare metal, I think I saw someone on the Unraid Forums run it with 32 players if I'm not mistaken.


RE: Docker Xonotic Dedicated Server - FAF - 08-15-2022

(08-14-2022, 12:07 PM)ich777 Wrote:
(08-14-2022, 10:08 AM)FAF Wrote:
(08-09-2022, 12:31 AM)ich777 Wrote:
(08-08-2022, 10:43 PM)angelettif Wrote: Can you upgrade the image to 0.8.5 ?
also how do I use the param option, can you give an example ?

Sure thing, but my containers work a little different and they check for updates on each container start/restart
How does it run?
How efficient?
How many players?

To run in Docker would solve a lot of issues, if it runs perfect that is.

Just as if you run it on bare metal on Linux.
Just as efficient if you run it on bare metal on Linux.
I think that is up to you and how many players you machine can handle.

Nobody has yet responded that ti performs worse or is any different than if you run it on bare metal, I think I saw someone on the Unraid Forums run it with 32 players if I'm not mistaken.

Thank you for your answer. I know Docker is fast, just wondering, you know.

There is also AMP Pro, which has the ability to run xonotic in Docker, just heard something about the crypto key not being able to function properly.

I will investigate and test some.

Thank you again.