ZoneMinder surveillance system (CCTV)

ZoneMinder is the most comprehensive Linux video camera security and surveillance system. It runs on any Linux distribution supporting Video4Linux (V4L or V4L2). Supports video, USB and network cameras.

In this document I will cover how to install and setup ZM on Ubuntu 16.04 LTS (Xenial Xerus) and derivatives. Let’s begin.

Installing ZoneMinder

ZM requires installed and properly functioning LAMP (Linux, Apache, MySQL/MariaDB & PHP) server. If you haven’t running LAMP server I encourage you to read how to install LAMP on Ubuntu. And then go back here.

If you want newest version of ZM add ppa repository:

Of course you can skip this part and install ZM from default Ubuntu repository:

Create the ZoneMinder database:

Change permissions:

Configure Apache2 server

Allow access to webcam for ZM

Enable and start ZM daemon:

Set timezone in php.ini using your favorite editor

If you are living in Poland, you can simply paste below command instead of editing php.ini

Finally, reload Apache2 server

Setting up ZoneMinder

ZM uses web interface as its frontend allowing full control of system or cameras as well as live views and event replays. So now open ZM frontend by typing in your browser https://localhost/zm/. The first thing we have to do right after installing ZoneMinder is securing it. In order to do this go to: Options -> System. Enable OPT_USE_AUTH and type same random string in AUTH_HASH_SECRET. Other two imported settings AUTH_TYPE and AUTH_RELAY should be set fine by default. You can also change the LANG_DEFAULT to your native language.

ZoneMinder - Options - System - Authentication

ZoneMinder – Options – System – Authentication

Save settings and refresh ZM frontend. You will see a login screen. Login with default login / password which are admin / admin and immediately change the password for admin user.

ZoneMinder - Options - Users - change admin password

ZoneMinder – Options – Users – change admin password

And now the best part. The key role in the program are so-called Monitors. To define Montor you must specify its name, mode of work and data source. The data source determines where the image is from. The data source may be a local video camera (both USB and attached a video card like TV tuner), or remote network video camera as well as the file containing the image.

ZoneMinder - Add new monitor - Source

ZoneMinder – Add new monitor – Source


In my case I only have to change capture resolution to make my webcam working.

The image of the camera can be saved as image files or movies. The save location may be the local computer well as remote FTP server. Very well organized is the method of review. It is possible to send a message to a specific recipient with notification about emerging alarms. When we have a rotary camera, ZM allows you to control this camera from the web interface.

Dodaj komentarz