Install ElkArte on Ubuntu 20.04

Updated on December 2, 2021
Install ElkArte on Ubuntu 20.04 header image


ElkArte is an open-source modern and powerful community forum building software based on SMF (Simple Machines Forum). SMF is a simple, lightweight forum platform used to create and manage your own online forum community. It is easy to use and customize with the collection of themes and addons written by the community. It is written in PHP and gives you an intuitive and fully responsive web interface. In this article, you will learn how to install ElkArte on Ubuntu 18.04 or 20.04 server.


1. Install LAMP Stack

Update the system package manager.

$ sudo apt update

Add ppa:ondrej/php PPA repository.

$ sudo apt -y install software-properties-common

$ sudo add-apt-repository ppa:ondrej/php

Update the system package manager.

$ sudo apt update

Install PHP 7.4 and additional PHP modules.

$ sudo apt install apache2 mysql-server php7.4 libapache2-mod-php7.4 php7.4-common php7.4-sqlite3 php7.4-json php7.4-curl php7.4-intl php7.4-mbstring php7.4-xmlrpc php7.4-mysql php7.4-gd php7.4-xml php7.4-cli php7.4-zip php7.4-soap php7.4-imap php7.4-bcmath wget unzip -y

List available time zones and choose your correct time zone.

$ sudo timedatectl list-timezones

Edit the PHP configuration file.

$ sudo nano /etc/php/7.4/apache2/php.ini

Modify the following values, and replace Africa/Nairobi with your own timezone save and close the file:

To search for a specific line, use Control + W, enter search phrase then press Enter.

max_execution_time = 360    
memory_limit = 256M
upload_max_filesize = 100M
date.timezone = Africa/Nairobi

2. Create ElkArte Database

Log in to MySQL shell. When prompted for a password, just press Enter to continue.

$ sudo mysql -u root -p

Create a database called elkarte.


Create a database user called elkarte with a password.

CREATE USER 'elkarte'@'localhost' IDENTIFIED BY 'StrongPassword';

Then grant the user full access to the elkarte database.

GRANT ALL ON elkarte.* TO 'elkarte'@'localhost' WITH GRANT OPTION;

Save your changes.


Exit the shell.


3. Install ElkArte

Download the latest version of ElkArte package. To download the latest version, go to the latest releases page.

$ wget

Create the installation directory /var/www/elkarte.

$ sudo mkdir /var/www/elkarte

Unzip the downloaded files into the installation directory.

$ sudo unzip -d /var/www/elkarte

Change ownership of the installation directory.

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

Change access permissions for the directory.

$ sudo chmod -R 755 /var/www/elkarte

4. Configure Apache2

Create a new configuration file named elkarte.conf.

$ sudo nano /etc/apache2/sites-available/elkarte.conf

Add the following content below into the file, then save and close the file:

<VirtualHost *:80>

    DocumentRoot /var/www/elkarte

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

     ErrorLog ${APACHE_LOG_DIR}/error.log
     CustomLog ${APACHE_LOG_DIR}/access.log combined


Change to Apache configs directory.

$ cd /etc/apache2/sites-available/

Disable Apache default configuration file.

$ sudo a2dissite 000-default.conf

Enable ElkArte Apache configuration file.

$ sudo a2ensite elkarte.conf

Enable Apache rewrite mode.

$ sudo a2enmod rewrite

Restart Apache service.

$ sudo systemctl restart apache2

5. Access ElkArte Web Interface

To access the ElkArte Web Interface, go to your browser and visit http://Server_IP/. For example:


You have successfully installed ElkArte on your server. You will be redirected to the Installation Wizard screen. You will need to complete all the installation steps by connecting to the database you created and creating an administrator account. You can now access the Dashboard and configure it to begin managing your forum.