How to Install MyBB on Linux Server with Let’s Encrypt SSL (Debian/Ubuntu)

  • Post last modified:October 21, 2023
  • Post category:Linux / Web
  • Post comments:0 Comments
  • Reading time:12 mins read

in this post, I will show you how to install MyBB on a Linux server with Let’s Encrypt SSL.

Table of Contents:

Step 1: Choose a Linux Server Provider

First, select a reliable Linux server provider that meets your requirements in terms of performance, resources, and budget.

Step 2: Connect to Your Linux Server

connect to your Linux Server via SSH

Step 3: Update Your Server

update your server:

sudo apt update
sudo apt upgrade

Step 4: Install Apache Web Server


Install Apache on your server:

sudo apt install apache2

Once the installation is complete, start the Apache service and enable it to start on boot:

sudo systemctl start apache2
sudo systemctl enable apache2

Step 5: Install MySQL Database Server

MyBB requires a MySQL database to store forum data. Install MySQL on your server:

sudo apt install mysql-server

During the installation process, you will be prompted to set a password for the MySQL root user. Make sure to choose a strong, unique password and keep it secure.

After the installation, start the MySQL service and enable it on boot:

sudo systemctl start mysql
sudo systemctl enable mysql

Run the MySQL secure installation script to further secure your MySQL installation:

sudo mysql_secure_installation

Follow the prompts, such as removing anonymous users, disabling remote root login, and removing test databases.

Step 6: Install PHP and Required Extensions

MyBB is built using PHP, so you need to install PHP and some required PHP extensions on your server:

sudo apt install php libapache2-mod-php php-mysql php-curl php-gd php-mbstring php-xml php-xmlrpc php-zip

Once the installation is complete, restart the Apache service for the changes to take effect:

sudo systemctl restart apache2

Step 7: Configure Firewall

Configure a firewall to only allow necessary incoming and outgoing traffic. You can use the UFW (Uncomplicated Firewall) utility to set up a firewall:

sudo apt install ufw
sudo ufw default deny incoming
sudo ufw default allow outgoing
sudo ufw allow ssh
sudo ufw allow http
sudo ufw allow https
sudo ufw enable

This will allow SSH, HTTP, and HTTPS traffic while blocking all other incoming traffic. Make sure to enable the firewall on boot.

sudo systemctl enable ufw

Step 8: Install Let’s Encrypt SSL

Install Certbot for SSL

sudo apt install certbot python3-certbot-apache

Generate and install a SSL certificate for your domain:

sudo certbot --apache -d

Replace “” with your actual domain name. Follow the prompts to generate the SSL certificate and configure Apache to use SSL.

Step 9: Download and Extract MyBB

Next, download the latest stable release of MyBB from the official MyBB website:


Extract the downloaded ZIP file to the Apache web server’s root directory:

sudo mv Upload/* /var/www/html/
rm /var/www/html/index.html

Step 10: Set File Permissions and Create MySQL Database

Set the file permissions for the MyBB files and directories:

sudo chown -R www-data:www-data /var/www/html/
sudo chmod -R 755 /var/www/html/

Create a MySQL database and user for MyBB:

sudo mysql -u root -p
CREATE USER 'mybbuser'@'localhost' IDENTIFIED BY 'mypassword';
GRANT ALL PRIVILEGES ON mybbdb.* TO 'mybbuser'@'localhost';

Replace “mybbdb”, “mybbuser”, and “mypassword” with your preferred database name, database username, and password.

Step 11: Install MyBB


Now, you are ready to install MyBB. Open your web browser and navigate to your domain (e.g., The MyBB installation wizard will appear.

Follow the instructions to configure your forum, including the database settings (use “localhost” as the database host), and administrator account.

mybb install steps
creating admin account for mybb
mybb forum site view
admin dashboard view

Step 12: Secure Your MyBB Forum

To further enhance the security of your MyBB forum, there are a few additional steps you can take:

  1. Update MyBB: Make sure to regularly update your MyBB installation to the latest stable version to ensure that you have the latest security patches and bug fixes(how-to-upgrade-mybb-version).
  2. Enable CAPTCHA: MyBB has built-in CAPTCHA support that can help prevent automated spam bots from registering on your forum. You can enable CAPTCHA in the MyBB Admin Control Panel under the “Configuration” tab.


You have successfully installed MyBB on your Linux server with Let’s Encrypt SSL. By following the steps outlined in this post, you have created a secure MyBB forum. Remember to regularly update your MyBB and enable CAPTCHA.

Leave a Reply