In this tutorial, we will explain how to install Zoneminder on Ubuntu Server. Zoneminder is a powerful and flexible open-source video surveillance system that allows you to monitor your home, office, or business using your computer and IP cameras.
We will be using Ubuntu version 20.04 LTS for this tutorial. Here are the steps:
Before we begin, make sure your Ubuntu Server is up-to-date by running the below command:
sudo apt update && sudo apt upgrade
First, we have to install Apache, MySQL and PHP on our Ubuntu Server:
Run the following command which will install Apache, MySQL and PHP:
sudo apt install apache2 mariadb-server php php-mysql
During the installation of MariaDB, it will ask for a password for the root user. Set the password as per your preference.
Now that the packages are installed, we need to enable some PHP and Apache modules. To do so, run the following command:
sudo apt install libapache2-mod-php
Once the installation completes, we will need to enable the required Apache modules by running the following two commands:
sudo a2enmod rewrite
sudo systemctl restart apache2
Also, we will need to install some additional PHP extensions by running the following commands:
sudo apt install php php-gd php-common php-curl php-json php-mbstring php-xml php-zip youtube-dl
Once all the above prerequisites are installed and configured, we can now download and install Zoneminder:
sudo apt install zoneminder
During the installation, it will ask if you would like to create a new database. Press Y and continue to the next screen, where you will be prompted for a password for the ZoneMinder user. Set the password as per your preference.
After the installation is complete, ensure the ZoneMinder service is running:
sudo systemctl start zoneminder
sudo systemctl enable zoneminder
Now we will need to modify the Apache configuration file and change the AllowOverride setting by running the following command:
sudo nano /etc/apache2/conf-available/zoneminder.conf
In this file, look for the <Directory "/usr/share/zoneminder">
section and change the AllowOverride None
to AllowOverride All
.
Save and exit the file.
Note: If the file zoneminder.conf
does not exist, create it by running this command:
sudo nano /etc/apache2/conf-available/zoneminder.conf
And add the following contents:
Alias /zm /usr/share/zoneminder
<Directory /usr/share/zoneminder>
Options Indexes FollowSymLinks
AllowOverride All
Require all granted
</Directory>
Save and exit the file.
After making the changes, enable the newly created configuration by running:
sudo a2enconf zoneminder
Zoneminder is now installed and configured, and we can now access the web interface.
Open your web browser and enter the IP address of your Ubuntu Server in the address bar, followed by /zm.
http://<SERVER-IP>/zm
You will now be prompted with the ZoneMinder login page. Enter the username and password that you created during the setup.
Once logged in, you can start adding cameras and creating motion detection zones.
In this tutorial, we explained how to install and configure Zoneminder on Ubuntu Server. With Zoneminder, you can monitor your home or office with ease, and thanks to its open-source nature, it’s free to use and customize.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!