How to Install and Run HLstatsX: CE (Step-by-Step Guide)
If you run a Counter-Strike, Team Fortress 2, or other Source/GoldSrc game server, tracking player statistics is essential for engagement and competition.
HLstatsX: Community Edition (CE) is one of the most powerful and widely used real-time stats tracking systems for game servers.
It records player activity, ranks, kills, weapon usage, and more, then displays it on a web interface.
In this step-by-step guide, you’ll learn how to install, configure, and run HLstatsX: CE on your server from scratch.
Hlstatsx
Before getting it working, I spent hours and hours watching YouTube tutorials, the AlliedModders forum and whatever possible. But one or more things always hamper the successful installation of HLstatsx.
One of the top reasons why it does not work is that installation files 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 the link below.
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.
- Amxmodx (This folder contains plugins and scripts for CS 1.6)
- Scripts (It has to be uploaded along with the web setup)
- SQL (This folder contains database files to be imported into the database, interacting with the website)
- 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 a 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.
Upload the files
- The first step is to upload all files in the web folder to the public_html folder or a 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.
- After uploading files, try to access the domain. You will see some database connectivity errors, as we have not connected the website to a database yet.
Configuration and Database Setup
- It’s time to create a database. You can create the database by going to PHPMyAdmin.
- Import the install.sql file into the database.
- Now you will need 4 things to configure the website with a database, i.e. database host or DB host (usually localhost or 127.0.0.1), database name (say hlstats), database username (say hlstatsuser) and database password (say hlstatspw).
- Now open the config.php file of the hlstats website using any FTP client or file manager from the VPS control panel. Fill in the appropriate values as mentioned in step 5.
- 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.
Also Read: Fix CS:GO console disappearing issue [100% fix]
Configure your game server
Add the following line to your game server’s configuration file:
logaddress ip port
Where ip is the IP address of your web server and port is the port that the HLstatsX: CE daemon is running on.
Restart your game server
Restart your game server for the changes to take effect.
Once you have completed these steps, HLstatsX: CE will be installed and running. You can access the HLstatsX: CE web interface by visiting http://your-web-server-ip/hlstatsx in your web browser.
Conclusion
HLstatsX: CE is a valuable tool that allows server administrators and players to unlock the power of statistics. By following this step-by-step guide, you can successfully install and run HLstatsX: CE on your server, gaining access to enhanced gameplay, monitoring capabilities, and valuable statistical insights. Remember to regularly update your installation to stay current with the latest features and improvements. Start tracking and optimising your gaming experience with HLstatsX: CE today!
Frequently Asked Questions
1. Is HLstatsX: CE free?
Yes, it is completely open-source and free to use.
2. Does it support CS2 or only older games?
Primarily Source and GoldSrc engines; support for newer games may require tweaks.
3. How often are stats updated?
Near real-time, depending on log flow and configuration.



