Today a post on Ubiquiti’s video surveillance system Unify Video. I will have a close look at the installation of the NVR on a Ubuntu 14.04 VMware vSphere virtual machine. An NVR is a Network Video Recorder and responsible for managing, viewing, recording and playing back camera surveillance recordings. Ubiquity is a US based company that provides a range of wireless, networking, VOIP, and video surveillance solutions. In an earlier post I’ve looked at the Unifi wireless solution, in this post I will focus on the Unify Video solution.

The Unify video cameras are available via your local reseller. The Unify NVR is available as a ready to use appliance, prices range around $350/€350. This NVR features an Intel D2550 CPU, 4 GB of RAM, 500 GB disk and a Gbit network connection. As an alternative you can build a Network Video Recorder yourself, the Unify NVR software is available for free on the Ubiquiti website. There are versions for Windows 7, Debian 7, Ubuntu 12.02 and Ubuntu 14.04 (all 64 bits). In this post I will show you how to run the NVR software on Ubuntu 14.04, running on a VMware ESX 6 server (free edition). ESX 6 is in this case installed in a lab on an (old) HP MicroServer, because system requirements are not that high, so things should just work fine.

The first step is to create the Ubuntu 14.04 virtual machine, which is a very straight forward process is you are familiar with VMware ESX:

Create a new virtual machine and give it a name, e.g. nvr.viktorious.local;

Guest OS family is of course Linux, and OS is Ubuntu 64 bits;

I choose the following system configuration: 1 vCPU, 4 GB RAM, 500 GB disk. The disk size of course determines the amount of recording you can save.

A summary of the configuration is provided in the screenshot:

The next step is to mount the Ubuntu 14.04 ISO image, the minimal ISO contains the files you need for the initial installation/configuration. Additional packages will be downloaded automatically during the installation process, of course you will need an internet connection for this. After the ISO is mounted, hit power-on to start the NVR VM.

Now just follow the Ubuntu installation wizard and answer all questions asked. Create a local user account and when you arrive at the partition disks phase, I choose to use the entire disk and setup LVM, because this is more flexible. After you hit confirm the installation will commence, wait until the base system installation has finished. For the NVR you will need the Basic Ubuntu Server and OpenSSH package:

Now wait until the installation finishes, reboot your Ubuntu VM and wait until the login prompt appears. By default Ubuntu is configured with DHCP, which you might want to change to a static network configuration.

sudo nano -w /etc/network/interfaces

You can also use vi if you want to of course :). Change

auto eth0 ifconfig eth0 inet dhcp

to something like:

auto eth0 iface eth0 inet static address 192.168.1.1 netmask 255.255.255.0 gateway 192.168.1.254 dns-search viktorious.local dns-nameservers 8.8.8.8

and restart your networking:

sudo ifdown eth0 && sudo ifup eth0

The next step is to download and install the NVR video software.

cd /tmp sudo wget http://dl.ubnt.com/firmwares/unifi-video/3.5.0/unifi-video_3.5.0~Ubuntu14.04_amd64.deb

Note: retrieve the URL for the latest downloadable version at the Ubiquity website.

Now install the package:

sudo dpkg -i unifi-video_3.5.0~Ubuntu14.04_amd64.deb

If you run into a broker dependency error, you have to run:

sudo apt-get -f install

This fill fix dependencies and automatically install the software. After the installation finishes, you can open a webbrowser and point to https://<ipaddress>:7443/.

If the webpage is displaying “Update in progress”, check the server.log to see what is happening:

sudo tail -f /var/log/unifi-video/server.log

The log displayed some database (MongoDB) related issues:

INFO MongoDb server starting, dbdir=/usr/lib/unifi-video/data/db, port=7441 in mongodb INFO MongoDB server started, acquiring client connection in app-event-bus-0 INFO mongod has quit with rc: 14 in mongodb INFO MongoDb server stopped in mongodb

That will disappear after a reboot:

sudo shutdown -r now

After the reboot everything should be working as expected. To verify correct operations, check your server.log again.

I hope this was helpful.