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.6.3 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

  • STEP 5

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

Flarum Synology NAS Set up 2

  • 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

  • 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 5

  • STEP 9

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

Flarum Synology NAS Set up 6

  • STEP 10

Now create four new folders inside the flarum folder that you created at STEP 9 and name them assets, 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

  • STEP 11

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 12

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"

services:
  flarum:
    image: mondedie/flarum
    container_name: Flarum
    environment:
      - DEBUG=false
      - FORUM_URL=https://flarum.yourname.synology.me
      - DB_HOST=mariadb
      - 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=yourownemail@gmail.com
    volumes:
      - /volume1/docker/flarum/assets:/flarum/app/public/assets
      - /volume1/docker/flarum/extensions:/flarum/app/extensions
      - /volume1/docker/flarum/storagelogs:/flarum/app/storage/logs
      - /volume1/docker/flarum/nginx:/etc/nginx/flarum
    ports:
      - 8444:8888
    depends_on:
      - mariadb

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

Note: Before you paste the code above in the Web editor area, change the value for FORUM_URL and add your own synology.me wildcard that you have set up at STEP 6.
Note: Before you paste the code above in the Web editor area, change the value for DB_PASS and add your own database 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_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. yourownemail@gmail.com is an example of an email.
Note: Before you paste the code above in the Web editor area, change the value for MYSQL_ROOT_PASSWORD and add your own password. mariushosting is an example of a password.
Note: Before you paste the code above in the Web editor area, change the value for MYSQL_PASSWORD and add your own password. mariushosting is an example of a password.

1 Flarum Synology NAS Set up

  • STEP 13

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.

2 Flarum Synology NAS Set up

  • STEP 14

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 15

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

  • STEP 16

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: mariadb
  • MySQL Database: flarum
  • MySQL Username: flarum
  • MySQL Password: Your own MYSQL password that you have chosen at STEP 12.

On the Admin Username, Admin Email and Admin Password areas type in your own Flarum credentials that you have chosen at STEP 12. Click Install Flarum. Follow the instructions in the image below.

Flarum Synology NAS Set up 12

  • STEP 17

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

  • STEP 18

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

Flarum Synology NAS Set up 14

  • STEP 19

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 20

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

Note: Find out how to update the Flarum container with the latest image.
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 Sunday / February 12th, 2023 at 9:55 AM