This repository contains instructions and necessary files to set up and run an instance of Shoutrrr, Watchtower, and Grafana on a Raspberry Pi using Docker. Shoutrrr is a service for sending notifications to various instant messaging platforms like Discord and Slack, while Watchtower is a service for monitoring and automatically updating Docker containers. Grafana is used for visualizing and analyzing the vital statistics of the Raspberry Pi.
By Matteo Vincenti
Before proceeding with the installation and deployment of services, ensure that Docker is installed on your Raspberry Pi. If Docker is not installed, follow the official Docker installation guide available on the Docker website.
Additionally, you need to generate tokens for Telegram and/or Slack bots and configure any other necessary endpoints for notifications.
Clone the repository onto your Raspberry Pi:
git clone <repository_URL>
Navigate to the project directory:
cd <project_folder_name>
Copy the .env.example
file to .env
:
cp .env.example .env
Populate the .env
file with your configurations:
generate a key for DOCKER_INFLUXDB_INIT_ADMIN_TOKEN
:
openssl rand --hex 32
This key can also be used to generate the password for DOCKER_INFLUXDB_INIT_PASSWORD
.
You can use the provided scripts to start and stop the services:
To start the services:
./scripts/start.sh
To stop the services:
./scripts/stop.sh
After launching the services, you can configure Grafana to visualize the data from InfluxDB.
-
Access Grafana by navigating to
http://<raspberry_pi_ip>:3000
in your web browser. Log in using the default credentials (admin/admin
). -
Click on "Add data source" and choose "InfluxDB".
-
Configure the InfluxDB data source with the following details:
- URL:
http://influxdb:8086
- Token:
<your InfluxDB admin token>
- Organization:
<organization>
- Bucket:
telegraf
- URL:
-
Save the data source.
-
Now you can import and customize dashboards to visualize your Raspberry Pi's vital statistics.
-
Navigate to the folder
grafana/dashboards
within your project repository. -
Locate the JSON file containing the dashboard you wish to import.
In the .env
file, you can copy, paste and edit the following configurations or create your own by following the documentation:
WATCHTOWER_NOTIFICATION_URL="discord://token@channel"
WATCHTOWER_CLEANUP=true
WATCHTOWER_REMOVE_VOLUMES=true
WATCHTOWER_INCLUDE_STOPPED=true
WATCHTOWER_NO_STARTUP_MESSAGE=false
To start the container run
docker compose -f docker-compose.watchtower.yml up -d
To start the container run
docker compose -f docker-compose.portainer.yml up -d
Now you can go to https://localhost:9443
and follow the initial setup.
Generate a token for Homarr:
openssl rand --hex 32
Add the generated token to the .env
file under SECRET_ENCRYPTION_KEY
.
To start the container run
docker compose -f docker-compose.homarr.yml up -d