How to Install Flarum on Your Synology NAS

How to Install Flarum on Your Synology NAS

Flarum is the next-generation forum software that makes online discussion fun. It’s simple, fast, and free. Are you tired of heavy and complicated paid forums? Flarum is the ideal solution for your community. In this step by step guide I will show you how to install Flarum on your Synology NAS using Docker and Portainer.

💡Note: This guide works perfectly with the latest Flarum v1.8.5 release.

  • STEP 1

Please Support My work by Making a Donation.

  • STEP 2

Install Portainer using my step by step guide. If you already have Portainer installed on your Synology NAS, skip this STEP. Attention: Make sure you have installed the latest Portainer version.

  • STEP 3

Make sure you have a synology.me Wildcard Certificate. Follow my guide to get a Wildcard Certificate. If you already have a synology.me Wildcard certificate, skip this STEP.

  • STEP 4

Go to Control Panel / Login Portal / Advanced Tab / click Reverse Proxy. Follow the instructions in the image below.

Flarum Synology NAS Set up 1 new 2024

  • STEP 5

Now click the “Create” button. Follow the instructions in the image below.

Flarum Synology NAS Set up 2 new 2024

  • STEP 6

After you click the Create button, the window below will open. Follow the instructions in the image below.

On the General area, set the Reverse Proxy Name description: type in Flarum. After that, add the following instructions:

Source:
Protocol: HTTPS
Hostname: flarum.yourname.synology.me
Port: 443

Check Enable HSTS

Destination:
Protocol: HTTP
Hostname: localhost
Port: 8444

Flarum Synology NAS Set up 3 new 2024

 

  • STEP 7

On the Reverse Proxy Rules click the Custom Header tab. Click Create and then, from the drop-down menu, click WebSocket. After you click on WebSocket, two Header Names and two Values will be automatically added. Click Save. Follow the instructions in the image below.

Synology Proxy WebSocket

  • STEP 8

Go to Control Panel / Network / Connectivity / Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.

Flarum Synology NAS Set up 4 new 2024

  • STEP 9

Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.

Flarum Synology NAS Set up 5 new 2024

  • STEP 10

Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it flarum. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Flarum Synology NAS Set up 6

  • STEP 11

Now create four new folders inside the flarum folder that you created at STEP 10 and name them assets, db, extensions, nginx, storagelogs. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Flarum Synology NAS Set up 7 new 2024

 

  • STEP 12

Log into Portainer using your username and password. On the left sidebar in Portainer, click on Stacks then + Add stack. Follow the instructions in the image below.

1 Synology Portainer Add Stack

  • STEP 13

In the Name field type in flarum. Follow the instructions in the image below.

Note: Copy Paste the code below in the Portainer Stacks Web editor.

version: "3.9"
services:
  flarum:
    image: mondedie/flarum
    container_name: Flarum
    environment:
        DEBUG: false
        FORUM_URL: https://flarum.yourname.synology.me
        DB_HOST: db
        DB_NAME: flarum
        DB_USER: flarum
        DB_PASS: mariushosting
        DB_PREF: flarum_
        DB_PORT: 3306
        FLARUM_ADMIN_USER: Marius
        FLARUM_ADMIN_PASS: mariushosting
        FLARUM_ADMIN_MAIL: yourown@email
    volumes:
      - /volume1/docker/flarum/assets:/flarum/app/public/assets:rw
      - /volume1/docker/flarum/extensions:/flarum/app/extensions:rw
      - /volume1/docker/flarum/storagelogs:/flarum/app/storage/logs:rw
      - /volume1/docker/flarum/nginx:/etc/nginx/flarum:rw
    ports:
      - 8444:8888
    depends_on:
      - db

  db:
    image: mariadb:11.3-jammy
    container_name: Flarum-DB
    environment:
      - MYSQL_ROOT_PASSWORD=mariushosting
      - MYSQL_DATABASE=flarum
      - MYSQL_USER=flarum
      - MYSQL_PASSWORD=mariushosting
    volumes:
      - /volume1/docker/flarum/db:/var/lib/mysql:rw

Note: Before you paste the code above in the Web editor area below, change the value for FORUM_URL and type in your own synology.me DDNS with https:// at the beginning that you have previously created at STEP 6.
Note: Before you paste the code above in the Web editor area, change the values for DB_PASS , MYSQL_ROOT_PASSWORD and MYSQL_PASSWORD. Type in your own password. mariushosting is an example of a password. The password should be the same for all 3 values.
Note: Before you paste the code above in the Web editor area, change the value for FLARUM_ADMIN_USER and add your own admin username. Marius is an example of an admin name.
Note: Before you paste the code above in the Web editor area, change the value for FLARUM_ADMIN_PASS and add your own admin password. mariushosting is an example of a password.
Note: Before you paste the code above in the Web editor area, change the value for FLARUM_ADMIN_MAIL and add your own email. yourown@email is an example of an email.

Flarum Synology NAS Set up 8 new 2024

  • STEP 14

Scroll down on the page until you see a button named Deploy the stack. Click on it. Follow the instructions in the image below. The installation process can take up to a few minutes. It will depend on your Internet speed connection.

Flarum-Synology-NAS-Set-up-9-new-2026

  • STEP 15

If everything goes right, you will see the following message at the top right of your screen: “Success Stack successfully deployed“.

3 Flarum Synology NAS Set up

  • STEP 16

Go back to STEP 1 or you will deal with karma 🙂.

  • STEP 17

Now open your browser and type in your HTTPS/SSL certificate like this https://flarum.yourname.synology.me In my case it’s https://flarum.mariushosting.synology.me If everything goes right, you will see the Flarum installation page. Add your own Forum Title then the following parameters:

  • MySQL Host: db
  • MySQL Database: flarum
  • MySQL Username: flarum
  • MySQL Password: Your own MYSQL_PASSWORD that you have chosen at STEP 13.
  • Table Prefix: flarum_
  • Admin Username: Your own FLARUM_ADMIN_USER that you have chosen at STEP 13.
  • Admin Email: Your own FLARUM_ADMIN_MAIL that you have chosen at STEP 13.
  • Admin Password: Your own FLARUM_ADMIN_PASS that you have chosen at STEP 13.
  • Confirm Password: Confirm your FLARUM_ADMIN_PASS.

Click Install Flarum. Follow the instructions in the image below.

Flarum Synology NAS Set up 10 new 2024

  • STEP 18

After the installation, you will receive the following error message: Something went wrong while trying to load the full version of this site. Try hard-refreshing this page to fix the error. Go straight to STEP 19.

Flarum Synology NAS Set up 11 new 2024

  • STEP 19

On the left sidebar in Portainer, click Containers. Identify your Flarum instances, select them then click Restart. Follow the instructions in the image below.

Flarum Synology NAS Set up 12 new 2024

  • STEP 20

Now open your browser and type in your HTTPS/SSL certificate like this https://flarum.yourname.synology.me In my case it’s https://flarum.mariushosting.synology.me If everything goes right, you will see your Flarum forum. At the top right of the page click on your name, then Profile. Follow the instructions in the image below.

Flarum Synology NAS Set up 13 new 2024

  • STEP 21

Upload your own picture from your computer, then click Administration. Follow the instructions in the image below.

Flarum Synology NAS Set up 14

  • STEP 22

On the left sidebar click on Appearance. Customize your Flarum forum by choosing Dark Mode, your own color combination, your own logo, your own icon, then click Save Changes. Follow the instructions in the image below.

Flarum Synology NAS Set up 15

  • STEP 23

To post something in your new forum just click on Start a Discussion in the left sidebar. Type in your topic and text then click Post Discussion. Follow the instructions in the image below.

Flarum Synology NAS Set up 16

Invite your Community Followers to participate on your own Flarum Forum!

Flarum Synology NAS Set up 17

  • STEP 24

Set Up Email Notifications on Flarum.

Enjoy Flarum!

Note: If you need to install different Flarum languages like French, just use the following command: sudo docker exec Flarum composer require flarum-lang/french

Note: Find out how to update the Flarum container with the latest image.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: How to Schedule Start & Stop For Docker Containers.
Note: How to Activate Email Notifications.
Note: How to Add Access Control Profile on Your NAS.
Note: How to Change Docker Containers Restart Policy.
Note: How to Use Docker Containers With VPN.
Note: Convert Docker Run Into Docker Compose.
Note: How to Clean Docker.
Note: How to Clean Docker Automatically.
Note: Best Practices When Using Docker and DDNS.
Note: Some Docker Containers Need WebSocket.
Note: Find out the Best NAS Models For Docker.
Note: Activate Gmail SMTP For Docker Containers.

This post was updated on Wednesday / March 6th, 2024 at 12:26 PM