Umami is a simple, fast, privacy-focused alternative to Google Analytics. The goal is to provide you with a friendlier, privacy-focused alternative to Google Analytics and a free, open-sourced alternative to paid solutions. Umami collects only the metrics you care about and everything fits on a single page. You can use Umami on your Synology NAS as alternative to Plausible and Matomo. For my personal experience Umami is better than Matomo. In this step by step guide I will show you how to install Umami on your Synology NAS using Docker.
Limitation: The Umami container works only with some Synology NAS devices like the 18+, 21+, 22+, 23+ series. The NAS models that DO NOT support umami at all due to hardware limitations are the 20+ series like the DS220+, DS720+, DS920+, DS1520+.
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.
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 Umami. After that, add the following instructions:
Source:
Protocol:Â HTTPS
Hostname: umami.yourname.synology.me
Port:Â 443
Check Enable HSTS
Destination:
Protocol:Â HTTP
Hostname:Â localhost
Port:Â 3999
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 / 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 umami. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.
STEP 11
Now create one new folder inside the umami folder that you created at STEP 10 and name it db. Follow the instructions in the image below.
Note: Be careful enter only lowercase, not uppercase letters.
STEP 12
Download (click on the blue link below) then upload the schema.postgresql.sql file below in the umami folder that you created at STEP 10. Follow the instructions in the image below.
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 umami. Follow the instructions in the image below.
version: '3' services: umami: image: ghcr.io/umami-software/umami:postgresql-latest ports: - 3999:3000 environment: DATABASE_URL: postgresql://umami:umami@db:5432/umami DATABASE_TYPE: postgresql depends_on: - db restart: always db: image: postgres:12-alpine environment: POSTGRES_DB: umami POSTGRES_USER: umami POSTGRES_PASSWORD: umami volumes: - /volume1/docker/umami/schema.postgresql.sql:/docker-entrypoint-initdb.d/schema.postgresql.sql:ro - /volume1/docker/umami/db:/var/lib/postgresql/data restart: always
STEP 15
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.
STEP 16
If everything goes right, you will see the following 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
Now open your browser and type in your HTTPS address like this https://umami.yourname.synology.me In my case it’s https://umami.mariushosting.synology.me If everything goes right, you will see the login page. Type in the default username and password, then click Login. Follow the instructions in the image below.
STEP 19
At the top right of the page click user Profile. Follow the instructions in the image below.
STEP 20
On the left sidebar select Account. Change the default credentials “admin and umami” with your own credentials. Follow the instructions in the image below.
STEP 21
Click on the Settings tab then click Add website. Follow the instructions in the image below.
STEP 22
Add your own website Name and Domain URL then click Save. Follow the instructions in the image below.
STEP 23
Click on the Tracking code icon then copy your own personal Java Script code. Follow the instructions in the image below.
STEP 24
Paste your personal Umami JavaScript Tracking code you have automatically generated at STEP 23 on your website between the <​head> and </head> tags of your site, then update your file. For example, I have a WordPress website hosted on a Synology NAS. If you have a WordPress website hosted elsewhere, know that the process is the same. Log into your WordPress admin Dashboard, click on the left sidebar on “Theme File Editor“, under Appearance. Select your theme then search for the header.php file. Paste your personal Umami JavaScript Tracking code in the header.php file between the <​head> and </head> tags of your site, then update your file. Follow the instructions in the image below.
Note: You can add multiple websites via the Umami Dashboard later.
Enjoy Umami! Go back to your umami synology.me DDNS and start looking at the stats! After the JavaScript snippet is added to your website, Umami will start to collect Real-Time analytics of your website. My blog doesn’t have any TRACKING CODE on it. I just installed Umami to show you how it works and how easily you can implement it on your website. I have already uninstalled it. Don’t forget to go back to STEP 1. I have worked hard for this guide so you can enjoy it.
Note: Can I run Docker on my Synology NAS? See the supported models.
Note: Find out how to update the Umami container with the latest image.
Note: How to Free Disk Space on Your NAS if You Run Docker.
Note: Instead of the synology.me DDNS you can also use your own domain name.
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 / January 29th, 2023 at 10:14 PM