How to Install ElkArte Forum on Ubuntu 18.04 or 20.04

ElkArte is a free, modern forum software that builds upon the foundation of Simple Machines Forum (SMF). Designed for simplicity and flexibility, SMF is a lightweight platform that enables users to create and manage online communities. With support for numerous community-created themes and plugins, ElkArte is highly customizable. It is developed in PHP and features a clean, responsive web interface. This guide walks you through installing ElkArte on an Ubuntu 18.04 or 20.04 server.

Prerequisites

  • A fully updated Ubuntu 18.04 or 20.04 server
  • A non-root user account with sudo privileges

1. Set Up the LAMP Stack

Begin by updating your package list:

Install the required repository tools:

$ sudo apt -y install software-properties-common
$ sudo add-apt-repository ppa:ondrej/php
$ sudo apt update

Install Apache, MySQL, PHP 7.4, and essential PHP extensions:

$ 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

Display available time zones and pick the one that matches your location:

$ sudo timedatectl list-timezones

Edit PHP’s configuration settings:

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

Update the configuration values below, replacing Africa/Nairobi with your local time zone:

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

Tip: Press Ctrl + W in nano to search specific lines.

2. Set Up the ElkArte Database

Access the MySQL shell (leave the password prompt empty if not set):

Create the database and user for ElkArte:

CREATE DATABASE elkarte;
CREATE USER 'elkarte'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL ON elkarte.* TO 'elkarte'@'localhost' WITH GRANT OPTION;
FLUSH PRIVILEGES;
EXIT;

3. Install the ElkArte Software

Download the latest version of ElkArte from the official GitHub page:

$ wget https://github.com/elkarte/Elkarte/releases/download/1.1.7/ElkArte_v1-1-7_install.zip

Create the directory for ElkArte installation:

$ sudo mkdir /var/www/elkarte

Extract the package files into the new directory:

$ sudo unzip ElkArte_v1-1-7_install.zip -d /var/www/elkarte

Adjust ownership and permissions for the directory:

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

4. Configure Apache2 for ElkArte

Create a new virtual host configuration file for Apache named elkarte.conf:

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

Insert the configuration block below into the file, then save and exit:

<VirtualHost *:80>

    ServerAdmin admin@example.com
    DocumentRoot /var/www/elkarte
    ServerName example.com
    ServerAlias www.example.com

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

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

</VirtualHost>

Navigate to the Apache configuration directory:

$ cd /etc/apache2/sites-available/

Disable the default Apache site configuration:

$ sudo a2dissite 000-default.conf

Activate the new configuration for ElkArte:

$ sudo a2ensite elkarte.conf

Enable the Apache rewrite module:

Restart the Apache service to apply the new settings:

$ sudo systemctl restart apache2

5. Open the ElkArte Web Installer

Launch your web browser and go to the server’s IP address to start the web-based setup:

Conclusion

ElkArte has been successfully installed on your Ubuntu server. Upon visiting the specified URL, you’ll be guided through the Installation Wizard. During this process, connect to the MySQL database previously created and configure the administrator account. Once setup is complete, you can access the admin dashboard and start customizing and managing your new forum community.

Source: vultr.com

Create a Free Account

Register now and get access to our Cloud Services.

Posts you might be interested in: