Metabase is an open-source business intelligence tool. Metabase lets you ask questions about your data, and displays answers in formats that make sense, whether that’s a bar chart or a detailed table. It’s a simple and powerful tool which lets anyone learn and make decisions from their company’s data, no technical knowledge required. In this step by step guide I will show you how to install Metabase on your Synology NAS using Docker and Portainer.
Metabase v0.51.3 release.
This guide works perfectly with the latestSTEP 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.
STEP 5
Now click the “Create” button. Follow the instructions in the image below.
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 Metabase. After that, add the following instructions:
Source:
Protocol: HTTPS
Hostname: metabase.yourname.synology.me
Port: 443
Check Enable HSTS
Destination:
Protocol: HTTP
Hostname: localhost
Port: 6400
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.
STEP 8
Go to Control Panel / Network / Connectivity tab/ Check Enable HTTP/2 then click Apply. Follow the instructions in the image below.
STEP 9
Go to Control Panel / Security / Advanced tab/ Check Enable HTTP Compression then click Apply. Follow the instructions in the image below.
STEP 10
Go to File Station and open the docker folder. Inside the docker folder, create one new folder and name it metabase. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 11
Now create two new folders inside the metabase folder that you created at STEP 10 and name them db and plugins. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 12
Follow my step by step guide on how to activate SMTP for your Gmail account. This step is mandatory. Note: If you don’t want to use the easiest way for SMTP with Google and you already have SMTP details from your own Mail Server, you can just skip this STEP and use your personalized email SMTP details instead.
STEP 13
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.
STEP 14
In the Name field type in metabase. Follow the instructions in the image below.
services: db: image: postgres:17 container_name: Metabase-DB hostname: metabase-db security_opt: - no-new-privileges:true healthcheck: test: ["CMD", "pg_isready", "-q", "-d", "metabase", "-U", "metabaseuser"] timeout: 45s interval: 10s retries: 10 volumes: - /volume1/docker/metabase/db:/var/lib/postgresql/data:rw environment: POSTGRES_DB: metabase POSTGRES_USER: metabaseuser POSTGRES_PASSWORD: metabasepass restart: on-failure:5 metabase: image: metabase/metabase:latest container_name: Metabase hostname: metabase mem_limit: 3g cpu_shares: 768 security_opt: - no-new-privileges:true user: 1026:100 healthcheck: test: curl --fail -I http://localhost:3000/api/health || exit 1 interval: 15s timeout: 5s retries: 5 ports: - 6400:3000 volumes: - /volume1/docker/metabase/plugins:/plugins:rw environment: TZ: Europe/Bucharest JAVA_TIMEZONE: Europe/Bucharest MUID: 1026 MGID: 100 MB_DB_TYPE: postgres MB_DB_DBNAME: metabase MB_DB_PORT: 5432 MB_DB_USER: metabaseuser MB_DB_PASS: metabasepass MB_DB_HOST: metabase-db MB_EMAIL_FROM_ADDRESS: Your-own-gmail-address MB_EMAIL_FROM_NAME: Metabase MB_EMAIL_REPLY_TO: true MB_EMAIL_SMTP_USERNAME: Your-own-gmail-address MB_EMAIL_SMTP_PASSWORD: Your-own-app-password MB_EMAIL_SMTP_HOST: smtp.gmail.com MB_EMAIL_SMTP_SECURITY: ssl MB_EMAIL_SMTP_PORT: 465 MB_SITE_URL: metabase.yourname.synology.me restart: on-failure:5 depends_on: db: condition: service_healthy
Note: Before you paste the code above in the Web editor area below, change the value numbers for user with your own values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for TZ. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value for JAVA_TIMEZONE. (Select your current Time Zone from this list.)
Note: Before you paste the code above in the Web editor area below, change the value numbers for MUID and MGID with your own values. (Follow my step by step guide on how to do this.) 1026 is my personal UID value and 100 is my personal GID value. You have to type in your own values.
Note: Before you paste the code above in the Web editor area below, change the value for MB_EMAIL_FROM_ADDRESS and type in your own Gmail address. STEP 12.
Note: Before you paste the code above in the Web editor area below, change the value for MB_EMAIL_SMTP_USERNAME and type in your own Gmail address. STEP 12.
Note: Before you paste the code above in the Web editor area below, change the value for MB_EMAIL_SMTP_PASSWORD and type in your own Gmail app password. STEP 12.
Note: Before you paste the code above in the Web editor area below, change the value for MB_SITE_URL and type in your own synology.me DDNS without https:// at the beginning that you have previously created at STEP 6.
STEP 15
Scroll down on the page until you see a button called 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.
STEP 16
If everything goes right, you will see this message at the top right of your screen: “Success Stack successfully deployed“.
STEP 17
Go back to STEP 1 or you will deal with karma 🙂
STEP 18
Please wait approximately 5 minutes for the installation to be completed or you will get a blank Synology page if you try to connect too soon. Now open your browser and type in your HTTPS/SSL certificate like this https://metabase.yourname.synology.me that you have previously created at STEP 6. In my case it’s https://metabase.mariushosting.synology.me If everything goes right, you will see the Metabase setup page. Click Let’s get started. Follow the instructions in the image below.
STEP 19
Select your language then click Next. Follow the instructions in the image below.
STEP 20
Type in your own details then click Next. Note: You will need the Email and Password to Log in to Metabase. Follow the instructions in the image below.
STEP 21
Click I’ll add my data later. Follow the instructions in the image below.
STEP 22
Click Finish. Follow the instructions in the image below.
STEP 23
Click Take me to Metabase. Follow the instructions in the image below.
STEP 24
At the top right of the page click on the little gear icon then Admin settings. Follow the instructions in the image below.
STEP 25
On the left Sidebar click Email then Send test email. Note: The test will be used to see if you have correctly entered your SMTP details at STEP 14. Follow the instructions in the image below.
STEP 26
Check your Email!
If you encounter issues by using this container, make sure to check out the Common Docker issues article.
Enjoy Metabase!
Note: Read the Metabase Full Documentation.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: How to Back Up Docker Containers on your Synology NAS.
Note: Find out how to update the Metabase container with the latest image.
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 / November 13th, 2024 at 3:57 AM