Install phpBB forum on Debian 11 Bullseye

Tutorial to get the steps and commands for installing phpBB on Debian 11 Bullseye using the terminal for creating own forum.

What is phpBB?

phpBB is a fully scalable and customizable open-source forum. The software has a user-friendly interface and straightforward management options. It is based on PHP and MySQL.

Well, phpBB is a group of international people who enjoy working on open-source software. This software was created in June 2000. There have been some changes in the licenses as well as in the management team of phpBB. The goals of the phpBB creators are still the same. They want to provide free forum software for the Internet.

Some features of the phpBB forum software

  • Any database server
  • Interfaces for different languages
  • Forums for private or public use
  • Send private messages in the system
  • The integrated search function in the software
  • The layout can be changed with templates
  • The software can be optimized with mods


Steps to install phpBB forum software in Debian 11 Bullseye

1. phpBB Requirements

To perform this tutorial we require a Debian based Linux, with PHP 7.1.3+,  database server (MySQL, MariaDB, MS SQL Server 2000 or above (via ODBC or the native adapter), Oracle, PostgreSQL 8.3+ or SQLite 3.6.15+), Web server, and access to a non-root user with sudo rights.


2. Run Debian 11 system update

All the core software packages we required to install the phpBB forum are available through the default Debian 11 22.04 & 20.04 base repository. Hence, first, make sure your system is up to date.

sudo apt update && sudo apt upgrade


3. Install Apache, MySQL, and PHP

We need the LAMP server stack to install the phpBB forum on Debian 11, therefore in this step execute the single command given below. This will install Apache web server, MariaDB, PHP, and its required extensions.

sudo apt install apache2 mariadb-server libapache2-mod-php php-gd php-curl openssl php-imagick php-intl php-json php-ldap php-common php-mbstring php-mysql php-imap php-sqlite3 php-net-ftp php-zip unzip php-pgsql php-ssh2 php-xml wget unzip


4. Start and Enable Services

After completing the previous step let’s enable and start the services of Apache and MariaDB to run automatically with system boot.

sudo systemctl enable --now apache2 mariadb

Restart the service once

sudo systemctl restart apache2 mariadb

Now check the status:

sudo systemctl status apache2
sudo systemctl status mariadb


5. Create a Database for phpBB on Debian 11

Before creating a database and user for phpBB, let’s run a MySQL command to secure our database server instance:

sudo mysql_secure_installation

Go through the text-based wizard and remove the demo database table, set root user password, limit remote access…

After that login to your MariaDB server to create a database and user.

sudo mysql -u root -p

Note: Change yourdb with the Database name you want to use, whereas youruser and yourpassword with username and password, respectively, with whatever you want to assign.

Create DB:

GRANT ALL ON yourdb.* to 'youruser'@'localhost' IDENTIFIED BY 'yourpassword';


6. Download phpBB forum files

Unlike other common open-source software, the phpBB forum is not available to download or install using the Debian 11 Bullseye package repositories. Hence, we have to download its files manually from its official website.

You can click on the download button to get it on your system. However, if you are using a command-line server or accessing your server via SSH then right-click on the”Download button” and select the “Copy Link Address” option.

Download phpBB forum files

After that come to your Terminal and download the phpBB setup file using wget command i.e:

wget paste-link

For example:


Extract the file 

After downloading the file, extract it:

unzip phpBB-*.zip

Now, move it to your web directory:

sudo mv phpBB3 /var/www/html/phpbb

Give Apache users the ownership of the file and set read-write permission for it as well.

sudo chown -R www-data:www-data /var/www/html/phpbb
sudo chmod -R 775 /var/www/html/phpbb


7. Configure Virtual Host for phpBB

To host multiple websites or web platforms on an Apache web server, the best way is to use Virtual host configuration files, where we tell the Apache what is the location files, how and when it has to serve the users. Most of the time, we configure forums either in subdomain or subdirectory. Here we are doing the same.

sudo nano /etc/apache2/sites-available/phpbb.conf

Copy-Paste the following lines:

Note: Although we can access the forum using the server-IP-address, however, if you want to use FQDN (Domain)  then replace with the domain you want to use for accessing the phpBB forum in the below-given configuration lines.

<VirtualHost *:80>
      ServerAdmin [email protected]
      DocumentRoot /var/www/html/phpbb

      <Directory /var/www/html/phpbb>
                Options FollowSymlinks
                AllowOverride All
                Require all granted

ErrorLog ${APACHE_LOG_DIR}/phpbb_error.log
CustomLog ${APACHE_LOG_DIR}/phpbb_access.log combined


Save the file by using Ctrl+O, press Y and Ctrl+X to exit.

Enable created virtual host configuration for phpBB and also the Apache’s rewrite module:

sudo a2ensite phpbb
sudo a2enmod rewrite

Restart the Apache Service to apply the changes:

sudo systemctl restart apache2


8. Install phpBB forum on Debian 11

After completing all the above-given steps, open your system browser that can access the domain or server-ip-address of Debian 11 Bullseye where you have installed the phpBB forum web software. And point it to that.

For example:

Note: Replace server-ip-address with the actual address whereas with the domain you have configured.


As you get the Graphical user interface of phpBB to install this forum software, select the “Install” tab and then click on the “Install” button.

Start phpBB installation on Linux Debian 11 bullseye

Create Admin user:

Add the username, email address, and password that you want to use to access and login to the backend of the phpBB.

Create Admin User phpbb debian 11

Database Configuration:

As we have used the MariaDB database server, therefore let’s add the details of that. Use localhost or for the Database server hostname, leave the port blank. After that add the details of the Database such as name, username, and password.

Connect Database to PHPBB Forum

Server Configuration:

Well, in this step you will get some settings to configure Cookie, URL, HTTP or HTTPS protocol, and others. Do the needful, otherwise, leave them because we can configure them later.

Server Configuration for phpBB

Email Configuration:

To confirm the registration of new users we need to have an Email service enabled on our forum. Therefore, if you want it, then configure the SMTP server.

Email Configuration for phpBB

Give Title to your Bulletin board Configuration.

bulletin Board configuration

The installation is finally completed.

Open source Forum software installation finished

Now, delete the “Install” folder to access the create, delete the posts and access the features of the phpBB forum software.

Go to your server terminal and run this command:

sudo rm -r /var/www/html/phpbb/install

Refresh your phpBB web interface and this time you will have the “Welcome post“.


9. Access phpBB Administration Control Panel

To access the Admin control panel, click on the link given for the same at the footer of phpBB. For reference see the screenshot.

Adminsitration Control Panel phpBB Debian 11 min Install phpBB forum on Debian 11 Bullseyel min



Other Articles:

How to install MySQL 8.0 Server on Debian 11 Bullseye
How To Install Discourse on Debian 11 Bullseye server
Install qbittorrent on Debian 11 Bullseye Linux
How to Install LibreNMS on Debian 11 Bullseye
How to install Telegram on Debian 11 Bullseye




Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.