├── quake_logo.jpg ├── docker-compose.yml.example ├── Dockerfile ├── server.cfg.example └── README.md /quake_logo.jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/InAnimaTe/docker-quake3/HEAD/quake_logo.jpg -------------------------------------------------------------------------------- /docker-compose.yml.example: -------------------------------------------------------------------------------- 1 | quake3: 2 | image: inanimate/quake3 3 | restart: always 4 | ports: 5 | - "27960:27960/udp" 6 | volumes: 7 | - /home/example/pak0.pk3:/usr/share/games/quake3/baseq3/pak0.pk3 8 | - ./server.cfg:/usr/share/games/quake3/baseq3/server.cfg 9 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM debian:jessie 2 | 3 | ## The Data from the official point release. 4 | ENV ioquake_data linuxq3apoint-1.32b-3.x86.run 5 | 6 | RUN echo "deb http://httpredir.debian.org/debian jessie contrib" >> /etc/apt/sources.list && \ 7 | apt-get update && \ 8 | apt-get install -y quake3-server \ 9 | wget && \ 10 | apt-get clean 11 | 12 | RUN rm -rf \ 13 | /var/lib/apt/lists/* \ 14 | /tmp/* \ 15 | /var/tmp/* \ 16 | /usr/share/locale/* \ 17 | /var/cache/debconf/*-old \ 18 | /var/lib/apt/lists/* \ 19 | /usr/share/doc/* 20 | 21 | WORKDIR /usr/share/games/quake3 22 | 23 | RUN wget "http://youfailit.net/pub/idgames/idstuff/quake3/linux/${ioquake_data}" && \ 24 | chmod +x ${ioquake_data} && \ 25 | ./${ioquake_data} --tar xvf && \ 26 | rm -rf ./${ioquake_data} 27 | 28 | USER Debian-quake3 29 | 30 | EXPOSE 27960/udp 31 | 32 | ENTRYPOINT ["/usr/games/quake3-server"] 33 | 34 | CMD ["+map", "q3dm17", "+exec", "server.cfg"] 35 | -------------------------------------------------------------------------------- /server.cfg.example: -------------------------------------------------------------------------------- 1 | // Optimized for easy, simple and fun with a few friends 2 | // Note: These are best effort and were mostly verified with /rcon cvarlist. 3 | // However, some may not apply or are tuned differently because of ioquake3! 4 | 5 | seta sv_hostname "MyQuake3Server" 6 | seta dedicated 1 // lan mode, use 2 for internet mode 7 | seta sv_maxclients 16 8 | seta g_motd "Welcome to My Quake3 Server." 9 | 10 | // Perf enhancements 11 | seta sv_fps 125 // set snaps on client to same value 12 | seta com_zoneMegs 128 // memory for engine code etc. 13 | seta com_hunkMegs 256 // main memory availability 14 | seta sv_maxrate 0 // dont set limit server-side 15 | 16 | // rcon and other server level configs 17 | seta rconpassword "mps" 18 | seta bot_nochat 1 19 | seta g_log server.log 20 | seta logfile 3 21 | seta bot_enable 1 22 | seta g_allowVote 1 // allow users to vote 23 | 24 | // Limits, either time, kills, or captured flags 25 | seta timelimit 7 26 | seta fraglimit 20 27 | seta capturelimit 2 28 | 29 | // Game Type! 30 | seta g_gametype 3 31 | // 0 Free for all 32 | // 1 Tournament 33 | // 2 Free for all deathmatch (Team Arena) 34 | // 3 Team deathmatch 35 | // 4 Capture the Flag 36 | // 5 One Flag Capture (Team Arena) 37 | // 6 Overload (Team Arena) 38 | // 7 Harvester (Team Arena) 39 | 40 | // Map cycle 41 | set d1 "map q3dm1 ; set nextmap vstr d2" // Arena Gate 42 | set d2 "map q3dm2 ; set nextmap vstr d3" // House of Pain 43 | set d3 "map q3dm3 ; set nextmap vstr d4" // Arena of Death 44 | set d4 "map q3dm4 ; set nextmap vstr d5" // The Place of Many Deaths 45 | set d5 "map q3dm5 ; set nextmap vstr d6" // The Forgotten Place 46 | set d6 "map q3dm6 ; set nextmap vstr d7" // The Campgrounds 47 | set d7 "map q3dm7 ; set nextmap vstr d8" // Temple of Retribution 48 | set d8 "map q3dm8 ; set nextmap vstr d9" // Brimstone Abbey 49 | set d9 "map q3dm9 ; set nextmap vstr d10" // Hero's Keep 50 | set d10 "map q3dm10 ; set nextmap vstr d11" // The Nameless Place 51 | set d11 "map q3dm11 ; set nextmap vstr d12" // Deva Station 52 | set d12 "map q3dm12 ; set nextmap vstr d13" // The Dredwerkz 53 | set d13 "map q3dm13 ; set nextmap vstr d14" // Lost World 54 | set d14 "map q3dm14 ; set nextmap vstr d15" // Grim Dungeons 55 | set d15 "map q3dm15 ; set nextmap vstr d16" // Demon Keep 56 | set d16 "map q3dm16 ; set nextmap vstr d17" // The Bouncy Map 57 | set d17 "map q3dm17 ; set nextmap vstr d18" // The Longest Yard 58 | set d18 "map q3dm18 ; set nextmap vstr d1" // Space Chamber 59 | vstr d1 // Launch the First Map! 60 | 61 | // Sets triggered after maps as to not get overwritten 62 | seta g_gravity 500 // default 800 63 | seta g_quadfactor 4 // multipler for quad something 64 | seta g_weaponrespawn 0 // no delay in weapon respawns 65 | seta g_weaponTeamRespawn 0 // needed for team deathmatch 66 | seta g_friendlyFire 0 // disables so you cant hurt your friends 67 | seta g_forcerespawn 1 // automatically respawns you back into the game when you die 68 | seta g_teamAutoJoin 1 // auto joins you to a team 69 | seta g_teamForceBalance 1 // auto balances teams 70 | seta g_inactivity 0 // no inactivity timer so you dont get kicked 71 | 72 | // Manual adding of bots. Syntax: 73 | // addbot name [skill] [team] [delay] 74 | //addbot Major 2 75 | addbot Sorlag 2 76 | //addbot Grunt 2 77 | //addbot Slash 2 78 | addbot Patriot 2 79 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 2 | ![Quake 3](https://raw.githubusercontent.com/InAnimaTe/docker-quake3/master/quake_logo.jpg) 3 | 4 | 5 | ### Quake 3 Dedicated Server Image 6 | 7 | A fancy containerized [quake3](https://en.wikipedia.org/wiki/Quake_III_Arena) dedicated server container. Get playing in no time! 8 | 9 | The config I have here is fairly generic but somewhat specific to the overall stock way I play this game with my friends. Either way, it's a great example to get going with if you'd like. If not, read below for more on configuration. 10 | 11 | Ideally, you would setup the config how you want, build, launch, and play. I sourced the `Dockerfile` and `bootstrap.sh` originally from the excellent [jberrenberg/quake3](https://hub.docker.com/r/jberrenberg/quake3) image. That image now doesn't build and so I've tagged and moved on creating my own debian based ioquake3 engine image. 12 | 13 | I wanted to thank the Debian Games Team for [this](https://packages.debian.org/stable/games/quake3-server) excellent package :) 14 | 15 | > You may also like - Containerized UT99 Server! https://github.com/InAnimaTe/docker-ut99-server 16 | 17 | #### Launching 18 | 19 | ##### The `server.cfg` way 20 | 21 | There is an included `docker-compose.yml.example` that shows the best way to launch this container and how to take care of the core dependencies: the retail `pak0.pk3`, the port forward for `27960/udp`, and optionally, your own `server.cfg`. 22 | 23 | > Note that the server.cfg must exist in the `/usr/share/games/quake3/baseq3` directory! 24 | 25 | If you decide to build and incorporate your own `server.cfg`, as is recommended, make sure you modify the `image` source or just use `build: .` in your `docker-compose.yml` :) 26 | 27 | You could also just `-v ./server.cfg:/usr/share/games/quake3/baseq3/server.cfg` on the command line. 28 | 29 | Some examples and resources when it comes to building your own `server.cfg`: 30 | * https://ioquake3.org/help/sys-admin-guide/ 31 | * https://github.com/MarioVilas/ioquake3-server-docker/blob/master/q3a/baseq3/server.cfg 32 | * https://github.com/yvesonline/ioquake3-server/blob/master/ioquake3/server.cfg 33 | * [Setting up your client for optimal performance!](https://www.quakearea.com/blog/q3-smoothness-guide.html) 34 | 35 | ##### The command way 36 | 37 | You can also pass in configuration options via passing them as docker commands either on the command line or in your `docker-compose.yml`. 38 | 39 | ``` 40 | docker run -d -v ./pak0.pk3:/usr/share/games/quake3/baseq3/pak0.pk3 inanimate/quake3 +fraglimit 150 41 | ``` 42 | 43 | A comprehensive list of possibilities can be found [here](http://www.joz3d.net/html/q3console.html). 44 | 45 | #### Maps 46 | 47 | I've set a default launch map of q3dm17, which is *The Longest Yard*, one of the more popular deathmatch maps. **This means you can just run the container straight off with no options and be playing instantly.** 48 | 49 | Ideally, we like to cycle through maps, starting from the first. It would be even better if we could set random for all *minus* a few we don't like (q3dm19 is not favorable to my tastes). See my included example `server.cfg` for how I cycle through maps. 50 | 51 | A great map breakdown can be seen [here](http://www.bosskey.net/q3a/maps/standard.html). 52 | 53 | #### Bots 54 | 55 | Please see [this](http://www.3dgw.com/guides/q3a/index.php3?page=configs.htm#serverbots) page for info on how to setup bots. 56 | 57 | Basically, you need `seta bot_enable 1` at the top of your config. After you define and start a map, you can then: 58 | 59 | ``` 60 | botadd Major 3 61 | botadd Sorlag 2 62 | ``` 63 | 64 | > Bot names must be one of the supported character names! They **cannot** be custom! 65 | 66 | #### RCON Quick Cheatsheet 67 | 68 | > Use chatgpt for more on how and what to use! 69 | 70 | * `/rconpassword ` - login to server (after pushing tilde) 71 | * `/rcon map q3dm14` - change map 72 | * `/rcon g_gravity` - check the value of gravity 73 | * `/rcon exec bots.cfg` - load another config live (only applies settings that don't require server restart) 74 | * `/rcon map_restart` - reload the map, needed after some settings for them to apply 75 | * `/rcon kickbots` - kick all bots currently playing 76 | * `/rcon cvarlist` - show all active settings and variables in effect 77 | 78 | #### Troubleshooting 79 | 80 | ``` 81 | docker logs quake3 82 | ``` 83 | 84 | Yep, the server logs to stdout/stderr! 85 | 86 | #### Linkage 87 | 88 | Here are some really helpful links for setting up the `server.cfg` and utilizing rcon. 89 | 90 | http://it.rcmd.org/networks/q3_install/q3_linux_server_howto.php#step9 91 | 92 | http://www.tldp.org/HOWTO/archived/Game-Server-HOWTO/quake3.html 93 | 94 | http://gaming.stackexchange.com/questions/46735/quake-3-private-server-with-bots 95 | 96 | http://notes.splitbrain.org/q3aserver 97 | 98 | http://www.katsbits.com/articles/quake-3/add-remove-bots.php 99 | --------------------------------------------------------------------------------