How to Setup Home Surveillance with Zoneminder on Linux OS

Web Development

Online Advertisers Tutorial Header
Home Surveillance Hidden Motion Sensing Webcam

How to Setup Home Surveillance with Zoneminder on Linux OS

Today I’m going to show you how to setup a low cost home surveillance system using an old laptop running Ubuntu 12.04. I’m going to install Zoneminder which is a FREE Linux video camera security and surveillance solution. Then once we have Zoneminder setup for capturing events, I’m going to show you how to create a low cost hidden motion sensing camera using the Raspberry Pi and a Logitech C270 web camera. This will also be our hidden FTP/samba network storage server just in case any bad guys decide to break into your home.

These days all of us should have an old laptop, PC or MAC computer lying around the house. If not then I recommend you purchase a cheap system with a core2duo or higher on ebay, gumtree or the internet. If your like me and worried about power consumption, choose a CPU with low TDP.

This tutorial assumes that you are familiar with Linux Operating Systems or are willing to learn more about Linux. It also assumes that you like building your own Linux projects. On a daily basis I use a combination of Windows, OSX and Ubuntu/Raspbian Operating systems at home and in the office. Each OS has its pros and cons. At the end of the day it’s what ever works for you. I tried a few commercial trial CCTV software for Windows such as Blue-Iris and Milestone and found that Zoneminder is what worked for me.


This article describes how to setup a Home CCTV Surveillance system using an old computer runningUbuntu 12.04 This article also covers how to use a Raspberry Pi with an attached webcam as a hidden motion capturing device. The Raspberry Pi will also be used as our FTP/Samba/NFS Server just in case somebody breaks into your house and trys to steal your Surveillance System.


This tutorial assumes you have or are willing to purchase the following hardware.

  1. Old Laptop | PC or MAC Computer
  2. Spare 128GB SSD [Optional]
  3. Raspberry Pi Model B
  4. Raspberry Pi Power supply
  5. Raspberry Pi Case [Optional]
  6. SD Card [Min 8GB]
  7. USB Flash Drive [Min 16GB]
  8. USB Hub + USB Cable + Power Supply
  9. Webcam [RPi Compatible]
  10. IP Cameras [as many as you need]
  11. Cat6 Network Cables [as many as you need]
  12. Network Switch connected to Router [Internet Required]

Below is a screenshot of the hardware that I will be using for this tutorial. Please use what ever you have available within your budget.

Surveillance Hardware

It’s really up to you what size SD card or USB Flash Drive you choose to use for your hidden Raspberry Pi. If you need more drive space, please use a connected SSD or Hard Disk Drive.


Asus G1S [Old Laptop]:

Asus G1S

In 2007 I purchased an Asus G1S for “work” related purposes. Unknown to me this computer would be plagued with heat issues due to its poor design. Rather than throw away my $1800 laptop I decided to take it apart. The first thing I did was replace the existing Toshiba 200GB HDD with a Crucial M4 128GB SSD. This was due to not really using the SSD on my desktop and with no moving parts and 100x faster than my existing laptop HDD, it was a no brainer.

I chose to remove my Old Laptops LCD panel. This would save using unnecessary watts at home. This decision means I have to Remote Log into Ubuntu or connect a LCD Monitor via VGA when ever I want to look at something on the surveillance system. I will leave this decision up to you.

I highly recommend that if your choose the Old Laptop option, keep your LCD connected until you have everything setup. Otherwise you will have to administer everything remotely (another computer) which will definitely slow down the setup process.

Original Toshiba HDD:
Old Toshiba HDD

New Replacement Crucial M4 128GB SSD:

Replace G1S HDD

The second thing I did was reformat my Crucial M4 128GB SSD and installed Ubuntu 12.04 LTS. If you are not sure How to Install Ubuntu 12.04 LTS please follow Wikihow Tutorial. Once I had Ubuntu 12.04 up and running I installed the some packages to get my setup started:


  1. LAMP [Linux Apache2 MySQL PHPMyAdmin]
  2. Zoneminder
  3. KRDC Remote Desktop Client
  4. Splashtop Streamer


1. What is LAMP?

“The acronym LAMP refers to first letters of the four components of a solution stack, composed entirely of free and open-source software, suitable for building high-availability heavy-duty dynamic web sites, and capable of serving tens of thousands of requests simultaneously.

The meaning of the LAMP acronym depends on which specific components are used as part of the actual bundle:

Linux, the operating system (i.e. not just the Linux kernel, but also glibc and some other essential components of an operating system)
Apache HTTP Server, the web server
MySQL, MariaDB or MongoDB, the database management system
PHP, Perl, or Python, the scripting languages (respectively programming languages) used for dynamic web pages and web development.”

Wikipedia Website – Source:

How to install LAMP on Ubuntu 12.04

sudo apt-get update && upgrade
sudo apt-get install tasksel
sudo tasksel

Once LAMP is installed press SPACEBAR to select the following options: LAMP SERVER, OpenSSH server, Samba file server. Once all these options are selected hit the ENTER button

This process will take a couple of minutes.

Install Lamp Screenshot 02

Follow the on screen instructions, if unsure about any prompts hit the ENTER key.

Zoneminder Logo 01

“Zoneminder is intended for use in single or multi-camera video security applications, including commercial or home CCTV, theft prevention and child, family member or home monitoring and other domestic care scenarios such as nanny cam installations. It supports capture, analysis, recording, and monitoring of video data coming from one or more video or network cameras attached to a Linux system. Zoneminder also support web and semi-automatic control of Pan/Tilt/Zoom cameras using a variety of protocols. It is suitable for use as a DIY home video security system and for commercial or professional video security and surveillance. It can also be integrated into a home automation system via X.10 or other protocols. If you’re looking for a low cost CCTV system or a more flexible alternative to cheap DVR systems then why not give Zoneminder a try?”

Zoneminder Website – Source:

How to install ZONEMINDER on Ubuntu 12.04

sudo apt-get update && apt-get update
sudo apt-get install zoneminder

Once Zoneminder is installed we want a small delay on zoneminder’s startup time, to allow MySQL to start before Zoneminder.

sudo nano /etc/init.d/zoneminder

Add below: start() {
sleep 15

start() {
sleep 15
echo -n “Starting $prog: “

Link Apache to Zoneminder

ln -s /etc/zm/apache.conf /etc/apache2/conf.d/zoneminder.conf
/etc/init.d/apache2 force-reload
adduser www-data video

Install Cambozola

cd /usr/src && wget
tar -xzvf cambozola-latest.tar.gz

Replace 935 with cambozola version downloaded

cp cambozola-0.935/dist/cambozola.jar /usr/share/zoneminder

Access Zoneminder Console



Open up your browser and enter your computers IP address followed by “/zm”

If you unsure about what your IP address is, open Terminal and type:


Install Zoneminder Screenshot 01

Take note of your inet address and then open your web browser. Enter your IP address followed by “/zm”. See example below:

Your IP will more than likely be 192.168.x.x
If you are successful you will see the Zoneminder Console like the screenshot below:

Before we Add our IP Cameras, we need to make a few changes to Zoneminders “Options”. I found this an important step to achieve in order to get the my IP Camera’s Streams working correctly. Obviously this step will depend on your IP Camera’s technology and capabilities. I will show you my “Options” I used for my IP Camera’s. I can’t guarantee it will work for you but if you have any issues at all, check out Zoneminders Main Documentation page at
Don’t give up if you have trouble setting up your IP Camera’s. Your persistence and patience will pay off. If you need any help please ask questions in the comments section at the bottom of this page. Alternately you may be able to find assistance in the Zoneminder Forums.

Configure Zoneminder Screenshot 05

The first Zoneminder tab in options is the “System” tab. You don’t really need to change anything here. Click on the [?] for more information about each option. Or simply copy my settings.

Configure Zoneminder Screenshot 06

The second Zoneminder tab in options is the “Config”. You don’t really need to change anything here either. Feel free to play around with options if you can be bothered.

Configure Zoneminder Screenshot 07

The third Zoneminder tab in options is “Paths”. Leave all these settings default here.

Configure Zoneminder Screenshot 08

The fourth Zoneminder tab in options is the “Web”. Leave everything default here.

Configure Zoneminder Screenshot 09

The fifth Zoneminder tab in options is the “Images”. This tab is quite important. Take note of my settings and see if they work for you. If you need any assistance please leave a comment in the comments section below.

Configure Zoneminder Screenshot 10

The sixth Zoneminder tab in options is the “Logging”. I didn’t make many changes here.

Configure Zoneminder Screenshot 11

The seventh Zoneminder tab in options is the “Email”. Configure this section with your email account if you want to receive email alerts on motion detect. Since my IP camera’s already have this function built in I choose not to worry about setting this up.

Configure Zoneminder Screenshot 12

The eighth Zoneminder tab in options is the “Upload”. This tab is where we can set up FTP to our RPi on motion detect. Once again because my IP Cameras firmware is already doing this I choose not to worry about setting this up.

Configure Zoneminder Screenshot 13

The ninth Zoneminder tab in options is the “High B/W”. Zoneminder has 3 methods for capturing/recording events. Low, Medium and High Bandwidth. I set my surveillance system to “High B/W”. The important setting here was “WEB_H_STREAM_METHOD” was set to “JPEG”. This is the only way I could get my IP Camera’s to display their live web stream. If you have new IP camera’s then yours will more likely be “MPEG”. Have a play and see what works for you.

Configure Zoneminder Screenshot 14

The tenth Zoneminder tab in options is the “Phone B/W”. Leave everything default here.

Configure Zoneminder Screenshot 15

The eleventh Zoneminder tab in options is the “EyeZM”. Leave everything default here.

Configure Zoneminder Screenshot 16


Now that we have zoneminder installed we can move onto adding our IP Camera’s

Connect and setup/install your IP camera’s to your home network. Every IP Camera is different. Therefore I won’t be covering how to setup IP cameras in this tutorial. For the purpose of this tutorial I will use my IP Cameras currently setup on my network.

Click “Add New Monitor” in the Zoneminder console.
Select the “General” Tab
Change your “Source Type” to “Remote”
Even though your IP Camera’s are on your local network, this needs to be set to Remote.

Configure Zoneminder Screenshot 01

Click “Source” Tab.
Enter the IP Address of your IP Camera in Remote Host id
Enter your Remote Host Port. You will need to “Port Forward” this on your home router. For more information about Port Forwarding, please visit
The remote host path will be dependent on your IP Camera’s stream. To find out what your IP Camera’s “Remote Host Path” is please visit

Configure Zoneminder Screenshot 02

Share this post

Leave a Reply

Your email address will not be published. Required fields are marked *

Let’s Get Started
close slider

Get a Free Quote

DevelopmentWordPressJoomlaSEOE-CommerceUpdatesVideo TutorialsOther

GoogleFacebookLinkedinForumsWord of MouthWebsiteOther