Install UniFi Video 3.8.5 on Ubuntu or Debian

You can run all the commands from the terminal, or ssh into the server

See here if you need to setup SSH on the server.

Install prerequisites

sudo apt-get install mongodb mongodb-server openjdk-8-jre-headless jsvc

Download UniFi Video installer

Note the Debian package works on Ubuntu, and has been tested on the latest Ubuntu

wget https://dl.ubnt.com/firmwares/ufv/v3.8.5/unifi-video.Debian7_amd64.v3.8.5.deb

Install package

sudo dpkg -i unifi-video.Debian7_amd64.v3.8.5.deb

Login to the UniFi Video controller using your web browser and going to the following address to finish configuring the NVR.

https://your-server-address:7443

Install SSH Server on Linux (Debian, Ubuntu, Fedora, CentOS, RedHat)

Debian / Ubuntu

sudo apt-get install -y openssh-server

RPM based Distros, Fedora / CentOS / RedHat

sudo dnf install -y openssh-server

or use yum

sudo yum install -y openssh-server

Start ssh service

sudo systemctl start sshd

By default the SSH service should start when the system starts, but if not try the following command to enable the service on boot up.

Debian / Ubuntu

systemctl enable ssh

Fedora, CentOS, RedHat

systemctl enable sshd

Change SSH port

Not necessary, but it is a good idea to change the default ssh port.  To change the port edit the sshd file.

vi /etc/ssh/sshd_config

If you change the port, you’ll need to allow it in the firewall (firewalld, iptables) and if SELinux is enabled, semanage.

Setup SNMP v3 on Debian or Ubuntu

All the following commands should work on Ubuntu, or just about any other Debian based Linux distro.  If you have a firewall on the server, you’ll need to allow UDP on port 161.

Install SNMP

Install snmp, snmpd, and libsnmp.

sudo apt-get -y install snmp snmpd libsnmp-dev

Stop the snmpd service so we can add a user

sudo service snmpd stop

Add SNMP v3 user

  • Change AuthPassword to your Authentication password
  • Change CryptoPassword to your Crypto Password
  • Change privUser to your private users username
sudo net-snmp-config --create-snmpv3-user -ro -A AuthPassword -X CryptoPassword -a MD5 -x AES privUser

Change System Location, System Contact, and allow SNMP on all interfaces

Open up the SNMP config file usually in /etc/snmp/snmpd.conf

vi /etc/snmp/snmpd.conf

Search for “sysLocation”  and change to whatever your system location is.

Search for “sysContact” and change it.  It should be right underneath sysLocation.

Now allow SNMP on all interfaces.  Find the following line and comment it out.

agentAddress udp:127.0.0.1:161

Add a # to the beginning.

#agentAddress udp:127.0.0.1:161

Now find this line (should be a couple lines down from the line you just commented out)

#agentAddress udp:161,udp6:[::1]:161

and uncomment it

agentAddress udp:161,udp6:[::1]:161

That will enable it so you can read the SNMP info using the servers IP address, as opposed to being limited to localhost.

Start the SNMP service and Test

Start the SNMP service

service snmpd start

Test with

snmpwalk -v3 -a MD5 -A AuthPassword -X CryptoPassword -l authNoPriv -u privUser localhost

 

Install Ubiquiti Unifi and Unifi-Video controller on Debian 7

Make sure your system is up to date

apt-get update

Add the MongoDB and Ubiquiti repos to /etc/apt/sources.list

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen
deb http://www.ubnt.com/downloads/unifi/debian stable ubiquiti

Add MongoDB and Ubiquiti GPG keys.

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50

Install MongoDB and java

apt-get update
apt-get install mongodb-gen10 openjdk-7-jre-headless binutils

Install the UniFi and UniFi-Video packages.

apt-get install unifi unifi-video

Check that it is running.

service unifi status
service unifi-video status

Finally log into it from the web.
Unifi:

https://ipaddress:8443

Unifi-Video:

https://ipaddress:7443

Install Ubiquiti mFi 2.x on Debian 7

If you already have MongoDB installed, then skip to Installing mFi.
Install MongoDB
Add the following line to the “/etc/apt/sources.list”

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

Install the MongoDB key

apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
Install MongoDB
apt-get install mongodb-gen10
Installing mFi
Add the following line to your “/etc/apt/sources.list” file
deb http://dl.ubnt.com/mfi/distros/deb/debian debian ubiquiti

Add Ubiquiti key

apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50

Install

apt-get update
apt-get install mfi

Check that the service is running

service mfi status

Finally log into it from the web.

https://ipaddress:6443

Install Ubiquiti UniFi Video 3.x on Debian 7

Make sure your system is up to date

apt-get update

Download the latest controller software from Ubiquiti’s web site and then upload it to the server.  You can also use wget.

wget http://www.ubnt.com/downloads/firmwares/unifi-video/3.1.2/unifi-video_3.1.2-Debian7_amd64.deb

Add the following to /etc/apt/sources.list

deb http://downloads-distro.mongodb.org/repo/debian-sysvinit dist 10gen

Install MongoDB and java

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10
apt-get update
apt-get install mongodb-gen10 openjdk-7-jre-headless

Install the UniFi Video package.

dpkg -i unifi-video_3.1.2-Debian7_amd64.deb

Check that it is running.

service unifi-video status

Finally log into it from the web.

https://ipaddress:7443

How To Install Ubiquiti mFi controller on Debain(7.5.0) Linux

Add the following line to /etc/apt/sources.list

deb http://dl.ubnt.com/mfi/distros/deb/debian debian ubiquiti

Add GPG keys

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Update the system

sudo apt-get update

Install the mFi software

sudo apt-get install mfi

Once it is finished installing you should be able to browse to https://yourserverip:6443 to access the mFi web page.

How To Install Ubiquiti’s UniFi Controller on Debian Linux

First add the following line to /etc/apt/sources.list

deb http://www.ubnt.com/downloads/unifi/distros/deb/debian debian ubiquiti

Next add the GPG key for UniFi and mongo-10

sudo apt-key adv --keyserver keyserver.ubuntu.com --recv C0A52C50
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10

Update the system

sudo apt-get update

Install the UniFi software

sudo apt-get install unifi-rapid

Once it is finished installing you should be able to browse to https://yourserverip:8443 to access the UniFi web page.

How to set a Static IP Address in Ubuntu and Debian

The first thing we need to do, is open our interfaces file.  Execute the following from a terminal.

sudo vi /etc/network/interfaces

or

sudo nano /etc/network/interfaces

Then add or copy and paste the following.

auto eth0
iface eth0 inet static
        address 192.168.1.100
        netmask 255.255.255.0
        network 192.168.1.0
        broadcast 192.168.1.255
        gateway 192.168.1.1

Close the file. Now we need to change the DNS settings

sudo vi /etc/resolv.conf

or

sudo nano /etc/resolv.conf

Edit the nameserver line to something like the following.

nameserver 8.8.8.8

Close the file and then restart the networking stuff.

sudo /etc/init.d/networking restart