Quake Live
146 оценки
Quake Live Linux Dedicated Server Install/Config
От Yakumo
Installation and configuration readme for the Quake Live Linux dedicated server.
   
Награда
Добавяне към любими
В любими
Премахване от любими
1. Requirements
The dedicated server is available in both 32-bit and 64-bit versions, and should run on any modern machine that can run the Steam client. We recommend Ubuntu Server 14.04.

To run the 32-bit version of the server on 64-bit installs, you will need to install 32-bit versions of all libraries.
See your distribution's instructions on how to perform this.

To run the 32bit server on Ubuntu x64 install requirements via: sudo apt-get install lib32gcc1 lib32z1 lib32stdc++6
2. Updating and Launching
Install and update the server through SteamCMD (use sudo for useradd as the SteamCMD guide suggests), using the command below (change the path if you wish but not necessary, login details are correct).
./steamcmd.sh +login anonymous +force_install_dir ./steamapps/common/qlds/ +app_update 349090 +quit

Please see the Valve Developer Community for full SteamCMD options and download instructions: https://developer.valvesoftware.com/wiki/SteamCMD

Run the server using the provided run_server_x86.sh and run_server_x64.sh scripts. This will set the proper working directory and LD_LIBRARY_PATH to the correct libsteam_api.so. You can add command line options at will.

A standard server or VPS can host many instances of Quake Live, so you may wish to run multiple servers. We recommend managing them through a third party process control system. Below is a sample script that will take one parameter: a number starting at 0. This will launch a server with a unique hostname, port, rcon port, and stats port. This is a great way to quickly run a small cluster of servers on a single box.

You should change the path to reflect where you have installed the game. Never run the server under root.
#!/bin/bash gameport=`expr $1 + 27960` rconport=`expr $1 + 28960` servernum=`expr $1 + 1` exec /home/user/steamcmd/steamapps/common/qlds/run_server_x86.sh \ +set net_strict 1 \ +set net_port $gameport \ +set sv_hostname "My Quake Live Server #$servernum" \ +set fs_homepath /home/user/.quakelive/$gameport \ +set zmq_rcon_enable 1 \ +set zmq_rcon_password "mypass" \ +set zmq_rcon_port $rconport \ +set zmq_stats_enable 1 \ +set zmq_stats_password "mypass" \ +set zmq_stats_port $gameport

This can be combined with a process control system like supervisord in order to manage and launch any number of instances. Note that supervisord is third party software, and the below may change at any point. We will not support issues involving third party software.

You will need to replace "user" with the user name of the dedicated server.
[program:quakelive] command=/home/user/steamcmd/steamapps/common/qlds/launch.sh %(process_num)s user=user process_name=qzeroded_%(process_num)s numprocs=10 autorestart=true

In conjunction with the above launch script, this will give you 10 server instances, numbered #1 to #10, starting at port 27960, with rcon starting at port 28960. They will automatically restart if crashed. For information on using rcon, please see later in this document.
3. Configuring your server
Configure your server through server.cfg. You may wish to make a copy of this file and place it into your fs_homepath, as updates to the default server.cfg may revert your changes to default. The default server.cfg is heavily commented, so please see that for further information.

There is no need to specify a map on the command line or server.cfg. The server will automatically execute the variable "serverstartup" when the server has completed initialization. By default, this will launch a random map selected from the server's map pool. Please see the below section on configuring map pools.

Quake Live servers are designed to handle multiple gametypes, and multiple gametype variations on one server. This means that your server can switch from Free For All to Capture the Flag to Clan Arena, to even variants of gametypes, such as InstaGib FFA, and custom variations that provide more traditional competitive settings.

Because of this, you should generally not place gameplay settings inside server.cfg. Although the server will attempt to restore all old settings after switching gametypes, these factory settings will override settings in server.cfg.

See the below section on creating custom factories to setup your own match rules.
4. Managing server access list
Quake Live reads and stores to a persistent text file on disk information about who has access to server moderation, server administration, and ban list. By default, this is in the file access.txt, and can be changed through the console variable "g_accessFile"

Only edit this file on disk while all servers are stopped, as the game will write out the current access list before each map load. In order to have access to your server, you will need to add yourself as an admin. Obtain your 64-bit Steam ID by connecting to any match, and typing /players in the console. Put it in access.txt in the
given format. Example:

76561198072786081|admin

Save the file, and start the server. You can then use /addmod, /addadmin, /demote, /ban and /unban commands to manage the access list while the server is running.

Първоначално публикувано от tjone270:
It's worth noting the reload_access command for the server (/rcon reload_access if you're in-game/admin), so you can change the file while the server's running and have it re-read if the user makes a change. (nb. annoyingly this command doesn't currently autocomplete)

Access.txt is re-written on map change, so if you edit it by hand for a running sever, be sure to /reload_access before a map change occurs or you will lose those changes.
5. Setting up a map pool
The server's map pool accepts a map, and a factory, delimited with a |. See the default mappool.txt for an example.
A different file can be specified through "sv_mapPoolFile"

If you wish to use your own custom factories, you can specify them in here so that your custom factory will appear in the three map voting system at the end of the game.

If you wish to lock your server to one gametype, then make sure your map pool only contains maps in that factory, then add 8 to g_voteFlags to stop "callvote map" from accepting the optional factory argument. This is not usually needed though; we recommend allowing your players to play and callvote whatever gametypes they wish to play on your servers, but it is often not bad to restrict Duel servers due to the low player counts.
6. Creating custom gametypes (factories)
Setting up a custom factory is a bit more involved than the past solutions of editing config files, but it allows for more flexibility in match rules, while ensuring that settings don't leak over into future matches. By default, Quake Live ships with base rules for every gametype, and a few variations. Other factories may be available on Steam Workshop.

To define your own gametype factory, create a "scripts" folder inside your baseq3 directory, and name the file with anything that ends in ".factories"

Example: baseq3/scripts/mynewgametype.factories

This file is a JSON file that contains either a JSON array with multiple factories, or a JSON object containing a single factory. For example, here is the built in InstaGib FFA factory:
{ "id": "iffa", "title": "Instagib FFA", "author": "id Software", "description": "Railgun and Gauntlet only. One shot, one kill.", "basegt": "ffa", "cvars": { "g_dropCmds": "0", "g_spawnArmor": "0", "dmflags": "28", "g_instagib": "1", "g_startingWeapons": "65", "timelimit": "15", "g_allowKill": "0", "fraglimit": "50", "g_overtime": "0", "g_loadout": "0" } }

All fields should be present and of the correct type.

"id" is how you will refer to the factory inside a map pool or a callvote, and must be a string.
"title", "author" and "description" are all strings containing info about the factory, and can be seen in Start Match
"basegt" is a string of the base gametype it should apply the settings on. Valid values for "basegt" are:
ffa, duel, race, tdm, ca, ctf, oneflag, har, ft, dom, ad, rr
"cvars" is an object containing key value pairs of the cvar names and values to set.

If a factory is invalid, the reason why will be printed in the console during startup, and the factory will not be available for play.
7. Using Steam Workshop
Quake Live will only autodownload custom content that has been uploaded to Steam Workshop. The legacy HTTP and UDP
download functions have been removed. If you want your players to be able to play custom content on your servers, you must use Steam Workshop.

To add a workshop item to your server, add its item ID to workshop.txt. The item ID can be obtained from the URL when browsing the Steam Workshop in your browser.

Before the server finishes initializing, it will attempt to download all items in workshop.txt, such that custom content can be included in your map pool. The progress of this process will be printed to the server console, and if any download fails, it will be skipped and the server will continue to start.

To upload content, you will need to use SteamCMD's workshop_build_item command. Please refer to the Steam documentation on how to upload Workshop content.

Occasionally, the Workshop startup process will fail, usually due to temporarily unavailable content server. Some users have reported that switching from the 64-bit dedicated to the 32-bit dedicated binary will fix downloads. In these cases, you can use SteamCMD to download the workshop item, and then move it to the appropriate place.

Download the item with:

./steamcmd.sh +login anonymous +workshop_download_item (appid) (workshop_id) +quit

and then copy the steamapps/workshop folder into the steamapps folder where the server is installed. This will cause the game to see the item as cached, and not attempt to download it.

Първоначално публикувано от tjone270:
With manually downloading steam workshop items via steamcmd, my script ( https://github.com/tjone270/QuakeLiveDS_Scripts/blob/master/scripts-standalone/autodownload.sh ) will read the user's workshop.txt file and download/move into place the listed steamcmd items, so definitely more convenient.
8. Using external remote console
The remote console works differently than previous titles. Rcon is disabled by default, and can be configured using "zmq_rcon_enable", "zmq_rcon_ip". "zmq_rcon_port" and "zmq_rcon_password". Unlike previous titles, rcon will bind to the TCP port you specify, not UDP. The socket itself is a ZeroMQ socket, using CZMQ for authentication.
Included with the server is a simple rcon client, zmq_rcon.py, written for Python 2.x. You will need to install Python ZMQ, which can most easily be done through "pip install pyzmq" if pip is available on your system. To run the script, use something similar to the following:

python zmq_rcon.py --host=tcp://127.0.0.1:28960 --password=mypass

There is an rcon script that will parse QL colour codes and display the colours available on https://github.com/carmethene/quakelive-rcon
9. Using external stats
Quake Live also exposes a ZeroMQ publish/subscribe socket that will emit a great amount of detail about the ongoing match, live as events occur. A basic script is included, zmq_stats_verbose.py, but it will simply print the stats events to screen as an example. All events emitted by the engine should be valid JSON. Any additional functionality and storing of stats is left as an exercise to the reader.
g_dropInactive g_inactivity
The default server.cfg has no set g_inactivity, and it defaults to 0 it seems.

Please change this to a sensible figure in seconds in your server.cfg, eg 240, as otherwise zombie players idle on servers for hours not moving at all spoiling the game.

g_dropInactive 1 must also be set.

You can also configure g_inactivityWarning in seconds to forwarn the player.
g_voteFlags, dmflags, g_StartingWeapons
These three cvar settings are bitmasks, each single decimal shown represents one bit in the bitmask, one of the simplest explanations of a bitmask is here[www.yyosifov.com], but all you need to understand to configure your server is - add together the numbers shown here for the settings that you wish to apply (or disable, as stated), and set the cvar to that number.

dmflags

Flag
Bit
no self splash-damage on health
4
no self splash-damage on armor
8
no falling damage
16
no footsteps
32

eg. set dmflags 12
This is 4 (no self splash-damage on health) + 8 (no self splash-damage on armor)

g_voteFlags

Add the below values for which callvote commands should not be allowed on your server:

Flag
Bit
Note
map
1
map_restart
2
nextmap
4
gametype
8
"/callvote map campgrounds" allowed, but "/callvote map campgrounds ca" will fail
kick
16
timelimit
32
fraglimit
64
shuffle
128
teamsize
256
cointoss/random
512
loadouts
1024
end-game vote
2048
ammo (global)
4096
timers (item)
8192

Weapon Respawn
16384

eg:

set g_voteFlags 17
This is 16 + 1
This would prevent people from kicking anyone or voting for "map xxx", but would not prevent map_restart or nextmap votes which are bits 2 and 4 respectively.

To disable all four of - kicking, voting for map, voting for map_restart and voting for netxmap you would use
16+4+2+1 = 23
\set g_voteFlags 23

g_startingWeapons

Flag
Bit
Gauntlet
1
Machinegun
2
Shotgun
4
Grenade Launcher
8
Rocket Launcher
16
Lightning Gun
32
Railgun
64
Plasmagun
128
BFG
256
Grappling Hook
512
Nailgun
1024
Prox Launcher
2048
Chaingun
4096
HMG
8192
Map Default
16384

eg.
set g_startingWeapons 535
512+16+4+2+1
You would spawn with Grappling Hook, Rocket, Shotgun, Machine Gun and Gauntlet.


NOTE
To convert one of the bitfield settings back to a human readable list take the number, and start to subtract numbers from the relevant table above from it working backwards from the largest.

eg.

533- 512 is the largest number you can subtract without going negative, so that's' the first setting.
23 is left, 16 is the next largest number in the table you can subtract without going negative, so that's the next bit that has been set, and so on.

It is important to do this if you already have a number, but want to add settings to it, as if for example you wanted to add 8 to it, but 8 was already set, then that would be 8+8 so in fact the bit representing sixteen would be set, which would not be the setting you wished to alter.

eg.

527
If you didn't check and thought 8 wasn't set and added 8 to it then you would end up with 535.

but 527 = 512+8+4+2+1

So with the new 8 added that would become
535
which actually reverses as
512+16+4+2+1

which would not be the settings you wanted.

So either always work out your settings from scratch, or reverse the number you have as described above to check the settings first.


Disable Weapons

You can on the fly disable/enable specific weapons with:

set disable_weapon_shotgun 1 set disable_weapon_grenadelauncher 1 set disable_weapon_rocketlauncher 1 set disable_weapon_lightning 1 set disable_weapon_railgun 1 set disable_weapon_plasmagun 1 set disable_weapon_bfg 1 set disable_weapon_nailgun 1 set disable_weapon_chaingun 1 set disable_weapon_hmg 1
Then map_restart or change map.
(prefix with rcon if administering a remote server)

This will remove them from the player selection bar and the map, but it will not remove ammo for them from the map.



Ports (Firewall)
27960 is default port UDP for game traffic if you're only hosting the one server, but you need TCP on the same port if you want to send stats via zmq to qlstats.

28960 is the default port for rcon (UDP), needed only if you chose to enable remote rcon in your server config.
IRC help
The above is all from the official readme, reposted with permission from [id]Sponge, there is also now #qldedsrv on the quakenet IRC network for any extra help you may need.

You don't need an IRC client if you don't have one, just put a username in for : http://webchat.quakenet.org/?channels=qldedsrv
LAN servers
For LAN servers :

sv_serverType 1

0 - offline, 1 - LAN, 2 - internet.

Importantly your server will only show up on the LAN server browser in steam/QL if it's running on net_port 27015 - 27020, so only 6 LAN servers per IP if you want them all to show in the browser.
It just is this way currently, maybe it can get fixed.
Supervisor tips
1) Using pip ensures you get the latest version:

sudo pip install supervisor

if pip is not installed
wget https://bootstrap.pypa.io/get-pip.py python get-pip.py
This version of supervisor uses the /etc/supervisord.conf file to configure itself. You can find an example of that by checking out https://github.com/tjone270/QuakeLiveDS_Scripts/blob/master/config-files/supervisord.txt . (note that while that linked file ends in .txt, you'll need to change that to .conf) 2) To start the supervisor daemon, run: "supervisord" 3) put
[program:quakelive] command=/home/user/steamcmd/steamapps/common/qlds/run_server_x64.sh %(process_num)s user=youruser process_name=qzeroded_%(process_num)s numprocs=1 autorestart=true
in /etc/supervisord.conf 4) supervisorctl reread 5) supervisorctl update This should start default server on port 27960. You can check the status with "supervisorctl status". If you create you own launch script then you have to change "command" in supervisors's config accordingly. Here is a good tutorial https://serversforhackers.com/monitoring-processes-with-supervisord []
Autonomous Server System!
Autonomous Server System, in Bash Script by tjone270 -
https://github.com/tjone270/QuakeLiveDS_Scripts

Also useful is his collection of stand-alone scripts[github.com] : , such this one for to start multiple servers[github.com], by using the expr $1 + 1 utility to increment the game and rcon ports as it goes through starting them up.

Also of particular note is his script to automatically keep your server up to date[github.com].

Troubleshooting
Steamcmd not downloading or qlds failing to download workshop items
Update steamcmd (sudo apt-get install --only-upgrade steamcmd )
Navigate to where you installed steamcmd and run it
./steamcmd
At the steamcmd prompt type
login anonymous
quit

That should create any anonymous login credentials needed, try steamcmd / qlds then and downloading should work so long as your server isn't blocking outgoing traffic, if it is the port list steamcmd needs is on https://support.steampowered.com/kb_article.php?ref=8571-GLVN-8711&l=english

Stability Issues
  1. If you are having stability issues please use the x86 server, it seems to be more stable at the moment :-/

Server not showing up in the server browser ?
  1. When looking for it in the browser make sure you don't have filter tags set which would exclude your server from being listed
  2. set sv_tags on your server to some unique comma seperated tags you can filter for to find it easily, as there is no normal search in the standard browser, only tag filtering.
  3. Check it's relevant ports aren't blocked so Steam can query it.
    Especially you must have set up port forwarding on your router for the UDP game port your server is on (from net_ip in server.cfg, default 27960. if /connect IP:port works ok from an external machine then this is already ok).
    TCP is only used for zmq/rcon you don't need this to get your server listed.
  4. Steam master servers run at port 27010-27013 so outgoing traffic there must not be blocked if your server is otherwise locked down for outgoing traffic.
  5. Check sv_servertype also, ensure that it has been set to 2.
  6. Check sv_master is set to 1
  7. If all of this is set correctly your server should show up within a second or two when you refresh the list, there is no need to wait minutes before attempting to debug.
  8. The steam browsers pull limited numbers, you should check using PredaTh0r's server browser if you still can't find it https://steamcommunity.com/sharedfiles/filedetails/?id=543312745
  9. If it's still not working do also check through the "Stats or voice not working on your server ?" section below.
  10. The best help if you still can't work it out is available on http://webchat.quakenet.org/?channels=qldedsrv

Problems accessing access.txt or server.cfg
  1. Don't forget that all the +set commands needed to be on the same line,
    or have trailing \'s
  2. The QL server var fs_homepath is where access.txt is read from/written to, default is ~/.quakelive for the user you are running the server from (typically 'steam')
  3. Quit server, "rm -rf ~/.quakelive", start server. That'll make qzeroded re-create fs_homepath, create your access.txt or server.cfg there

Stats or voice not working on your server ?
Първоначално публикувано от vks:
as part of some VPS imaging and deployments, the file
/etc/network/interfaces
gets populated with a local private ip for support from the host, remove the line with this ip from that file, to get stats and voice working then:
ifdown eth0 && ifup eth0
just spent 3 hours fixing that...

Settings not working that should? eg forcing one game mode
  • Add mappool_reload to the bottom of your server config file, that should solve any settings not being active issue. (thanks Ghost68 )
  • If forcing one factory, be sure your mappool.txt only has maps that end with that factory eg. trinity|ca
Minqlx
Mino has released minqlx [github.com] which "Extends Quake Live's dedicated server with extra functionality and scripting"

And the minqlx-plugins[github.com] which add functions such as :

clan
motd
permissions

Install instructions are on the front page linked above.

If updating an older version of minqlx later, just untar the new release tar, and then
git pull origin
within the minqlx-plugins directory.
179 коментара
mortal 30 дек. 2023 в 22:28 
Can someone do a full detailed one for Pterodactyl?
MongoloidAndroid 8 апр. 2022 в 4:56 
Use ./run_server_x64.sh if it says "command not found" when using run_server_x64.sh

The guys on IRC taught me this I couldnt get it running using the guide
bruhchungus47 21 окт. 2020 в 8:30 
Could I do something similar to this on a Raspberry Pi 4B? I'm presuming not, since it uses an ARM processor, but it's still good to check.
iTzRaDiaNTT (Acc 3) 24 авг. 2020 в 19:46 
Excellent links and info! Thanks!
AlphaBlaster 28 ян. 2020 в 13:20 
My server isn't downloading workshop items, it skips over it saying
WARNING: Skipping workshop, ISteamUGC is NULL.
чемодан с котами 19 ноем. 2018 в 12:36 
Thanks for the guide. What are minimal specifications for not laggy 16 players game?
^4ρσяи^1ѕ^4тαя 26 апр. 2018 в 9:03 
Ok, me and my braincell have , I asume, missunderstod the fact that thoose scripts in fact is the supervisord's stearing parameters?

Yes I shall not spam this section anymore. Maqby you soon seen my ugly face at mIRQ. Thanks for your rapid help.
Yakumo  [автор] 26 апр. 2018 в 8:49 
I would have to assume you mean supervisord scripts, they can be very complex so they're not detailed here.Some examples on https://github.com/tjone270/Quake-Live/tree/master/qlds-scripts , alongside the Supervisor tips section here.

Please follow the request and use the IRC link in the troubleshooting section of this guide for support on such things however, tjone270 himself may be there.
^4ρσяи^1ѕ^4тαя 26 апр. 2018 в 8:25 
First..thanks alot Yakumo.. without you many questions should be unexplained in this community <3. With that said over to my question. Neaqrly all parameters is well explained and I have had big help from this guide. But now when I shall move on to multiple servers I have alill problem. Even here its good information about the moust things. But all scripts ends up at "parameters in advisord" Then it ends. Maby I want to do it easy for me to have this servers up and running but shouldent this guide have some additional sections with "what the fu*k shall I have for parameters in advisord" for next generation of QL fraggers =D ThankYou.
^4ρσяи^1ѕ^4тαя 1 февр. 2018 в 7:03 
Ok its time, finished with customerhostility gameserversadmins. Ubuntu...... Is it some kind of snaks you eat when setting up that leet windows_server?.... god help me!