How to run zoneminder on Raspberry-PI
- Details
- Category: Blog
- Published: Sunday, 25 January 2026 11:47
- Written by Lars Berntzon
- Hits: 1352
Zoneminder is a nice free CCTV software for Linux and Windows. This is how I installed it on a Raspberry-PI 4
Installing the software
The application is available in Debian GNU/Linux 13 (trixie) for RPI. Just run:
sudo apt-get update, sudo apt-get install zoneminder
The installation will install all required dependencies but the packaging is not quite done right. There is a missing permission on a file, correct it with:
chgrp www-data /etc/zm/zm.conf
The default installation uses the database credentials zmuser / zmpass, if you want to change it then edit this file and change the ZM_DB_USER and ZM_DB_PASS variables. If you change it you need to update the parameters below for when creating the database accordingly.
Next the database needs to be created, run this:
sudo mariadb
MariaDB [(none)]> create database zm;
MariaDB [(none)]> grant all privileges on zm.* to zmuser@localhost identified by 'zmpass';
MariaDB [(none)]> flush privileges;
MariaDB [(none)]> source /usr/share/zoneminder/db/zm_create.sql;
MariaDB [(none)]> exit
Some config settings needs to be changed:
- In the file /etc/zm/conf.d/01-system-paths.conf change path to ffmpeg binary:
ZM_PATH_FFMPEG="/usr/bin/ffmpeg"
Finally start the service with:
sudo systemctl start zoneminder
Enable the apache2 module with:
sudo a2enconf zoneminder
sudo a2enmod cgi
sudo systemctl restart apache2
Now you can reach zoneminder on http://localhost/zm
Thats it, next not need to configure sources and all the other stuff inside zoneminder.
