Installation & Administration Guide (Ubuntu 25.04 + Apache + PHP‑FPM 8.4 + MariaDB)

phpBB is a free flat-forum bulletin board software solution that can be used to stay in touch with a group of people or can power your entire website.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Installation & Administration Guide (Ubuntu 25.04 + Apache + PHP‑FPM 8.4 + MariaDB)

Post by FiendKing04 »

A comprehensive, modular, reproducible deployment guide for long‑term maintainability.

Section 1 — Introduction

phpBB is a stable, lightweight, and long‑running forum platform built on PHP and MariaDB. Unlike federated platforms (Friendica, Mastodon, etc.), phpBB is a self‑contained application with no external protocol dependencies. This makes it ideal for:
  • Private communities
  • Support forums
  • Project documentation hubs
  • Internal knowledge bases
This guide covers:
  • Installation
  • Configuration
  • Hardening
  • Extensions
  • Styles
  • Email
  • Backups
  • Updates
  • Troubleshooting
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 2 — System Requirements

Post by FiendKing04 »

Section 2 — System Requirements

Before installing phpBB, ensure that your server meets the following software and configuration requirements. These components must be installed and enabled for phpBB to operate correctly.

2.1 PHP Requirements
phpBB requires PHP running in FPM (FastCGI Process Manager) mode, along with the following extensions:
  • 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
All listed extensions must be installed and enabled for phpBB to function properly.


2.2 Apache Requirements

phpBB is compatible with Apache’s mpm_event processing model when used with PHP‑FPM via proxy_fcgi.
The following Apache modules must be enabled:
  • proxy_fcgi
  • setenvif
  • rewrite
  • ssl
  • http2
  • headers
These modules provide PHP‑FPM integration, URL rewriting, HTTPS support, and modern HTTP features.


2.3 Database Requirements

phpBB supports several database engines.

For this guide, the recommended and supported database is:

MariaDB 10.x or newer

The database must be created prior to running the phpBB installer.


2.4 Recommended Directory Layout

A clean and predictable directory structure simplifies configuration, maintenance, and future upgrades.
The following layout is recommended:

Code: Select all

/var/www/phpbb
/etc/apache2/sites-available/phpbb.conf
This structure keeps phpBB’s application files organized under the web root and its Apache configuration isolated within the standard vHost directory.
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 3 — Preparing the System

Post by FiendKing04 »

Section 3 — Preparing the System

Before installing phpBB, the server must be updated and the required software components must be installed and running. This section covers the initial preparation steps needed to ensure the system is ready for the phpBB deployment process.


3.1 Update System Packages

Begin by updating the package index and installing the latest available system updates:

Code: Select all

sudo apt update && sudo apt upgrade -y
Keeping the system current ensures compatibility with PHP, Apache, and MariaDB packages used later in the installation.

3.2 Install and Enable PHP‑FPM

Install PHP 8.4 and the required FPM service:

Code: Select all

sudo apt install php8.4-fpm
After installation, verify that the PHP‑FPM service is running:

Code: Select all

systemctl status php8.4-fpm
If the service is not active, start it:

Code: Select all

sudo systemctl start php8.4-fpm

3.3 Install and Start MariaDB

Install the MariaDB server package:

Code: Select all

sudo apt install mariadb-server
Verify that the database service is running:

Code: Select all

systemctl status mariadb
If necessary, start the service:

Code: Select all

sudo systemctl start mariadb
3.4 Install Apache and Required Modules

Install Apache along with the modules required for PHP‑FPM integration and HTTPS support:

Code: Select all

sudo apt install apache2 libapache2-mod-fcgid
sudo a2enmod proxy_fcgi setenvif rewrite ssl http2 headers
sudo systemctl restart apache2
These modules enable FastCGI processing, URL rewriting, secure connections, and modern HTTP features.

3.5 Create the Web Root Directory

Create the directory where phpBB will be installed:

Code: Select all

sudo mkdir -p /var/www/phpbb
This directory will serve as the document root for the phpBB virtual host configured later in the guide.
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 4 — Database Setup

Post by FiendKing04 »

Section 4 — Database Setup

Log into MariaDB:

Code: Select all

sudo mysql -u root -p
Create database + user:

Code: Select all

CREATE DATABASE phpbb CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'phpbb'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON phpbb.* TO 'phpbb'@'localhost';
FLUSH PRIVILEGES;
EXIT;
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 5 — Downloading phpBB

Post by FiendKing04 »

Section 5 — Downloading phpBB

Navigate to web root:

Code: Select all

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

Code: Select all

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 {} \;
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 6 — Apache Virtual Host Configuration

Post by FiendKing04 »

Section 6 — Apache Virtual Host Configuration

Create vHost:

Code: Select all

sudo nano /etc/apache2/sites-available/phpbb.conf
Apache Virtual Host Configuration

Create a new Apache virtual host configuration file for phpBB. This file defines how Apache will serve the forum and how PHP‑FPM will process PHP files.

Open a new vHost file:

Code: Select all

sudo nano /etc/apache2/sites-available/phpbb.conf
Insert the following configuration:

Code: Select all

<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>
This configuration:
  • Serves phpBB from /var/www/phpbb
  • Enables .htaccess support.
  • Sends all PHP files to PHP‑FPM via FastCGI.
  • Creates dedicated access and error logs for phpBB.

Enable the Virtual Host

Activate the new site and reload Apache:

Code: Select all

sudo a2ensite phpbb.conf
sudo systemctl reload apache2

Enable HTTPS Support

If you plan to use HTTPS (recommended), obtain a TLS certificate using Certbot:

Code: Select all

sudo certbot --apache -d phpbb.conf
Certbot will automatically:
  • Request a certificate
  • Configure HTTPS
  • Create the SSL virtual host

Reload Apache

Code: Select all

sudo systemctl reload apache2
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 7 — Running the Installer

Post by FiendKing04 »

Section 7 — Running the Installer

Navigate to:

https://forum.example.com/install

Provide:
  • Database: phpbb
  • User: phpbb
  • Password: StrongPassword
  • Host: localhost
  • Table prefix: phpbb_
After installation:

Code: Select all

sudo rm -rf /var/www/phpbb/install
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 8 — Post‑Install Configuration

Post by FiendKing04 »

Section 8 — Post‑Install Configuration

8.1 ACP Login

Access:

https://forum.domain.tld/adm


8.2 Board Settings

ACP → General → Board Settings
  • Enable board: Yes
  • Site name: Your forum name
  • Site description: Optional

8.3 Cookie Settings

ACP → General → Server Configuration → Cookie Settings

Set:
  • Cookie domain: .domain.tld
  • Cookie name: phpbb3_XXXX
  • Cookie secure: Yes
  • SameSite: Lax

8.4 Server Settings

ACP → General → Server Configuration → Server Settings

Set:
  • Force server URL: Yes
  • Protocol: HTTPS
  • Domain: forum.domain.tld
  • Script path: /
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 9 — Hardening & Security

Post by FiendKing04 »

Section 9 — Hardening & Security

9.1 File Permissions

phpBB only needs write access to:
  • /store
  • /cache
  • /files
  • /images/avatars/upload
Set strict permissions:

Code: Select all

sudo chown -R www-data:www-data /var/www/phpbb/{store,cache,files,images/avatars/upload}
sudo chmod 755 /var/www/phpbb

9.2 Disable Remote Avatars

ACP → General → Avatar Settings
  • Allow remote avatars: No
  • Allow avatar uploading: Yes

9.3 Disable Dangerous MIME Types

ACP → Security → Disallowed MIME types

Add:
  • php
  • phtml
  • phar
  • js
  • sh

9.4 Disable Remote File Uploads

ACP → Security → Allow remote uploads → No
I make the best FK'ing Projects around.
User avatar
FiendKing04
FK'ing Administrator
FK'ing Administrator
Posts: 35
Joined: March 9th, 2026, 8:36 pm
Location: IN, USA
Contact:

Section 10 — Extensions

Post by FiendKing04 »

Section 10 — Extensions

10.1 Installing Extensions

Upload to:

Code: Select all

/var/www/phpbb/ext/vendorname/extensionname/

10.2 Enabling Extensions

ACP → Customise → Extensions → Enable


10.3 Safe Activation Workflow
  • Upload extension
  • Enable in ACP
  • Check ACP loads
  • Check UCP loads
  • Check posting works
  • Check logs

10.4 CLI Disable (Emergency)
  • sudo -u www-data php /var/www/phpbb/phpbbcli.php extension:disable vendorname/extensionname
I make the best FK'ing Projects around.
Locked