How to Install Vanilla Forums on Ubuntu Server Latest

Introduction

This tutorial will guide you through the installation process of Vanilla Forums on Ubuntu Server.

Prerequisites

Before we begin, you should have the following:

Step 1: Install LAMP stack

Vanilla Forums require a LAMP (Linux, Apache, MySQL, PHP) stack to be installed on the server. Follow the steps below to install the required components.

Install Apache

sudo apt update
sudo apt install apache2

Install MySQL

sudo apt install mysql-server

During the installation process, you will be prompted to set a password for the MySQL root user. Remember the password as we will need it later.

Install PHP

sudo apt install php libapache2-mod-php php-mysql

Check PHP version

php -v

Step 2: Configure Apache for Vanilla Forums

Create a new Apache virtual host configuration file for Vanilla Forums.

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

Add the following code to the file, replacing the domain name or IP address with your own.

<VirtualHost *:80>
    ServerName your-domain.com
    DocumentRoot /var/www/html/vanilla
    <Directory /var/www/html/vanilla>
        Options Indexes FollowSymLinks MultiViews
        AllowOverride All
        Order allow,deny
        allow from all
    </Directory>
    ErrorLog ${APACHE_LOG_DIR}/vanilla_error.log
    CustomLog ${APACHE_LOG_DIR}/vanilla_access.log combined
</VirtualHost>

Save and close the file.

Step 3: Download and Install Vanilla Forums

Change to the Apache document root directory where we will download Vanilla Forums.

cd /var/www/html

Download the latest version of Vanilla Forums from the official website.

sudo git clone https://github.com/vanilla/vanilla.git

Change the ownership of the vanilla folder to the www-data user and group.

sudo chown -R www-data:www-data vanilla/

Step 4: Configure MySQL for Vanilla Forums

Create a new MySQL database and user for Vanilla Forums.

mysql -u root -p

Enter the MySQL root password when prompted.

Create a new database for Vanilla Forums.

CREATE DATABASE vanilla_db;

Create a new user and grant access to the database.

CREATE USER 'vanilla_user'@'localhost' IDENTIFIED BY 'your-password';
GRANT ALL PRIVILEGES ON vanilla_db.* TO 'vanilla_user'@'localhost';
FLUSH PRIVILEGES;

Exit from MySQL.

exit;

Step 5: Install Vanilla Forums

Open your web browser and navigate to your domain name or IP address. You should see the Vanilla Forums setup page.

Follow the on-screen instructions to complete the setup process. When prompted, enter the following details:

Once the setup is complete, you should see the Vanilla Forums homepage.

Conclusion

Congratulations! You have successfully installed Vanilla Forums on your Ubuntu Server. You can now customize your forum, create new categories, and start engaging with your community.

If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!

Alternatively, for the best virtual desktop, try Shells!