Configuring Quake Live Server - Walkthrough

Over the past 16 years, since the release of the first version, q3 has not changed much. Do not get it wrong - the game has changed. Tournament mods developed and disappeared into oblivion (Hi, osp, cmpa - we remember you!), Quake live was born in the browser, moved to steam. Championships became less, players on servers - too.
But reckless dynamics remained almost unchanged. In a modern incarnation, Quake Live is still the same old-good game, which has absorbed all the best practices over the years.
That’s just a minqlx server written in python with plug-in support and cross-server statistics on qlstats.net, and a huge marketplace in Steam with additional game modes, maps, sounds.
And although there are much more servers now than players - this essay is more likely to demonstrate capabilities, and does not encourage them to produce thoughtlessly. But, if you just want your small server to play with friends on long winter evenings, and did not know where to start, or you are just wondering how the installation process is going on now - welcome to the cat!
The instruction is relevant for Ubuntu Server from 14.04 and higher. (in other distros, installing minqlx can be complicated by the absence of python35 from the box).
Let's start with trivial things - put useful software, open the ports on the firewall. Commands are entered as root.
apt-get install -y wget fail2ban htop firewalld mc
adduser ql
firewall-cmd --permanent --zone=public --add-port=27960-27965/tcp &&
firewall-cmd --permanent --zone=public --add-port=27960-27965/udp &&
firewall-cmd --reloadudp ports are used by the game server, tcp is the qlstats statistics server.
Install additional software and dependencies
apt-get install -y libc6:i386 libstdc++6:i386 software-properties-common supervisor build-essential redis-server git
wget http://download.zeromq.org/zeromq-4.1.4.tar.gz; tar -xvzf zeromq-4.1.4.tar.gz; rm zeromq-4.1.4.tar.gz; cd zeromq*; ./configure --without-libsodium; make install; cd ..; rm -r zeromq*; easy_install pyzmqThe queue for installing the actual Quake Live server through Steam
mkdir /home/steam; cd /home/steam; wget https://steamcdn-a.akamaihd.net/client/installer/steamcmd_linux.tar.gz; tar -xvzf steamcmd_linux.tar.gz; rm steamcmd_linux.tar.gz
/home/steam/steamcmd.sh +login anonymous +force_install_dir /home/ql/ +app_update 349090 +quit After a short wait, the server is loaded into the ql directory and ready to go. But the most interesting is just beginning - to fully work, you will need to install and configure minqlx. A list of server commands is available on GitHub .
cd /home/ql
wget -O - https://api.github.com/repos/MinoMino/minqlx/releases | grep browser_download_url | head -n 1 | cut -d '"' -f 4 | xargs wget &&
find -name \minqlx*.tar.gz -exec tar xvzf '{}' \; &&
find -name \minqlx*.tar.gz -exec rm '{}' \;We’ll configure the server’s auto-update, otherwise after a while the clients will not be able to join it:
tee /home/quakeupdate.sh <<-'EOF'
echo "updating quake live [$(date)]"
/usr/bin/supervisorctl stop all
/home/steam/steamcmd.sh +login anonymous +force_install_dir /home/ql/ +app_update 349090 +quit
/usr/bin/supervisorctl start all
EOF
chmod +x /home/quakeupdate.sh &&
echo -e "\n0 6 * * * root sh /home/quakeupdate.sh > /var/log/quakeupdate.log 2&>1;chown -R ql:ql /home/ql" >> /etc/crontab
After installing the server - it’s logical to install plugins. I will not describe them all, I will focus on those that swing separately and are not included in the standard delivery:
branding - changing the labels that appear when connected to the server.
q3resolver - comparing old card names from q3 with new names, works only for dm and ctf cards, but you can enter additional ones, or set your own shortcuts.
ratinglimiter - allows limiting the entrance to the server to players with a rating lower or higher than a given one; for use in the config, the balance module must be enabled.
changemap - changes the card to the one specified in the config when there is no one on the server.
pingspec- politely asks to leave the server (kick) of players with a ping above a given value.
clanspinner - a whistle for clanteg animation, just to show that it is possible :)
autorestart - reloads the server at a specified time when there are no players on it.
custom_vote - imposes restrictions on certain voting modes in the game.
see the full list of plugins here
git clone https://github.com/MinoMino/minqlx-plugins.git && cd ./minqlx-plugins &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/branding.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/q3resolver.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/ratinglimiter.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/changemap.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/archive/beta/pingspec.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/archive/beta/clanspinner.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/autorestart.py &&
wget https://raw.githubusercontent.com/tjone270/Quake-Live/master/minqlx-plugins/custom_votes.pyThe point is small - create a file to start the server
tee /home/ql/start-server.sh <<-'EOF'
#!/bin/bash
gameport=`expr $1 + 27960`
rconport=`expr $1 + 28960`
servernum=`expr $1 + 1`
rm /home/ql/$gameport/baseq3/server.cfg
cp /home/ql/baseq3/server-$servernum.cfg /home/ql/$gameport/baseq3/server.cfg
exec /home/ql/run_server_x64_minqlx.sh \
+set net_strict 1 \
+set net_port $gameport \
+set sv_hostname "My best server #$servernum" \
+set fs_homepath /home/ql/$gameport \
+set zmq_rcon_enable 1 \
+set zmq_rcon_password "rconpassword" \
+set zmq_rcon_port $rconport \
+set zmq_stats_enable 1 \
+set zmq_stats_password "statpassword" \
+set zmq_stats_port $gameport
EOFPlease note that the server config should be in the ./baseq3/ directory. The config
name is server-1.cfg for the server on port 27960, server-2.cfg for the server on port 27961, etc. The number of running servers is regulated through a supervisor, more on that below.
First, you need to prepare the access.txt file and enter the 17-digit Steam-id into it (the one that is in the url when you switch to your profile in Steam) with the indication to provide admin access.
This is done very simply:
echo -e "\n12345678910111213|admin" >> /home/ql/baseq3/access-my.txtIn the same file, you can drive out those who are objectionable (to ban a player, you need to write id | ban), or to encourage worthy ones (id | mod is a moderator).
In this case, all servers will use the same access list, but you can make different ones, similar to the configs.
Files can be connected directly during the game:
g_accessFile "filename"
reload_accessbut in this case ql will look for them in the directory / home / ql / port number / baseq3
For the server to work, you need the config:
tee /home/ql/baseq3/server-1.cfg <<-'EOF'
set sv_tags "Location,duel,elo".
set sv_mapPoolFile "mappool_duel.txt"
set g_gametype "duel"
set g_accessFile "access-myaccess.txt"
set sv_maxClients "10"
set g_password ""
set sv_privateClients "2"
set sv_privatePassword "mypass".
set com_hunkMegs "60"
set sv_floodprotect "10"
set g_floodprot_maxcount "10"
set g_floodprot_decay "1000"
set g_voteFlags "29800"
set g_allowVote "1".
set g_voteDelay "0".
set g_voteLimit "0"
set g_allowVoteMidGame "1"
set g_allowSpecVote "0".
set g_inactivity "120" // Kick players who are inactive for x amount of seconds.
set g_alltalk "1"
set sv_serverType "2".
set sv_master "1"
set sv_fps "40"
set sv_idleExit "120"
set sv_pure "0"
set serverstartup "map bloodrun duel"
// minqlx configuration
set qlx_owner "12345678910111213"
set qlx_plugins "plugin_manager, essentials, motd, permission, ban, silence, clan, names, log, workshop, balance, branding, changemap, pingspec, clanspinner, autorestart, custom_votes"
set qlx_balanceUrl "qlstats.net"
set qlx_balanceApi "elo" // "elo_b" - для 4fun серверов, скрывает реальный рейтинг
set qlx_protectedPerm "3"
set qlx_defaultMapToChangeTo "bloodrun"
set qlx_defaultMapFactoryToChangeTo "duel"
set qlx_pingSpecSecondsBetweenChecks "30"
set qlx_pingSpecMaxPing "120"
set qlx_rulesetLocked "1"
set qlx_disablePlayerRemoval "0"
set qlx_disableCvarVoting "1"
set qlx_cvarVotePermissionRequired "3"
// branding
set qlx_serverBrandName "MY Server #1"
set qlx_serverBrandTopField "server admin : player"
set qlx_serverBrandBottomField "Some text here"
set qlx_connectMessage "welcome to server"
set qlx_loadedMessage "Please be respectfull to each other"
set qlx_countdownMessage "Be good or be dead. GL & HF!"
set qlx_endOfGameMessage "Good Game!"
reload_access
reload_mappool
EOF
Only a bit left! Just in case, redefine the owner in the directory / home / ql:
chown -R ql:ql /home/qlThe server is configured, it remains to make sure that it will work whenever necessary. No wonder we put a supervisor?
tee /etc/supervisor/conf.d/ql.conf <<-'EOF'
[program:quakelive]
command=/bin/bash -c "exec /home/ql/start-server.sh %(process_num)s"
user=ql
process_name=ql_%(process_num)s
numprocs=3
autorestart=true
EOFservice supervisor restartThis config will start 3 quake live instances with ports 27960, 27961, 27962, and will restart them in the event of a hang, as well as start them when the server reboots. For management, supervisorctl start / stop / restart all / ql_1 is used.
Finally, if you want statistics on your server to be collected and taken into account, register the server on qlstats.net : 8084 / servers.html using the password from the start_server startup script. sh, string zmq_stats_password.
I almost forgot! To add content, edit the file /home/ql/baseq3/workshop.txt.
cat /home/ql/baseq3/workshop.txt
# specify 1 workshop item id per line, ex:
# 494372396
# 441344649
The content is here . It’s easiest to copy from the url of the add-on you like . By the way, there is a good old defrag with all the possible cards;)
Do not forget to restart the server after adding new products!
supervisorctl restart allPerhaps that’s all. I hope this information will be useful - I have not seen a complete howto on installing Quake Live servers in Russian, which prompted me to write this note.
These settings allow the server, among other things, to work with player statistics, viewing during the game using the! Elo command. The rating is calculated automatically, based on all games on all servers that supply statistics to qlstats.net.
Until 1500 - ordinary players, from 1600 and above - those who play more often and better, from 2000 - pros and cyborg killers, who gave the god quake brain, heart, and most of their free time :)
Afterword.
Some technically advanced readers will be perplexed to think - why all this, if there is a docker, and will be partly right. Partly because the images I found did not suit me. The instruction was written as you set up your own server, as the basis for your own image.
Thank you for attention. GL & HF!
PS Please, grammar and stylistic mistakes - send in a personal, be sure to fix it. Errors and / or best practice on the writing style of the article, the use of linux commands - please leave a comment.