📜 ⬆️ ⬇️

Quake Live Server Setup - Step-by-Step Guide

Quake 3, how much of this sound ...


Over the past 16 years, since the release of the first version, q3 has not changed much. Don't get it wrong - the game has changed. Tournament fashions evolved and sank into oblivion (Hi, osp, cmpa - we remember you!), Quake live was born in the browser, moved in steam. Championships became less, players on the servers - too.

But the reckless dynamics remained virtually unchanged. In modern incarnation, Quake Live is still the same good old game, which absorbed all the best practices over the years.
')
What is worth only the minqlx server, written in python, with plug-in support and cross-server statistics on qlstats.net, and a huge marketplace in the incentive with additional game modes, maps, sounds.

And even though the servers are now much more than the players - this essay is more likely to demonstrate the possibilities, and does not call them to produce fruitlessly. 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 just wondered how the installation process is going on right 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 the 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 --reload 

ports udp uses the game server, tcp - statistics server qlstats

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 pyzmq 

Queue for installing the actual Quake Live server via 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 thing is just beginning - to complete the 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 '{}' \; 

Set up auto update of the server, otherwise after a while 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 is logical to put the plugins. I will not describe them all, I will focus on those that swing separately and are not included in the standard delivery:

branding - change the labels that are shown when connecting to the server.
q3resolver - comparison of old names of cards from q3 with new names, works only for dm and ctf cards, but you can enter additional ones, or specify your shortcuts.
ratinglimiter - allows you to limit the entrance to the server to players with a rating lower or higher than the set; for use in the config, the balance module must be enabled.
changemap - changes the map 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 higher than the specified value.
clanspinner - a whistle for animating a clanteg, just to show that it is possible :)
autorestart - overloads the server at the 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.py 

Things are easy - 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 EOF 

Please note that the server config must be located 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 supervisor, see below.

First you need to prepare the access.txt file and enter in it a 17-digit steam-id (the one that is in the url when switching to your profile in the steam) with an indication to provide admin access.

This is done very simply:

 echo -e "\n12345678910111213|admin" >> /home/ql/baseq3/access-my.txt 

In the same file, you can get rid of unwanted (to ban a player - you need to write id | ban), or encourage worthy (id | mod - moderator).

In this case, all servers will use the same access list, but you can make different ones, similar to configs.

Files can be connected directly during the game:

 g_accessFile "filename" reload_access 

but in this case ql will search for them in the directory / home / ql / port number / baseq3

For the server to work, you need a 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 

Very little is left! Just in case, redefine the owner in the directory / home / ql:

 chown -R ql:ql /home/ql 

The server is configured, it remains to make sure that it will work whenever necessary. No wonder we put the 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 EOF 

 service supervisor restart 

This config will launch 3 quake live instances with ports 27960, 27961, 27962, and will restart them in case of a hang, as well as launch when the server is restarted. For manual control, use supervisorctl start / stop / restart all / ql_1

And 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.sh startup script, line 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 

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 here with all possible cards;)

Do not forget to restart the server after adding new products!

 supervisorctl restart all 

Perhaps that's all. I hope this information will be useful - I didn’t see a full howto for installing Quake Live servers in Russian, which encouraged me to write this note.

These settings allow the server, among other things, to work with statistics of players, viewing during the game - using the! Elo command. Rating is calculated automatically, based on all games on all servers that supply statistics on qlstats.net.

Up to 1500 - ordinary players, from 1600 and above - those who play more often and better, from 2000 - pros and cyborg-killers, who gave God a brain, heart, and most of their free time :)

Afterword.

Some technically advanced readers will be puzzled 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, grammatical and stylistic errors - send in PM, I will definitely fix it. Errors and / or best practice on the style of writing the article, the use of linux commands - please leave in the comments.

Source: https://habr.com/ru/post/318146/


All Articles