4FreeForumsFree forum softwareStart a forum

Installing Flarum: Server Requirements and Setup Guide

By 4FreeForums Editors · Published October 28, 2026 · Sources linked below

Installing Flarum: Server Requirements and Setup Guide

Setting up a new discussion platform requires matching your hosting environment to the software's technical needs. Flarum 2.x offers a clean, lightweight forum interface, but it requires specific server tools, database drivers, and file permissions to run properly. Whether you test the software first on a community service like Free Flarum or deploy directly to your own server, this step-by-step tutorial explains the prerequisites and setup process for first-time forum administrators.

Step 1: Verify PHP and Database Requirements

Before transferring files, confirm that your hosting account or virtual server satisfies the baseline specifications listed in the Installation | Flarum Documentation. Your environment must include:

Prior to Flarum 2.0.2, the installer checks for the pdo_mysql extension regardless of which database driver you choose. Although older releases like MySQL 5.7 and MariaDB 10.x meet the minimum bar, they are approaching or past upstream end-of-life and are not recommended for fresh deployments. Instead, the project recommends running current LTS releases: MySQL 8.4 LTS, MariaDB 11.8 LTS, or PostgreSQL 15, 16, or 17. Flarum treats MySQL and MariaDB as separate database drivers, so ensure your configuration driver matches the database platform you connect to. For a side-by-side view with other forum systems, check our guide on Forum Software Server Requirements Compared (phpBB, MyBB, Flarum, Discourse).

Step 2: Choose Composer or Archive Files

Flarum supports two main installation workflows: command-line deployment through Composer or manual file extraction from an archive.

If you have SSH command-line access, navigate to the empty directory where you plan to install the forum and run:

composer create-project flarum/flarum:^2.0.0 .

While Composer pulls the software dependencies, set your web server webroot to point directly to the /path/to/your/forum/public subdirectory. If you plan to manage add-ons from your browser rather than the terminal, you can add the Extension Manager by running:

composer require flarum/extension-manager:*

Because the extension manager allows administrative users to install any Composer package, only install it if you trust every admin on your team with full package installation rights.

If your hosting environment lacks command-line access, you can download pre-built Flarum 2.0.2 archive packages. Official packages are provided for PHP 8.3, PHP 8.4, and PHP 8.5 in ZIP and TAR.GZ formats. You can select standard archives that utilize the public directory structure or choose no-public-dir packages if your host restricts webroot adjustments.

Step 3: Configure URL Rewriting for Your Web Server

Clean URLs require web server rewrite rules. Flarum bundles configuration files inside its directories to handle this routing.

On Apache servers, make sure the included .htaccess file exists in the public directory and that your site configuration permits directory overrides:

<Directory "/path/to/flarum/public">
AllowOverride All
</Directory>

You can enable rewrite functionality on Ubuntu with sudo a2enmod rewrite, while CentOS systems usually enable mod_rewrite by default. Remember to restart Apache after making configuration updates. If you use Nginx, include the bundled .nginx.conf file within your site block using include /path/to/flarum/.nginx.conf;. Caddy servers require defining the public root path, routing fastcgi to your active PHP socket, and configuring asset caching headers.

Step 4: Set Directory Ownership and File Permissions

During the setup routine, Flarum writes application settings and cached assets to disk. The operating system user running PHP and your web server must have read and write permissions to three specific locations:

  1. The root install directory, allowing Flarum to create and modify config.php.
  2. The storage subdirectory, where log entries and cached framework files reside.
  3. The assets subdirectory, used for uploaded logos and user avatars.

On Linux systems, you can apply write permissions using chmod 775 -R /path/to/directory. You should never set permissions to 777, as that permission level exposes files and folders to any user on the system. On standard Linux distributions where web servers run under the www-data user and group, update directory ownership using chown -R www-data:www-data /path/to/directory. To ensure your terminal user can also perform maintenance, attach your user account to the web server group with usermod -a -G www-data YOUR_USERNAME, then log out and back in. Environments using SELinux may also require running chcon -R -t httpd_sys_rw_content_t /path/to/directory.

Step 5: Run the Installer and Customize Paths

With server rules and permissions configured, open your domain name in a web browser to complete the visual installation wizard. You will be prompted to enter your database credentials and create your initial forum administrator account.

If your host forces you to serve files from a single shared webroot like public_html, follow the path adjustment instructions in the Installation | Flarum Documentation. Move the files from inside the public folder into your root directory, uncomment lines 9-15 in .htaccess (or lines 8-11 in .nginx.conf), adjust index.php to load site.php, and update the base, public, and storage path definitions inside site.php.

If you are bringing an existing audience over from platforms such as phpBB, SMF2, MyBB, or FluxBB, community-maintained migration tools can assist the transition. Review our recommendations in Migrating Forum Software Without Losing Members or Search Traffic before running imports on a live forum.

Sources

Published October 28, 2026. No affiliate links on this page. Facts come from the sources linked above; check them for updates.