How to Install Pi.Alert on Your Synology NAS

How to Install Pi.Alert on Your Synology NAS

Pi.Alert is an advanced Docker application that scans for devices connected to your WIFI/LAN and alerts you if new and unknown devices are found. The system continuously scans the network for new devices, new connections (re-connections), disconnections, “always connected” devices down, devices IP changes and Internet IP address changes. In this step by step guide I will show you how to install Pi.Alert on your Synology NAS using Docker & Portainer.

💡Note: This guide works perfectly with the latest Pi.Alert 23.5.7 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

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

Pi.Alert Synology NAS Set up folder new 2024

  • STEP 4

Now create three new folders inside the pialert folder that you created at STEP 3 name them config, db, logs. Follow the instructions in the image below.
Note: Be careful to enter only lowercase, not uppercase letters.

Pi.Alert Synology NAS Set up folder2 2024

  • STEP 5

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 6

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

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

version: "3.9"
services:
  pi.alert:
     container_name: Pi.Alert
     healthcheck:
      test: curl -f http://localhost:17811/ || exit 1
     mem_limit: 2g
     cpu_shares: 768
     security_opt:
      - no-new-privileges:true
     volumes:
      - /volume1/docker/pialert/config:/home/pi/pialert/config:rw
      - /volume1/docker/pialert/db:/home/pi/pialert/db:rw
      - /volume1/docker/pialert/logs:/home/pi/pialert/front/log:rw
     environment:
      TZ: Europe/Bucharest
      PORT: 17811
      HOST_USER_ID: 1026
      HOST_USER_GID: 100
     network_mode: host
     restart: on-failure:5
     image: jokobsk/pi.alert:latest

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 numbers for HOST_USER_ID and HOST_USER_GID with your own values. (Follow my step by step guide on how to do this.1026 is my personal ID value and 100 is my personal GID value. You have to type in your own values.

Pi.Alert Synology NAS Set up 1 new 2024

  • STEP 7

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.

Pi.Alert Synology NAS Set up 2 new 2024

  • STEP 8

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

Pi.Alert Synology NAS Set up 3

  • STEP 9

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

  • STEP 10

The installation process can take up to a few seconds/minutes. It will depend on your Internet speed connection. Now open your browser and type in http://Synology-ip-address:17811 it will take a few minutes for Pi.Alert to scan your entire network.💡Note: On the left sidebar you can click on Settings and you can add a different Subnet to scan.

Pi.Alert Synology NAS Set up 4

  • STEP 11

Protect your Pi.Alert instance via password. On the left sidebar click on Settings then check Enable login. Scroll down the page until you find the Save button. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 5

  • STEP 12

Click Save. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 6

  • STEP 13

A new pop up window will open. Click OK. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 7

  • STEP 14

On the left sidebar in Portainer, click Containers. Identify your Pi.Alert instance, then click on the little terminal icon. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 8

  • STEP 15

After you click on the little terminal icon at STEP 14, a new page will open. Click Connect. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 9

  • STEP 16

After you click Connect at STEP 14, a Console will open. Copy Paste the code below and follow the instructions in the image.

/home/pi/pialert/back/pialert-cli set_password mariushosting2023

Note: Before you paste the code above in the Console area below, change mariushosting2023 with the new password you want to use.
Note: The password you choose should have at least 16 characters.

Pi.Alert Synology NAS Set up 10

  • STEP 17

Once the code is inserted, confirm by pressing Enter on your keyboard to start the password creation process. Once it’s done, you will see a message that says: The new password is set. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 11

  • STEP 18

Now open your browser and type in http://Synology-ip-address:17811 You will be asked to enter your password. Type in the password you have previously created at STEP 16 then click Log in. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 12

  • STEP 19

If you want to change the Pi.Alert theme to Dark Mode, click on Maintenance then Toggle Modes Dark/Light. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 13

  • STEP 20

A new orange pop up window will open. Click Switch. Follow the instructions in the image below.

Pi.Alert Synology NAS Set up 14

  • STEP 21

Your Pi.Alert dashboard at a glance!

Pi.Alert Synology NAS Set up 15

  • STEP 22

Enable email notifications on Pi.Alert.

Enjoy Pi.Alert!

Note: If you want to run the Pi.Alert container over HTTPS, check How to Run Docker Containers Over HTTPS. In order to make Pi.Alert work over https, it’s also mandatory to set up WebSocket.

Note: Can I run Docker on my Synology NAS? See the supported models.
Note: Find out how to update the Pi.Alert 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 Monday / May 8th, 2023 at 3:19 AM