How to Install Vanilla Forum on Ubuntu 20.04

Updated on February 18, 2022
How to Install Vanilla Forum on Ubuntu 20.04 header image

Vanilla Forum is a free, open-source application that lets you create forums to engage with customers and interact through an online community setting. It is fully customizable, easy to use, and supports external themes that can be configured to match your existing website design.

In this article, you will learn how to install Vanilla Forum on a Ubuntu 20.04 server.


Setup the Vanilla Forum Database

Login to the MySQL server.

$ mysql -u root -p

Create a new Vanilla Forum Database.

create database vanilladb;

Create a new database User.

CREATE USER `admin`@`localhost` IDENTIFIED BY 'password';

Give the user full rights to the database.

GRANT ALL PRIVILEGES ON vanilladb.* TO admin@localhost;

Refresh MySQL permissions.


Exit the MySQL Shell.

mysql> exit

Install Vanilla Forum

Vanilla Forum requires a specific group of PHP extensions. Add them to your existing PHP installation using the following command:

$ sudo apt install php php-fpm php-gd php-intl php-mysql php-mbstring php-curl php-cli php-pear php-dev

Now, download the latest Vanilla Forum release file.

$ wget

Extract files from the zipped archive, and save them to the Vanilla Forum web files directory.

$ sudo unzip -d /var/www/vanilla

Move all files from the package subdirectory to the root Vanilla web files directory.

$ sudo mv /var/www/vanilla/package/* /var/www/vanilla

Next, grant Nginx full permissions to the directory.

$ sudo chown -R www-data:www-data /var/www/Vanilla/


Configure Nginx

Create and edit a new Nginx configuration file using your favorite text editor.

$ sudo nano /etc/nginx/conf.d/vanilla.conf

Paste the following contents, replacing with your domain.

server {
        listen 80;
        root /var/www/html;
        index index.php index.html index.htm;

location / {

                 try_files $uri $uri/ /index.php?q=$uri&$args;

        location ~ \.php$ {
                try_files $uri =404;
                fastcgi_split_path_info ^(.+\.php)(/.+)$;
                fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
                fastcgi_index index.php;
                fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
                include fastcgi_params;


Save and close the file.

Check Nginx for errors.

$ nginx -t

Restart Nginx.

$ systemctl restart nginx

Configure SSL

To secure your Vanilla Forum installation with HTTPS, install a free SSL certificate from Let’s Encrypt using Certbot.

Install Certbot.

 $ sudo apt install python3-certbot certbot

Request for a free SSL Certificate.

$ sudo certbot  -d

Test auto renewal.

$ sudo certbot renew --dry-run

Setup Firewall

Allow HTTP Traffic.

$ sudo ufw allow in http

Allow HTTPS traffic.

$ sudo ufw allow in https

Verify the new rules in your Firewall table.

$ sudo ufw status

Restart the Firewall.

$ sudo ufw reload

Configure Vanilla Forum

Through a web browser session, visit your subdomain.

Then, enter the Database name, user, and Password created earlier. Check I don’t need a .htaccess file, and proceed with setting up the forum title, administrator email, username, and password to continue.

Vanilla Forum backend Dashboard

Within the Vanilla Forum dashboard, make further configurations to your setup through the Settings option on the navigation bar.


You have successfully installed and configured Vanilla Forum on a Ubuntu 20.04 Vultr Server. For further information on setting up the application, visit the official Vanilla community forum.