Installing Flarum on CloudPanel – 404/403 Errors Solved

Nemesis

Active member
Joined
Mar 22, 2025
Messages
35
Points
61
Age
26
Hi everyone,
I’ve been trying to install Flarum on a CloudPanel-managed server, but I ran into multiple issues.
At first, I tried using:

Code:
composer create-project flarum/flarum
This created a flarum folder inside the website directory, but visiting the domain resulted in a 404 error. After trying a ZIP-based install instead, I hit a 403 Forbidden error (nginx) after uploading and extracting the files.
I’m using:
  • PHP 8.3
  • The Flarum no-public-dir archive: flarum-v1.x-no-public-dir-php8.3.zip
  • A fresh Ubuntu VPS with CloudPanel
It’s been frustrating and I feel like I’m missing something obvious. Any idea what’s going wrong?
 
Solution
Don’t worry — this is a very common situation when installing Flarum manually, especially if you're unfamiliar with directory structure and permissions. Fortunately, it’s easy to fix once you know what to look for.

Problem Summary​

  1. If you see a 404, it’s likely a URL rewrite issue or the Flarum folder isn’t in the correct web root.
  2. If you see a 403, it’s usually a permissions issue or missing index.php in the expected root folder.

Solution (Tested & Working)​

  1. Log into your CloudPanel Admin
  2. Create a new website and choose PHP 8.3
  3. Go to Database → create a new database and take note of:
    • DB name
    • DB user
    • DB password
    ...
Don’t worry — this is a very common situation when installing Flarum manually, especially if you're unfamiliar with directory structure and permissions. Fortunately, it’s easy to fix once you know what to look for.

Problem Summary​

  1. If you see a 404, it’s likely a URL rewrite issue or the Flarum folder isn’t in the correct web root.
  2. If you see a 403, it’s usually a permissions issue or missing index.php in the expected root folder.

Solution (Tested & Working)​

  1. Log into your CloudPanel Admin
  2. Create a new website and choose PHP 8.3
  3. Go to Database → create a new database and take note of:
    • DB name
    • DB user
    • DB password
  4. Download the archive:👉 Flarum No-Public-Dir Package
    Code:
    File: flarum-v1.x-no-public-dir-php8.3.zip
  5. Navigate to your site’s folder:
    Code:
    /home/cloudpanel/htdocs/yourdomain.com/
  6. Delete everything inside the folder (including index.html)
  7. Upload and extract the Flarum zip file here
  8. ⚠️ Important: The extracted files must be directly inside yourdomain.com folder
    NOT like this: yourdomain.com/flarum/index.php
    But like this: yourdomain.com/index.php
  9. Make sure file permissions are correct:

    Code:
    sudo chown -R clp:clp /home/cloudpanel/htdocs/yourdomain.com
  10. Visit your domain and proceed with the Flarum installation form using your DB credentials.

Let me know if you need help with setting up extensions or configuring rewrite rules for Nginx afterwards — Flarum can run beautifully once the structure is correct!
 
Solution
Back
Top