This guide walks you through setting up the Billiard Scoreboard on an Apache web server, step by step. No prior server experience required.
http://192.168.1.50 into your browser, Apache receives the request and sends back the web page. PHP is a programming language that runs on the server and powers the scoreboard logic. SQLite is a simple database stored as a single file.
This section covers setup on Ubuntu 22.04, 24.04 or Debian 12. If you're using a Raspberry Pi with Raspberry Pi OS, these steps also apply.
On your server or desktop, open a terminal window:
Ctrl + Alt + Tssh username@your-server-ipFirst, make sure your system is up to date:
sudo apt update && sudo apt upgrade -y
sudo runs the command as administrator. apt update refreshes the list of available software. apt upgrade installs updates. -y automatically confirms.
sudo apt install apache2 php libapache2-mod-php php-sqlite3 -y
This installs:
| Package | What it does |
|---|---|
apache2 | The Apache web server |
php | PHP programming language |
libapache2-mod-php | Connects PHP to Apache |
php-sqlite3 | PHP extension for SQLite databases |
Check that everything was installed correctly:
apache2 -v php -v php -m | grep sqlite3
You should see version numbers for Apache and PHP, and sqlite3 in the module list.
php-sqlite3 is not found, try sudo apt install php8.3-sqlite3 (replace 8.3 with your PHP version).
Apache serves files from /var/www/html/ by default. Copy all scoreboard files there:
# Remove the default Apache test page sudo rm /var/www/html/index.html # Copy all scoreboard files to the web directory sudo cp -r /path/to/your/scoreboard-files/* /var/www/html/
/path/to/your/scoreboard-files/ with the actual path where you extracted the scoreboard files. For example, if they are on a USB drive: /media/username/USB/billard/*
Alternatively, if you want the scoreboard in a subfolder:
# Create a subfolder sudo mkdir -p /var/www/html/billard # Copy files into the subfolder sudo cp -r /path/to/your/scoreboard-files/* /var/www/html/billard/
Apache runs as the user www-data. PHP needs permission to read and write files (for the database and OBS text files):
sudo chown -R www-data:www-data /var/www/html sudo chmod -R 775 /var/www/html
billiard_data.db (the database) and the /obs/ folder (text files for OBS). Without write permissions, you will get HTTP 500 errors.
sudo systemctl restart apache2
Open a browser and navigate to:
/var/www/html/: http://your-server-ip//var/www/html/billard/: http://your-server-ip/billard/hostname -I in the terminal. The first address shown is your local IP (e.g. 192.168.1.50).
You should see the Billiard Scoreboard application. If you see "403 Forbidden" or a blank page, check the troubleshooting section below.
To make Apache start automatically when the server boots:
sudo systemctl enable apache2
On Windows, the easiest way to run Apache + PHP is with XAMPP, a free all-in-one package.
https://www.apachefriends.orgC:\xamppXAMPP serves files from C:\xampp\htdocs\. Copy the scoreboard files there:
C:\xampp\htdocs\ in File ExplorerC:\xampp\htdocs\Your folder should look like this:
C:\xampp\htdocs\billard\ and put the files there. The URL will then be http://localhost/billard/.
SQLite should be enabled by default in XAMPP. To verify:
C:\xampp\php\php.ini in a text editor (e.g. Notepad)Ctrl + F and search for sqlite3;extension=sqlite3;) at the beginning, remove it to enable the extension:
;extension=sqlite3 ← disabled (has semicolon) extension=sqlite3 ← enabled (no semicolon)
extension=pdo_sqlite is enabled (no semicolon)httpd.conf, and change Listen 80 to Listen 8080. Then access the scoreboard at http://localhost:8080/.
Open your browser and go to:
cmd) and typing ipconfig. Look for "IPv4 Address" (e.g. 192.168.1.100). Then access http://192.168.1.100/ from other devices.
To have Apache start automatically with Windows:
To start XAMPP itself on login, place a shortcut to C:\xampp\xampp-control.exe in your Windows Startup folder (Win + R, type shell:startup, press Enter).
https://www.apachefriends.org (macOS version)/Applications/XAMPP/)/Applications/XAMPP/htdocs/macOS has Apache pre-installed. To use it:
# Start Apache sudo apachectl start # Enable PHP (edit the Apache config) sudo nano /etc/apache2/httpd.conf
Find and uncomment (remove the #) this line:
#LoadModule php_module /usr/local/opt/php/lib/httpd/modules/libphp.so
Copy scoreboard files to /Library/WebServer/Documents/ and restart Apache:
sudo apachectl restart
A Raspberry Pi makes an excellent dedicated scoreboard server. Follow the Linux (Ubuntu/Debian) steps above — Raspberry Pi OS is Debian-based, so all commands are identical.
| Model | Suitability |
|---|---|
| Raspberry Pi 4/5 | Excellent — plenty of power |
| Raspberry Pi 3 | Good — works fine for a few tables |
| Raspberry Pi Zero 2 W | Acceptable — may be slow with many simultaneous users |
/etc/dhcpcd.conf or configure it in your router's DHCP settings.
After the files are in place, open config.php in a text editor to customize the settings:
| Setting | Default | Description |
|---|---|---|
MASTER_PIN |
'123456' |
PIN for admin actions (manage players, delete stats) |
OBS_INTERVAL |
15 |
How often OBS text files are updated (seconds) |
MAX_HISTORY |
100 |
Maximum number of game history entries |
ICON_STYLE |
'square' |
Button style: 'round' or 'square' |
ICON_3D |
true |
3D shadow effect on buttons |
SHOW_LEGAL |
true |
Show legal notice / privacy policy in sidebar |
REQUIRE_LOGIN |
false |
Require login on the start page |
LOGIN_USER |
'admin' |
Admin username (only if login is enabled) |
LOGIN_PASS |
'billard' |
Admin password (only if login is enabled) |
123456. Anyone who knows this PIN can manage players and delete statistics. Change it to something unique.
Once the server is running, these URLs are available (replace [IP] with your server's IP address):
| Page | URL | Description |
|---|---|---|
| Scoreboard | http://[IP]/ | Main application |
| Monitor (DE) | http://[IP]/monitor_de.php | Live display of all tables (German) |
| Monitor (EN) | http://[IP]/monitor_en.php | Live display of all tables (English) |
| OBS Overlays | http://[IP]/obs_big.php?Tisch=1 | OBS browser source overlays |
| Help (DE) | http://[IP]/help_de.html | Full documentation (German) |
| Help (EN) | http://[IP]/help_en.html | Full documentation (English) |
To access the scoreboard from other devices (phones, tablets, other PCs), the web server port must be open.
# Allow HTTP traffic (port 80) sudo ufw allow 80/tcp # Check firewall status sudo ufw status
XAMPP usually configures the firewall automatically. If other devices cannot connect:
C:\xampp\apache\bin\httpd.exe| Problem | Cause | Solution |
|---|---|---|
| HTTP 500 Internal Server Error | PHP cannot write to the database or OBS folder |
Linux: Run sudo chown -R www-data:www-data /var/www/html && sudo chmod -R 775 /var/www/htmlWindows: Make sure the htdocs folder is not read-only (right-click → Properties → uncheck "Read-only")
|
| 403 Forbidden | Apache cannot read the files | Check file permissions and make sure index.php exists in the correct directory |
| Blank white page | PHP error (often missing SQLite extension) |
Linux: Run sudo apt install php-sqlite3 and restart ApacheWindows: Enable extension=sqlite3 in php.ini (see step 2.4)
|
| Page shows PHP code as text | PHP module not loaded in Apache |
Linux: Run sudo apt install libapache2-mod-php and restart ApacheWindows: Reinstall XAMPP |
| Cannot access from other devices | Firewall blocking port 80 | See step 7 (Firewall) above |
| Apache won't start (port in use) | Another program using port 80 |
Windows: Open cmd as admin, run netstat -ano | findstr :80 to find the process. Common culprits: Skype, IIS, World Wide Web Publishing ServiceAlternative: Change Apache port to 8080 |
| OBS text files not generated | Write permissions on /obs/ folder |
Linux: sudo chmod -R 775 /var/www/html/obsWindows: The obs folder will be created automatically; ensure htdocs is writable |
Error logs are the best way to diagnose issues:
# Linux sudo tail -f /var/log/apache2/error.log # Windows (XAMPP) # Open: C:\xampp\apache\logs\error.log
Create a test file to verify PHP is working:
# Linux echo "<?php phpinfo(); ?>" | sudo tee /var/www/html/test.php # Windows: Create C:\xampp\htdocs\test.php with content: <?php phpinfo(); ?>
Then open http://localhost/test.php. You should see a purple PHP information page. Check that SQLite3 and PDO SQLite appear in the list.
test.php after testing! It reveals server configuration details.
The main documentation (help_en.html) describes setup with Nginx. Here are the key differences:
| Aspect | Apache | Nginx |
|---|---|---|
| Config file | /etc/apache2/sites-available/000-default.conf |
/etc/nginx/sites-available/default |
| Web root | /var/www/html/ |
/var/www/html/ (same) |
| PHP integration | Built-in module (libapache2-mod-php) |
Separate PHP-FPM process |
| Restart command | sudo systemctl restart apache2 |
sudo systemctl restart nginx |
| Beginner-friendly | Easier — PHP works out of the box | Requires additional PHP-FPM setup |
| Action | Command |
|---|---|
| Start Apache | sudo systemctl start apache2 |
| Stop Apache | sudo systemctl stop apache2 |
| Restart Apache | sudo systemctl restart apache2 |
| Check status | sudo systemctl status apache2 |
| View error log | sudo tail -f /var/log/apache2/error.log |
| Find server IP | hostname -I |
| Fix permissions | sudo chown -R www-data:www-data /var/www/html |
| Item | Path |
|---|---|
| Web files | C:\xampp\htdocs\ |
| PHP config | C:\xampp\php\php.ini |
| Apache config | C:\xampp\apache\conf\httpd.conf |
| Error log | C:\xampp\apache\logs\error.log |
| Control Panel | C:\xampp\xampp-control.exe |
Pro Billiard Scoreboard System v4.5 | Apache Setup Guide
For full feature documentation, see help_en.html | help_de.html (German)