Install and Run HLstatsX: CE in 2019

What is Hlstatsx?

HLstatsX Community Edition is a real-time stats and ranking system for Source engine games that is open-source and released under the GNU General Public License v2. The log sent from the game server is parsed by a Perl daemon in HLstatsX Community Edition. The data is stored in a MySQL database, while the frontend is written in PHP.

For more info visit the official Github page: hlstatsx-community-edition


Before getting it working, I spent hours and hours watching YouTube tutorials, AlliedModders forum and whatever possible. But one or more things always hampered in the way of successful installation of HLstatsx.

One of the top reasons why it does not work is that installation files are shared on the official thread https://bitbucket.org/Maverick_of_UC/hlstatsx-community-edition/wiki/Install are not compatible with PHP 7 and above. As PHP 5.6 is almost dead at the current time, it makes no sense to downgrade the PHP version. Luckily the PHP 7.0 supported version is available. It can be downloaded from here.

This tutorial is meant to track Counter-Strike 1.6 server stats, so I will talk about those files and folders. From the downloaded zip file, we have to consider 4 folders for our installation i.e.

  1. Amxmodx (This folder contains plugins and scripts for CS 1.6)
  2. Scripts (It has to be uploaded along with the web setup)
  3. SQL (This folder contains database files to be imported into the database, interacting with the website)
  4. Web (This folder actually contains the website file that you will see at the frontend)

Pre-Requisites to Complete Setup

I cannot assure you the setup will work in the shared hosting environment as you will need port 27500 working to get the script communicating with the game server. Hence, you must have VPS with SSH access. PHPMyAdmin is the second requirement to set up the database. If you know setting up a database using command lines is also fine.


  1. The first step is to upload all files in the web folder to the public_html folder or sub-folder of the actual domain where you want your HLstatsx to access from. For example, if you want to host HLStatsx at www.domain.com you have to upload files accordingly.
  2. After uploading files, try to access domain. You will see some database connectivity errors, as we have not connected website to a database yet.
  3. It’s time to create a database. I will explain PHPMyAdmin in a way for non-technical users. If you don’t know how to create database in PhpMyAdmin please check this tutorial.
  4. Import the install.sql file in the database.
  5. Now you will need 4 things to configure the website with database i.e. database host or DB host (usually localhost or , database name (say hlstats), database username (say hlstatsuser) and database password (say hlstatspw).
  6. Now open config.php file of the hlstats website using any FTP client or file manager from the VPS control panel. Fill the appropriate values as mentioned in step 5.
  7. Now check the domain again and refresh. If everything is done correctly in step 6, you will start seeing the HLstatsx website interface. However, it won’t be tracking or showing any information from the game server yet.

I will mention the next steps in my upcoming article. Meanwhile, you got to know everything you need for proper installation.


  1. HLStats:CS is STILL in development as seen here: https://github.com/NomisCZ/hlstatsx-community-edition and is still being used in late 2020. Please dig in researching before posting missleading information like this. Correct your statement in this article. Otherwise, this is a very generic article as to how to set this up as is requires more details than this.As these are the instructions I followed decades ago and still holds true today!

    1. Of course, it is in development. I have even shared link of PHP 7 supported config files. You have been reading the meaning of discontinuance in a wrong context. Original creators of HLStatx no longer manage it. It is now managed by another active community.

Leave a Reply

Back to top button