Quick Start Guide: Ubuntu 25.04
Posted: March 13th, 2026, 8:29 pm
phpBB Installation & Configuration Guide (Ubuntu 25.04 + Apache + PHP‑FPM 8.4 + MariaDB)
A clean, reproducible deployment aligned with your existing stack
1. Overview
phpBB is a lightweight, stable, long‑running forum platform that fits perfectly into your modular LAMP‑plus‑FPM environment. With your current setup (Apache + PHP‑FPM + MariaDB), phpBB runs cleanly without mod_php and requires minimal maintenance once deployed.
This guide covers:
Preparing the system
Creating the database
Deploying phpBB
Configuring Apache vHost
Running the installer
Post‑install hardening
Extensions, styles, and safe activation workflow
Backup & maintenance notes
Everything here uses components you already have installed and validated.
2. Requirements (Already Installed in Your Stack)
You already have all required components:
PHP 8.4 + FPM
phpBB requires common extensions, all of which you already use for Friendica/Nextcloud:
php8.4-fpm
php8.4-mbstring
php8.4-xml
php8.4-json
php8.4-gd
php8.4-curl
php8.4-zip
php8.4-intl
php8.4-mysql
MariaDB
Your existing MariaDB server is fully compatible.
Apache
You’re already using:
mpm_event
proxy_fcgi
setenvif
rewrite
ssl
http2
phpBB works perfectly with this.
3. Create the Database
Bash


Copy
sudo mysql -u root -p
Inside MariaDB:
Sql


Copy
CREATE DATABASE phpbb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'phpbbuser'@'localhost' IDENTIFIED BY 'yourStrongPassword';
GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbbuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
4. Download & Deploy phpBB
Navigate to your web root:
Bash


Copy
cd /var/www
sudo wget https://download.phpbb.com/pub/release/ ... 3.3.12.zip
sudo unzip phpBB-3.3.12.zip
sudo mv phpBB3 phpbb
Set ownership:
Bash


Copy
sudo chown -R www-data:www-data /var/www/phpbb
sudo find /var/www/phpbb -type d -exec chmod 755 {} \;
sudo find /var/www/phpbb -type f -exec chmod 644 {} \;
5. Apache vHost (PHP‑FPM)
Create:
Bash


Copy
sudo nano /etc/apache2/sites-available/phpbb.conf
Use your standard FPM layout:
Code


Copy
<VirtualHost *:80>
ServerName forum.example.com
DocumentRoot /var/www/phpbb
<Directory /var/www/phpbb>
AllowOverride All
Require all granted
</Directory>
<FilesMatch "\.php$">
SetHandler "proxy:unix:/run/php/php8.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/phpbb_error.log
CustomLog ${APACHE_LOG_DIR}/phpbb_access.log combined
</VirtualHost>
Enable:
Bash


Copy
sudo a2ensite phpbb.conf
sudo systemctl reload apache2
Add HTTPS:
Bash


Copy
sudo certbot --apache -d forum.example.com
6. Run the Installer
Visit:
Code


Copy
https://forum.example.com/install
Provide:
Database: phpbb
User: phpbbuser
Password: (your password)
Host: localhost
Table prefix: phpbb_
After installation:
Delete /install/ directory:
Bash


Copy
sudo rm -rf /var/www/phpbb/install
7. Post‑Install Hardening
7.1 File Permissions
phpBB only needs write access to:
/store
/cache
/files
/images/avatars/upload
Set strict permissions:
Bash


Copy
sudo chown -R www-data:www-data /var/www/phpbb/{store,cache,files,images/avatars/upload}
sudo chmod 755 /var/www/phpbb
7.2 Disable Remote Avatar Uploads
ACP → General → Avatar Settings
Set to:
Allow remote avatars: No
Allow avatar uploading: Yes (local only)
7.3 Disable Remote File Uploads
ACP → Security → Disable dangerous MIME types.
8. Extensions (Safe Activation Workflow)
You already follow a safe extension workflow, so here’s the phpBB‑specific version:
8.1 Install Extensions
Place extensions in:
Code


Copy
/var/www/phpbb/ext/vendorname/extensionname/
8.2 Safe Activation Steps
Upload extension
ACP → Customise → Extensions
Click Enable
Immediately check:
ACP loads
UCP loads
Posting works
Error logs clean
8.3 If Something Breaks
Disable via CLI:
Bash


Copy
sudo -u www-data php /var/www/phpbb/phpbbcli.php extension:disable vendorname/extensionname
Then remove the directory.
9. Styles (Themes)
9.1 Install
Place styles in:
Code


Copy
/var/www/phpbb/styles/
9.2 Activate
ACP → Customise → Styles → Install
9.3 Per‑User Style
phpBB does not support true per‑forum style overrides, but:
You can force a style globally
Users can choose their own style
You can clone a style and apply template edits per‑forum using conditional template logic
You already explored this limitation earlier.
10. Backups & Maintenance
10.1 Database Backup
Bash


Copy
mysqldump -u root -p phpbb > phpbb_backup.sql
10.2 File Backup
Bash


Copy
tar -czvf phpbb_files_backup.tar.gz /var/www/phpbb
10.3 Update Workflow
Backup DB + files
Upload new phpBB package
Replace everything except:
/config.php
/files/
/images/
/store/
Run /install/app.php/update
Delete /install/
11. Troubleshooting Notes (Based on Your Environment)
11.1 PHP‑FPM Compatibility
Your phpBB install is already confirmed to work under PHP‑FPM with mod_php disabled.
11.2 Cache Issues
Clear cache manually:
Bash


Copy
sudo rm -rf /var/www/phpbb/cache/*.{php,html}
11.3 Permissions
If ACP complains about write access:
Bash


Copy
sudo chown -R www-data:www-data /var/www/phpbb
11.4 Email
phpBB uses PHP’s mail() by default.
You can switch to SMTP under:
ACP → General → Client Communication → Email Settings
12. Final Notes
This guide is:
Fully aligned with your existing stack
Uses only components you’ve already installed
Matches the Friendica guide’s structure
Safe for phpBB’s quirks and extension system
Ready to paste into your phpBB documentation forum
If you want, I can also generate:
A phpBB‑formatted BBCode version
A “minimalist admin hardening checklist”
A “phpBB disaster recovery quick guide”
A “phpBB + Apache + FPM troubleshooting matrix”
Just say the word.






A clean, reproducible deployment aligned with your existing stack
1. Overview
phpBB is a lightweight, stable, long‑running forum platform that fits perfectly into your modular LAMP‑plus‑FPM environment. With your current setup (Apache + PHP‑FPM + MariaDB), phpBB runs cleanly without mod_php and requires minimal maintenance once deployed.
This guide covers:
Preparing the system
Creating the database
Deploying phpBB
Configuring Apache vHost
Running the installer
Post‑install hardening
Extensions, styles, and safe activation workflow
Backup & maintenance notes
Everything here uses components you already have installed and validated.
2. Requirements (Already Installed in Your Stack)
You already have all required components:
PHP 8.4 + FPM
phpBB requires common extensions, all of which you already use for Friendica/Nextcloud:
php8.4-fpm
php8.4-mbstring
php8.4-xml
php8.4-json
php8.4-gd
php8.4-curl
php8.4-zip
php8.4-intl
php8.4-mysql
MariaDB
Your existing MariaDB server is fully compatible.
Apache
You’re already using:
mpm_event
proxy_fcgi
setenvif
rewrite
ssl
http2
phpBB works perfectly with this.
3. Create the Database
Bash


Copy
sudo mysql -u root -p
Inside MariaDB:
Sql


Copy
CREATE DATABASE phpbb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'phpbbuser'@'localhost' IDENTIFIED BY 'yourStrongPassword';
GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbbuser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
4. Download & Deploy phpBB
Navigate to your web root:
Bash


Copy
cd /var/www
sudo wget https://download.phpbb.com/pub/release/ ... 3.3.12.zip
sudo unzip phpBB-3.3.12.zip
sudo mv phpBB3 phpbb
Set ownership:
Bash


Copy
sudo chown -R www-data:www-data /var/www/phpbb
sudo find /var/www/phpbb -type d -exec chmod 755 {} \;
sudo find /var/www/phpbb -type f -exec chmod 644 {} \;
5. Apache vHost (PHP‑FPM)
Create:
Bash


Copy
sudo nano /etc/apache2/sites-available/phpbb.conf
Use your standard FPM layout:
Code


Copy
<VirtualHost *:80>
ServerName forum.example.com
DocumentRoot /var/www/phpbb
<Directory /var/www/phpbb>
AllowOverride All
Require all granted
</Directory>
<FilesMatch "\.php$">
SetHandler "proxy:unix:/run/php/php8.4-fpm.sock|fcgi://localhost/"
</FilesMatch>
ErrorLog ${APACHE_LOG_DIR}/phpbb_error.log
CustomLog ${APACHE_LOG_DIR}/phpbb_access.log combined
</VirtualHost>
Enable:
Bash


Copy
sudo a2ensite phpbb.conf
sudo systemctl reload apache2
Add HTTPS:
Bash


Copy
sudo certbot --apache -d forum.example.com
6. Run the Installer
Visit:
Code


Copy
https://forum.example.com/install
Provide:
Database: phpbb
User: phpbbuser
Password: (your password)
Host: localhost
Table prefix: phpbb_
After installation:
Delete /install/ directory:
Bash


Copy
sudo rm -rf /var/www/phpbb/install
7. Post‑Install Hardening
7.1 File Permissions
phpBB only needs write access to:
/store
/cache
/files
/images/avatars/upload
Set strict permissions:
Bash


Copy
sudo chown -R www-data:www-data /var/www/phpbb/{store,cache,files,images/avatars/upload}
sudo chmod 755 /var/www/phpbb
7.2 Disable Remote Avatar Uploads
ACP → General → Avatar Settings
Set to:
Allow remote avatars: No
Allow avatar uploading: Yes (local only)
7.3 Disable Remote File Uploads
ACP → Security → Disable dangerous MIME types.
8. Extensions (Safe Activation Workflow)
You already follow a safe extension workflow, so here’s the phpBB‑specific version:
8.1 Install Extensions
Place extensions in:
Code


Copy
/var/www/phpbb/ext/vendorname/extensionname/
8.2 Safe Activation Steps
Upload extension
ACP → Customise → Extensions
Click Enable
Immediately check:
ACP loads
UCP loads
Posting works
Error logs clean
8.3 If Something Breaks
Disable via CLI:
Bash


Copy
sudo -u www-data php /var/www/phpbb/phpbbcli.php extension:disable vendorname/extensionname
Then remove the directory.
9. Styles (Themes)
9.1 Install
Place styles in:
Code


Copy
/var/www/phpbb/styles/
9.2 Activate
ACP → Customise → Styles → Install
9.3 Per‑User Style
phpBB does not support true per‑forum style overrides, but:
You can force a style globally
Users can choose their own style
You can clone a style and apply template edits per‑forum using conditional template logic
You already explored this limitation earlier.
10. Backups & Maintenance
10.1 Database Backup
Bash


Copy
mysqldump -u root -p phpbb > phpbb_backup.sql
10.2 File Backup
Bash


Copy
tar -czvf phpbb_files_backup.tar.gz /var/www/phpbb
10.3 Update Workflow
Backup DB + files
Upload new phpBB package
Replace everything except:
/config.php
/files/
/images/
/store/
Run /install/app.php/update
Delete /install/
11. Troubleshooting Notes (Based on Your Environment)
11.1 PHP‑FPM Compatibility
Your phpBB install is already confirmed to work under PHP‑FPM with mod_php disabled.
11.2 Cache Issues
Clear cache manually:
Bash


Copy
sudo rm -rf /var/www/phpbb/cache/*.{php,html}
11.3 Permissions
If ACP complains about write access:
Bash


Copy
sudo chown -R www-data:www-data /var/www/phpbb
11.4 Email
phpBB uses PHP’s mail() by default.
You can switch to SMTP under:
ACP → General → Client Communication → Email Settings
12. Final Notes
This guide is:
Fully aligned with your existing stack
Uses only components you’ve already installed
Matches the Friendica guide’s structure
Safe for phpBB’s quirks and extension system
Ready to paste into your phpBB documentation forum
If you want, I can also generate:
A phpBB‑formatted BBCode version
A “minimalist admin hardening checklist”
A “phpBB disaster recovery quick guide”
A “phpBB + Apache + FPM troubleshooting matrix”
Just say the word.