Learn How To Install and Configure miniBB Forum on Ubuntu 16.04

March 4, 2020

Table of Contents


MiniBB, also known as Mini Bulletin Board, is an open source program used for building your own internet forum. It is written in PHP and specially designed for small and medium forum communities, which have less than 100 unique posts per day. In this tutorial, I will show you how to install and configure miniBB forum on Ubuntu 16.04.


  • A newly launched IT Web Services Ubuntu 16.04 server instance.
  • A non-root user with sudo privileges setup on your server.

Step 1: Update the System

First, update your system to the latest stable version by running the following command:

sudo apt-get update -y
sudo apt-get upgrade -y
sudo reboot

Step 2: Installing the LAMP stack

You will need to install the LAMP stack and some PHP modules before installing miniBB. You can install them with the following command:

sudo apt-get install apache2 libapache2-mod-php7.0 mariadb-server php7.0 php7.0-mysql php7.0-curl php7.0-gd php7.0-json php7.0-opcache php7.0-common

Step 3: Installing miniBB

First you will need to download the latest stable version of miniBB from miniBB’s website.

Create a directory named minibb and extract the downloaded archive to the Apache document root directory.

sudo mkdir /var/www/html/minibb
sudo unzip minibb.zip -d /var/www/html/minibb

Set the proper permissions on the minibb directory.

sudo chown -R www-data:www-data /var/www/html/minibb

You will also need to make some changes in setup_options.php file.

sudo nano /var/www/html/minibb/setup_options.php

Change the file as per your needs.

$admin_usr = 'admin';
$admin_pwd = 'admin@123';
$admin_email = 'admin@example.com';

Once you are finished, save and close the file.

Step 4: Configuring MariaDB for miniBB

By default, MariaDB has not been secured, so you’ll need to secure it first. You can secure it with the mysql_secure_installation script.

sudo mysql_secure_installation

Answer all the questions as shown below:

In order to log into MariaDB to secure it, we'll need the current
password for the root user.  If you've just installed MariaDB, and
you haven't set the root password yet, the password will be blank,
so you should just press enter here.
Enter current password for root (enter for none):
OK, successfully used password, moving on...
Setting the root password ensures that nobody can log into the MariaDB
root user without the proper authorisation.
You already have a root password set, so you can safely answer 'n'.
Change the root password? [Y/n] n
... skipping.
By default, a MariaDB installation has an anonymous user, allowing anyone
to log into MariaDB without having to have a user account created for
them.  This is intended only for testing, and to make the installation
go a bit smoother.  You should remove them before moving into a
production environment.
Remove anonymous users? [Y/n] Y
Normally, root should only be allowed to connect from 'localhost'.  This
ensures that someone cannot guess at the root password from the network.
Disallow root login remotely? [Y/n] Y
... Success!
By default, MariaDB comes with a database named 'test' that anyone can
access.  This is also intended only for testing, and should be removed
before moving into a production environment.
Remove test database and access to it? [Y/n] Y
- Dropping test database...
... Success!
- Removing privileges on test database...
... Success!
Reloading the privilege tables will ensure that all changes made so far
will take effect immediately.
Reload privilege tables now? [Y/n] Y
... Success!
Cleaning up...
All done!  If you've completed all of the above steps, your MariaDB
installation should now be secure.
Thanks for using MariaDB!

Next, login to the MariaDB console and create a database for miniBB:

mysql -u root -p

Enter your MariaDB root password and hit enter. Once you are logged into MariaDB, you need to create a database for miniBB:

MariaDB [(none)]> CREATE DATABASE minibb;
MariaDB [(none)]> CREATE USER 'minibbuser'@'localhost' IDENTIFIED BY 'password';
MariaDB [(none)]> GRANT ALL PRIVILEGES ON `minibb`.* TO 'minibbuser'@'localhost';
MariaDB [(none)]> FLUSH PRIVILEGES; 
MariaDB [(none)]> q

Step 5: Configuring Apache for miniBB

Create a new virtual host file minibb.conf for Apache.

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

Add the following lines:

 <VirtualHost *:80>
 ServerAdmin admin@example.com
 DocumentRoot /var/www/html/minibb
 ServerAlias www.example.com
 <Directory /var/www/html/minibb/>
 Options FollowSymLinks
 AllowOverride All
 Order allow,deny
 allow from all
 ErrorLog /var/log/apache2/minibb_log
 CustomLog /var/log/apache2/minibb_custom_log common

Once you are finished, enable the virtual host by running the following command:

 sudo a2ensite minibb.conf
 sudo service apache2 reload

Step 6: Accessing miniBB Forum

It’s time to access the miniBB web interface. Open your favorite web browser and type the URL http://your-server-ip/_index.php. Complete the required steps to finish the installation.

Once the installation has finished, you can log into the miniBB admin panel by navigating to http://your-server-ip/bb_admin.php?. Enjoy your new miniBB.

Need help?

Do you need help setting up this on your own service?
Please contact us and we’ll provide you the best possible quote!