Dedicated ioquake3 server
Run a dedicated ioquake3 server on GCP.
- Build, tag and upload the Docker image to your Google Container registry:
docker-compose build --no-cache ioquake3
docker tag ioquake3server_ioquake3 gcr.io/<your GCP project>/ioquake3-ded:<tag>
docker push gcr.io/<your GCP project>/ioquake3-ded:<tag>
(Note: Don't forget to update the tag if you're uploading a new version.)
(Note 2: Don't forget to copy the baseq3
folder from your original CD-ROM to the ioquake3
folder.)
(Note 3: Modify server.cfg
in the ioquake3
folder to give your server a name and password.)
- A Google service account and its credentials placed in a file called
ioquake3.json
in the root folder.
(Note: Add the following permissions: Compute Admin
, Service Account User
, Storage Object Viewer
.)
- Adapt
variables.auto.tfvars
to your needs, don't forget to changedocker_declaration
terraform init
to get the pluginsterraform plan
to see the infrastructure planterraform apply
to apply the infrastructure buildterraform destroy
to destroy the built infrastructure
- Reserve IP address
gcloud compute addresses create ioquake3-ip \
--region <your desired GCP region> --project <your GCP project>
- Show IP address
gcloud compute addresses describe ioquake3-ip \
--region <your desired GCP region> --project <your GCP project>
- Create VM
gcloud compute instances create-with-container ioquake3 \
--container-image gcr.io/<your GCP project>/ioquake3-ded:<tag> \
--machine-type f1-micro \
--project <your GCP project> \
--zone <your desired GCP zone> \
--tags ioquake3-server \
--address <ip address>
(Note: Replace IP address with actual reserved IP address.)
- Create Firewall rule
gcloud compute firewall-rules create allow-ioquake3 \
--allow tcp:27950,tcp:27952,tcp:27960,tcp:27965,udp:27950,udp:27952,udp:27960,udp:27965 \
--target-tags ioquake3-server --project <your GCP project>
- Delete IP address
gcloud compute addresses delete ioquake3-ip --project <your GCP project> --region <your GCP region>
- Delete VM
gcloud compute instances delete ioquake3 --project <your GCP project> --zone <your GCP zone>
- To connect to the console of your dedicated ioquake3 server type the following in your local console:
/set rconaddress <ip address>:<port>
/set rconpassword <your server console password>
(Note: See seta rconPassword ...
in server.cfg
for your server console password.)
levels.cfg
comes with an opinionated rotation of levels, to change in game do:
/rcon map <map>