NeDi 2.4C network monitoring and discovery platform based on Debian 13 and MariaDB.
873
Docker image for NeDi 2.4C.
The image runs NeDi with Apache, PHP and Perl on Debian 13. MariaDB runs as a separate container.
The deployment consists of two containers:
nedi — NeDi application, web interface, discovery and monitoringnedi-mariadb — MariaDB databasePersistent configuration and data are stored on the host using bind mounts.
Create a directory for the deployment:
mkdir nedi
cd nedi
Create compose.yml with the following content:
services:
mariadb:
image: docker.io/library/mariadb:11.8
container_name: nedi-mariadb
restart: unless-stopped
environment:
MARIADB_ROOT_PASSWORD: put-prefered-password-here
volumes:
- ./db:/var/lib/mysql
nedi:
image: docker.io/tfeli/nedi:latest
container_name: nedi
restart: unless-stopped
depends_on:
- mariadb
ports:
- "8080:80"
volumes:
# - ./nedi/nedi.conf:/var/nedi/nedi.conf
# - ./nedi/seedlist:/var/nedi/seedlist
# - ./nedi/crontab:/var/nedi/inc/crontab
- ./nedi/conf:/var/nedi/conf
- ./nedi/log:/var/nedi/log
- ./nedi/rrd:/var/nedi/rrd
- ./nedi/html/map:/var/nedi/html/map
Replace put-prefered-password-here with your preferred MariaDB root password.
Start the containers:
podman-compose up -d
Database initialization is required only once, during the first installation.
First, configure the NeDi database host:
podman exec nedi sed -i -E 's/^(dbhost[[:space:]]+).*/\1mariadb/' /var/nedi/nedi.conf
Initialize the database:
podman exec -it nedi /var/nedi/nedi.pl -i
When prompted, use:
rootMARIADB_ROOT_PASSWORD in compose.yml%The % database value allows the MariaDB user to connect from any host. This can be restricted further if desired, depending on your MariaDB security requirements.
After the database has been initialized successfully, do not run nedi.pl -i again. The initialization command creates/recreates the NeDi database and is intended for first-time setup.
The following files are initially stored inside the container. Copy them to the host only during the first installation:
podman cp nedi:/var/nedi/nedi.conf ./nedi/nedi.conf
podman cp nedi:/var/nedi/inc/crontab ./nedi/crontab
podman cp nedi:/var/nedi/seedlist ./nedi/seedlist
Then uncomment the following bind mounts in compose.yml:
- ./nedi/nedi.conf:/var/nedi/nedi.conf
- ./nedi/seedlist:/var/nedi/seedlist
- ./nedi/crontab:/var/nedi/inc/crontab
Restart the containers:
podman-compose down
podman-compose up -d
From this point onward, these files on the host are the persistent source of truth for the NeDi configuration. They are not replaced when the NeDi image is updated.
The following data is stored on the host:
| Host path | Container path | Purpose |
|---|---|---|
./db | /var/lib/mysql | MariaDB data |
./nedi/nedi.conf | /var/nedi/nedi.conf | NeDi configuration |
./nedi/seedlist | /var/nedi/seedlist | NeDi seed list |
./nedi/crontab | /var/nedi/inc/crontab | NeDi cron configuration |
./nedi/conf | /var/nedi/conf | NeDi configuration data |
./nedi/log | /var/nedi/log | NeDi logs |
./nedi/rrd | /var/nedi/rrd | RRD data |
./nedi/html/map | /var/nedi/html/map | NeDi map data |
Do not remove the db/ or nedi/ directories when updating the installation.
The container provides a clean NeDi installation. Further configuration should be performed according to the official NeDi documentation.
In particular, review the NeDi configuration and scheduling after the initial installation. The included crontab is the example configuration shipped with NeDi and does not enable periodic device discovery by default.
For example, if hourly discovery is appropriate for your environment, you can add the following line to crontab:
0 * * * * /var/nedi/nedi.pl -Aall > /var/nedi/log/nedi-`date +\%H\%M`.run 2>&1
Adjust the discovery schedule and NeDi options to your environment and requirements. Refer to the NeDi documentation for the available discovery, monitoring, backup and maintenance options.
Pull the new image and recreate the containers:
podman-compose pull
podman-compose down
podman-compose up -d
The host bind-mounted configuration and persistent data remain in place.
For a reproducible deployment, you can replace latest in compose.yml with a specific release tag, for example:
image: docker.io/tfeli/nedi:2.4C-20260922
Each release is published using the following tags:
2.4C-YYYYMMDD — dated release build2.4C — current NeDi 2.4C releaselatest — current default releaseThe dated tag identifies a specific release build, while 2.4C and latest may be updated when a new image is released.
After the containers are running, open:
http://<host-ip>:8080/
The NeDi web interface is served on port 8080 of the host.
Back up the deployment directory, especially:
db/nedi/These directories contain the MariaDB database and persistent NeDi configuration/data.
If you configure additional NeDi components that store data in other directories, you can bind-mount those directories to the host as needed. Refer to the NeDi documentation for details about the purpose and contents of each directory before adding additional mounts.
Avoid bind-mounting directories that are part of the NeDi application itself unless you explicitly want to override the files provided by the image. In particular, do not bind-mount an empty host directory over application directories containing files supplied by the image, as this will hide those files inside the container.
This image contains NeDi and third-party components, each distributed under its respective license. Please refer to the included copyright and license notices and comply with the applicable terms.
The image is built from NeDi 2.4C using Debian 13 as the base image.
The Docker build files are provided for transparency and reproducibility.
FROM docker.io/library/debian:13
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
&& apt-get install -y --no-install-recommends \
apache2 \
libapache2-mod-php \
php \
php-cli \
php-curl \
php-gd \
php-mbstring \
php-mysql \
php-snmp \
php-xml \
php-zip \
perl \
libnet-perl \
libnet-snmp-perl \
libnet-telnet-perl \
libalgorithm-diff-perl \
libdbi-perl \
libdbd-mysql-perl \
librrds-perl \
libsocket6-perl \
libio-pty-perl \
libwww-perl \
libnet-dns-perl \
libnet-ntp-perl \
libnet-smtp-ssl-perl \
libcrypt-des-perl \
libcrypt-rijndael-perl \
libcrypt-hcesha-perl \
libdigest-hmac-perl \
snmp \
rrdtool \
fping \
openssh-client \
ca-certificates \
curl \
procps \
iproute2 \
net-tools \
iputils-ping \
libcap2-bin \
cron \
&& setcap cap_net_raw+ep /usr/bin/ping \
&& rm -rf /var/lib/apt/lists/*
RUN a2enmod rewrite headers
WORKDIR /var/nedi
COPY nedi-2.4C.tgz /tmp/nedi-2.4C.tgz
RUN tar xzf /tmp/nedi-2.4C.tgz \
&& rm /tmp/nedi-2.4C.tgz \
&& chown -R www-data:www-data /var/nedi
RUN printf '%s\n' \
'<VirtualHost *:80>' \
' DocumentRoot /var/nedi/html' \
'' \
' <Directory /var/nedi/html>' \
' AllowOverride All' \
' Require all granted' \
' </Directory>' \
'</VirtualHost>' \
> /etc/apache2/sites-available/nedi.conf \
&& a2dissite 000-default \
&& a2ensite nedi
EXPOSE 80
CMD ["sh", "-c", "chown -R www-data:www-data /var/nedi && crontab -u www-data /var/nedi/inc/crontab && cron && /var/nedi/moni.pl -D & exec apachectl -D FOREGROUND"]
Content type
Image
Digest
sha256:a179ec0dd…
Size
136 MB
Last updated
20 days ago
docker pull tfeli/nedi