Synology SNMP Network Monitoring with LibreNMS Docker

I used exactly what was in the instructions, changing just the passwd & TZ.

[email protected]:/volume1/docker/librenms# docker run \

-p 8668:80
-e DB_HOST=db
-e DB_NAME=librenms
-e DB_USER=librenms
-e DB_PASS=password
-e APP_KEY=base64:nN4CbqJ34Jdwbm0Sh8QhNIrpSTjvDXp64CU26k2tSt0=
-e TZ=America/Los_Angeles
–link mariadb:db
-v /volume1/docker/librenms/logs:/opt/librenms/logs
-v /volume1/docker/librenms/rrd:/opt/librenms/rrd
-v /volume1/docker/librenms/custom.config.php:/opt/librenms/conf.d/custom.config.php:ro
–name librenms
–restart always
[email protected]:/volume1/docker/librenms#


Thanks for the update

Command looks good…


If the container is still running, could you execute the database setup again and see whether it shows the same errors?

Checking the logs, seems that it can connect into MariaDB but missing the LibreNMS database

Just tested a fresh install… and it worked on my end. Syno 916+

Could you try these commands, I’ve adjusted to match your settings

(ignore the TZ , we’re testing here)

mkdir /volume1/docker/mariadb-test

docker run \
-v /volume1/docker/mariadb-test:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD="rooting" \
-e TZ=Asia/Singapore \
--name mariadb-test \
-d \
--restart always \
mariadb:latest \

docker exec -it mariadb-test mysql -u root
(if you get error 2002, wait for few seconds and try again)

CREATE DATABASE librenms CHARACTER SET utf8 COLLATE utf8_unicode_ci;
CREATE USER 'librenms'@'%' IDENTIFIED BY 'libre_password';
CREATE USER 'librenms'@'localhost' IDENTIFIED BY 'libre_password';
GRANT ALL PRIVILEGES ON librenms.* TO 'librenms'@'%';

docker restart mariadb-test

mkdir -p /volume1/docker/librenms-test/{logs,rrd}
touch /volume1/docker/librenms-test/custom.config.php

docker run \
-p 8669:80 \
-e DB_HOST=db \
-e DB_NAME=librenms \
-e DB_USER=librenms \
-e DB_PASS=libre_password \
-e APP_KEY="base64:EnvObkEFPuBasVQ/kabnYM8GCKI8k1eN7SWaSA90wbI=" \
-e BASE_URL= \
-e TZ=Asia/Singapore \
--link mariadb-test:db \
-v /volume1/docker/librenms-test/logs:/opt/librenms/logs \
-v /volume1/docker/librenms-test/rrd:/opt/librenms/rrd \
-v /volume1/docker/librenms-test/custom.config.php:/opt/librenms/conf.d/custom.config.php:ro \
--name librenms-test \
-d \
--restart always \

(I’m using port 8669 here)

docker exec -it librenms-test setup_database
(this takes a while…)

docker exec librenms-test create_admin

Hopefully everything works, try logging in @

Let me know if this set of commands works on your end, its basically the same command I ran with change of IP to match yours on the -e BASE_URL

(Fingers crossed :face_with_hand_over_mouth:)

Well, that worked. The only difference I can see is that you added “-it” in docker exec -it librenms-test setup_database command.

Ok, I’ll remove all the containers and images and try again.

Thank you!!!


Remember to remove the existing data folders for both mariadb and LibreNMS if you are starting fresh :sweat_smile:

Still find it weird that it didn’t work during your first attempt…

Maybe it’s the double-quotes for the app_key

This didn’t matter as well I realise when running the database setup. Was hoping it would show real-time database activity with the “-it” option, but it doesn’t, so just wait till the process is finished and it will output at the end

5 posts were split to a new topic: LibreNMS and Raspberry Pi

I’m trying to set up the SMTP Office 365 relay to send alerts, but it fails.
The configuration seems to be good, but obviously it’s wrongs.

Someone has had the same problem??
Thank you :sweat_smile:

Hi @alrodgir and welcome to the forums :slight_smile:

What is your setup like?

Check/Allow firewall going out for smtp port 587 on the host that you installed LibreNMS on

1 Like

I’m talking about librenms configuration.
My network admin is reviewing the firewall configuration, I’ll answer you ASAP about this config.


which parts are you in control?

Router < > LibreNMS Host (Synology? Server? VM? Laptop? PC?)

If you have another SMTP server to try on, it would be great to filter out whether it is the settings, or network wide blockage

  1. Another SMTP server
    a) Fails
    Host/Network Problem
    b) Success
    Office365 config problem

If you are on Syno and firewall turned on, please make sure SMTP outgoing is allowed. If you have to ask an network admin… they might be blocks/policies in the network that you are unaware of.

When you click on Test Email, what error does LibreNMS returns you?

Oh, sorry for being so concise :sweat_smile:
My set up is so simply:
Synology NAS with Librenms docker.
The Synology firewall is off.
Moikrotik router.
All output traffic it’s allowed.

Maybe I can try with the Google SMTP server :thinking:

When I click the test I obtain this Captura3
But, if I configure a printer to alert directly, with the same config, the printer alert correctly.

1 Like

Ok now we are getting somewhere… :smiley:

It seems the auth returns error, so network is ok as it’s able to contact the smtp server

Try unchecking “Auto TLS” and test again

Yea, this test should help too if above doesn’t work

hi all, an update to recent test deployment of jarischaefer’s LibreNMS image,
its broken on both Synology and general Debian installs

Do NOT update to latest image

Do NOT update to latest image if you doing maintenance of your containers

Tested on:
Syno 916+
DSM 6.2.3-25426

Version 1.65.1 - Sat Jul 11 2020 03:56:16 GMT+0800
Database Schema 2020_06_23_00522_alter_availability_perc_column (170)
Web Server nginx/1.15.8
PHP 7.4.7
Python 3.6.9
MySQL 10.4.12-MariaDB-1:10.4.12+maria~bionic
Laravel 6.18.20
RRDtool 1.7.0

Discovery works but never polls after

Test with Ubuntu VM

Distributor ID:	Ubuntu
Description:	Ubuntu 18.04.4 LTS
Release:	18.04
Codename:	bionic

Thought I’d test this image in a VM to cancel out some Syno permission problems to make sure the image is working error

Latest working version: 1.63

If anyone tested with the latest version and works, would appreciate if they could report with any work arounds/solutions :slight_smile:

For new users deploying a fresh install, I’ve tested from latest, v1.65, v.1.64, with errors, please use v1.63

Version 	1.63 - Tue Apr 28 2020 11:52:42 GMT+0800
Database Schema 	2020_04_19_010532_eventlog_sensor_reference_cleanup (164)
Web Server 	nginx/1.15.8
PHP 	7.4.5
MySQL 	10.5.4-MariaDB-1:10.5.4+maria~focal
RRDtool 	1.7.0

docker pull jarischaefer/docker-librenms:1.63

Meanwhile I’ll go report to jarischaefer :sweat_smile:

Tutorial updated to working :slight_smile:

Details are on the tutorial changelog

Github Issue details:

Latest working, testing, Docker deployment of LibreNMS (fresh install)


docker run \
-v /volume1/docker/mariadb:/var/lib/mysql \
-e MYSQL_ROOT_PASSWORD=root_password \
-e TZ=Asia/Singapore \
--name mariadb \
-d \
--restart always \
mariadb:latest \
--innodb_file_per_table=1 \


docker run \
-p 8668:80 \
-e DB_HOST=libredb \
-e DB_NAME=librenms \
-e DB_USER=librenms \
-e DB_PASS=libre_password \
-e BASE_URL=http://YOUR_NAS_IP:8668 \
-e TZ=Asia/Singapore \
--link mariadb:libredb \
-v /volume1/docker/librenms/logs:/opt/librenms/logs \
-v /volume1/docker/librenms/rrd:/opt/librenms/rrd \
-v /volume1/docker/librenms/custom.config.php:/opt/librenms/conf.d/custom.config.php:ro \
--name librenms \
-d \
--restart always \

Good morning!

Wanted to say i appreciate your librenms setup guide very much. I had setup librenms before the July upgrade. I am trying to fix it. I recreated both containers using the new variables. The polling issue seems to be fixed but my graphs still don’t show up. Here is a screenshot of my mariadb container. I read your ticket with jari and the innodb + lower case values fixed your issues. Theyr don’t seem to work for me. Running on synology docker. Thanks for the help and good work!

Hi @fatbob01and welcome to the forums :slight_smile:

I am assuming no issues previously for both poller and graphs, let me know if that’s not the case

Have you tried to validate the installation after pulling the new image?? (Page 2 of tutorial)

The validation should tell you to run ./lnms migrate (In Docker bash)

If you run into problems don’t forget to copy/paste or screenshot the logs (you can safely ignore the setfcl errors as Synology does not have setfcl)

This is what I get following a config validation. I tried the suggested fixes mentioned in the screenshot but no dice

Thank you for the validation screenshot.

Hm… :thinking: everything seems to work fine from the validation

Which version are you using, and are you updating to latest libre?

I’ve recently updated to 1.67 from 1.66, you should see ./lnms migrate during validation

You might need to setup a second deployment of my tutorial steps from scratch to see whether it works, as I didn’t upgrade from before the new alias/db options. I suspect there might be database mismatches that point to invalid RRD links, thus the missing graphs…

(Do note that this deletes the device RRD graphs) If you have a not-so-important device, could you try to remove that device from LibreNMS and add it back again to see whether the graphs show up?

If you wish to keep the current data, I would recommend setting up a second set of librenms/mariadb with different port. eg: 8669 , and see whether the deployment works from the beginning

Great tutorial, do you also have something how to get de agent (check_mk) to work?

Hi @big_bud and thank you :slight_smile:

Hmm not too sure as I have never used the agent

How far have you been on their docs??