Umair-khurshid/Xonotic-Server
An updated Dockerized Xonotic game server for fast and easy deployment
Xonotic Gaming Server
This repository contains an updated Dockerfile to easily set up and host Xonotic gaming server using Docker. Xonotic is a fast-paced first-person shooter that you can host and play online with friends.
Requirements
- Make sure Docker is installed on your system.
How to Use
Step 1: Pull the Docker Image
Just pull docker image:
docker pull umair101/xonotic-server:v1.1
Alternatively, you can also build from the Dockerfile by cloning this repo.
Step 2: Run the Docker Container
Once you have pulled the docker file or cloned the repo you can run the Xonotic server with the following command:
docker run -d --name xonotic-server -p 26000:26000/udp -p 26000:26000 umair101/xonotic-server:v1.1Explanation:
-dRuns the container in detached mode (background).--name xonotic-serverGives your container a name (you can change it).-p 26000:26000/udpExposes the default UDP port for Xonotic (port 26000).-p 26000:26000Ensures the TCP port is also mapped if needed (may depend on your server setup).umair101/xonotic-server:latestSpecifies the image to use.
Step 3: Connect to Your Server
Once the server is up and running, you can connect to it from your Xonotic game client using the your IP address:
<Your_Server_IP>:26000
Step 4: Stop the Server
To stop the server, run the following command:
docker stop xonotic-serverTo remove the container after stopping it:
docker rm xonotic-serverStep 5: Customize the Server
You can customize the Xonotic server by editing the configuration file server.cfg located in the /opt/Xonotic/data/ directory. To do this:
-
Access the Container:
docker exec -it xonotic-server bash -
Edit the Configuration:
Edit theserver.cfgfile using a text editor inside the container:nvim /opt/Xonotic/data/server.cfg
-
Restart the Server to apply changes:
docker restart xonotic-server
Additional Notes
- Persistence:
By default, the container will not store persistent data. If you want to preserve server data (e.g., configuration, maps, etc.), mount a host directory as a volume:docker run -d --name xonotic-server -p 26000:26000/udp -v /path/to/your/server/data:/opt/Xonotic/data xonotic-server