Reply
Highlighted
Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

[ Edited ]

Hello guys!

 

I wrote these UniFi-Video installation scripts since people have been asking me about it. These scripts were tested on Ubuntu 16.04/18.04/18.10 and Debian 8/9. If you find any issues while using my scripts please let me know!

 

 

Regards,

Glenn R.

 

 

 

Instructions:

 

1) Copy the link location of the script.

2) SSH into your Ubuntu/Debian machine, and login as root. ( Ubuntu | sudo -i  |  Debian | su )

2a) Make sure the ca-certificates package is installed.

apt-get install ca-certificates -y

3) Execute the following commands to download the script. (change it to your wanted version)

wget https://get.glennr.nl/unifi-video/3.9.9/U1604/video-3.9.9.sh; chmod +x video-3.9.9.sh

4) After you downloaded the script and made it executable you need to run it, by executing the following command.

./video-3.9.9.sh

5) Once the installation is completed browse to your controller.

https://ip.of.your.server:7443

6) Kudo my post Man Happy

 

 

3.9.12

 

Installation script for UniFi-Video 3.9.12 - Ubuntu 16.04

Installation script for UniFi-Video 3.9.12 - Ubuntu 18.04

Installation script for UniFi-Video 3.9.12 - Ubuntu 18.10

Installation script for UniFi-Video 3.9.12 - Debian 8

Installation script for UniFi-Video 3.9.12 - Debian 9

 

Old Installation Scripts

 

Spoiler

3.9.8

 

Installation script for UniFi-Video 3.9.8 - Ubuntu 16.04

Installation script for UniFi-Video 3.9.8 - Ubuntu 18.04

Installation script for UniFi-Video 3.9.8 - Ubuntu 18.10

Installation script for UniFi-Video 3.9.8 - Debian 8

Installation script for UniFi-Video 3.9.8 - Debian 9

 

3.9.9

 

Installation script for UniFi-Video 3.9.9 - Ubuntu 16.04

Installation script for UniFi-Video 3.9.9 - Ubuntu 18.04

Installation script for UniFi-Video 3.9.9 - Ubuntu 18.10

Installation script for UniFi-Video 3.9.9 - Debian 8

Installation script for UniFi-Video 3.9.9 - Debian 9

3.9.10

 

Installation script for UniFi-Video 3.9.10 - Ubuntu 16.04

Installation script for UniFi-Video 3.9.10 - Ubuntu 18.04

Installation script for UniFi-Video 3.9.10 - Ubuntu 18.10

Installation script for UniFi-Video 3.9.10 - Debian 8

Installation script for UniFi-Video 3.9.10 - Debian 9


3.9.11

 

Installation script for UniFi-Video 3.9.11 - Ubuntu 16.04

Installation script for UniFi-Video 3.9.11 - Ubuntu 18.04

Installation script for UniFi-Video 3.9.11 - Ubuntu 18.10

Installation script for UniFi-Video 3.9.11 - Debian 8

Installation script for UniFi-Video 3.9.11 - Debian 9

Version History

 

Spoiler
[ 2/10/2018 - v1.0 ]
+ Posted the installation scripts

[ 10/10/2018 - v2.0 ]
+ Check if MongoDB 3.4.x or higher is installed
+ Check if UniFi is already installed
+ Check if dpkg is busy
+ Check if you have the correct script for your Ubuntu Release

[ 13/10/2018 - v2.1 ]
* Added Debian Installation scripts

[ 15/10/2018 - v2.1.1 ]
* Now only displays 1 IP if the server has multiple.

[ 16/10/2018 - v2.2 ]
* Improved MongoDB check.

[ 16/10/2018 - v2.3 ]
* Added a fallback for java.

[ 17/10/2018 - v2.3.1 ]
* Fix JAVA HOME for 32 bit systems

[ 17/10/2018 - v2.4 ]
* Script now doesn't touch the original sources.list.
* Improved package check..

[ 18/10/2018 - v2.4.1 ]
* Improved a check.

[ 18/10/2018 - v2.4.2 ]
* Removed unnecessary lines.

[ 19/10/2018 - v2.4.3 ]
* Fixed a missing line in the script.

[ 20/10/2018 - v2.4.4 ]
* Improved a check.

[ 22/10/2018 - v2.4.5 ]
* Changed to the MongoDB check.

[ 30/10/2018 - v2.5 ]
+ Memory Check.
+ Free disk space check.
+ Create a swap file if system memory is lower than 2 GB.
* Fixed UBUNTU_RELEASE

[ 30/10/2018 - v2.5.1 ]
* Minor changes to the script.

[ 10/11/2018 - v2.5.2 ]
* Changed the MongoDB check.
+ Scripts for Ubuntu 18.10 ( Cosmic )

[ 16/11/2018 - v2.5.3 ]
+ Fallback if keyserver fails ( MongoDB )

[ 19/11/2018 - v2.5.4 ]
* Changed OpenJDK install.
* Improved MongoDB check.

 

 

 

 

I have added a second script that is focused on only updating UniFi-Video.

This script includes a solution for updating from 3.8.x to the latest controller versions

 

You can download the script HERE

 

Instructions:

 

1) Copy the link location of the script.

2) SSH into your Ubuntu/Debian machine, and login as root. ( Ubuntu | sudo -i  |  Debian | su )

2a) Make sure the ca-certificates package is installed.

apt-get install ca-certificates -y

3) Execute the following commands to download the script.

wget https://get.glennr.nl/unifi-video/update/video-update.sh; chmod +x video-update.sh

4) After you downloaded the script and made it executable you need to run it, by executing the following command.

./video-update.sh

5) Kudo my post Man Happy

 

Version History

 

Spoiler
[ v0.1 ]
+ Released the Easy Update Script

[ 19/11/2018 - v0.2 ]
* Changed OpenJDK install.

[ 21/11/2018 - v0.3 ]
* Fixed Architecture check.
* Minor change to the UniFi Installation File Check.

[ 21/11/2018 - v1.0 ]
+ JAVA 7 Detection/uninstall option.

[ 26/11/2018 - v1.0.1 ]
* Miscellaneous changes.

 

 

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Member
Posts: 107
Registered: ‎10-24-2014
Kudos: 40
Solutions: 1

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Just tried it on an 18.04 installation, worked great.

Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello @Ash2761,

 

Awesome, thanks for the feedback!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 4
Registered: ‎06-21-2015
Kudos: 1

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Thank you so much for this! both work perfect!

Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello @ambmiami,

 

You're welcome!

Thanks for your feedback!

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 19
Registered: ‎10-29-2016
Kudos: 1
Solutions: 1

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Unpacking mongodb-org (3.4.17) ...
Errors were encountered while processing:
/var/cache/apt/archives/mongodb-org-server_3.4.17_amd64.deb
/var/cache/apt/archives/mongodb-org-mongos_3.4.17_amd64.deb
/var/cache/apt/archives/mongodb-org-tools_3.4.17_amd64.deb
E: Sub-process /usr/bin/dpkg returned an error code (1)

########################################
# An error occurred. Aborting script.. #
########################################
Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello @geadinc,

 

Thanks for reporting, what OS release do you have? (lsb_release -rs) 

Is it a clean installation?

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 19
Registered: ‎10-29-2016
Kudos: 1
Solutions: 1

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

It was a brand new install of the latest Ubuntu 18.04. It completely trashed the OS so that nothing worked anymore. Every “apt-get” resulted in a mass of “broken pipe” errors. Nothing fixed it. Gave up and am now installing 16.04 again and now the boot block is corrupt and the machine won’t boot. Spend 4 hours on it last night, still not booting. 

Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello @geadinc,

 

I will add the same checks as my UniFi SDN controller scripts, hope you will get your machine get to work.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 1
Registered: ‎10-16-2016

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hi @AmazedMender16,

 

This looks great; had no idea people were doing this. Can you give some background on support for this solution? We need to upgrade past the 2TB limit of the Unifi NVR, and this looks like it could be a great soluton to this problem (i.e. Linux VM attached to a 12+TB NAS). Will it support software upgrades just like the NVR or will that be a manual process that relies on you updating your scripts?

 

Just don't want to move us across to an unsupported platform that will leave us at risk in 18 months time or such.

 

Thanks!

Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

[ Edited ]

Hello @lmorgan69a,

 

It basically install the unifi video that UBNT provides. I wrote them so people that don’t know linux well have a option for easy installation.

 

You can easily update unifi video thru the GUI, once its installed.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello Everyone,

 

I added the same checks as in my UniFi SDN controller installation scripts, please let me know how things go!

 

Feedback/reviews/kudos are always appreciated! Ubnt Banana

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello Everyone,

 

Fixed the download links for ubuntu 18.04

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Works on Ubuntu 18.04 and 16.04

Hello Everyone,

 

I released scripts for Debian 8/9 (Jessie and Stretch)

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 22
Registered: ‎06-22-2018
Kudos: 7
Solutions: 1

Re: UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Why not simply use normal Linux apt package management ?

 

On my Ubuntu 16.04 (xenial)  I did the following:

 

wget -O - http://www.ubnt.com/downloads/unifi-video/apt-3.x/unifi-video.gpg.key | sudo apt-key add -

sudo sh -c 'echo "deb [arch=amd64] http://www.ubnt.com/downloads/unifi-video/apt-3.x xenial ubiquiti" > /etc/apt/sources.list.d/unifi-video.list'

sudo apt update
sudo apt install unifi-video

 

and then simply update to latest unifi-video using the normal update procedure:

 

sudo apt update

sudo apt upgrade

 

replace "xenial" with the Ubuntu verion of your choice.

 

New Member
Posts: 1
Registered: ‎03-02-2017

Re: UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Clean install of 18.04, update, upgrade, reboot. followed instructions to get/run 18.04 script, went perfect! Thanks a bunch!

 

Was going to install the new 3.10 beta approved for 18.04, but this looked easier and headache free. 

Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @jukasdrj,

 

Thanks for the feedback!

Glad it helped you out!

 

If you want the UniFi SDN script check my signature.

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello Everyone,

 

v2.2 Included a better MongoDB check.

Please let me know how things go! ( Error reports are appreciated! )

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
New Member
Posts: 15
Registered: ‎05-21-2016
Kudos: 3
Solutions: 1

Re: UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

@

 

Thanks for this script, I am not a linux person, but am learning slowly, came home from work to look for  a walkthrough to install UBNT Video onto UBNT, and first post I came across was this, and everyone seems to be having great success with it, so first thing tomorrow I will have a go.

 

But first a question, and again "not a Linx man".  I was going to use 16.04 as I read some users had issues wth the latest 18.04.
That said is there any realtime benefits from using the Server version over the Desktop version ?

 

I do also have UniFi Controller but that runs off a cloud key.

 

I then need to figure out adding a 2nd disk of the same sort to do mirroring to give me peace of mind :-)

 

Thanks for the excellent work.

Senior Member
Posts: 10,126
Registered: ‎08-04-2017
Kudos: 1643
Solutions: 499

Re: UniFi-Video Installation Scripts | Ubuntu 18.04 and 16.04 | Debian 8 and 9

Hello @d95gas,

 

You're welcome!

The script will install the correct packages so it will work on Ubuntu 18.04, I personally still prefer using 16.04

 

For the disk, just do a quick google and you will find alot of guides and help articles Man Happy

 

 

Regards,

Glenn R.

Cloud Hosted Controllers | Glenn R. | UniFi Installation/Easy Update Scripts | UniFi-Video Installation/Easy Update Scripts | UniFi-VoIP Installation Scripts
USG-4-PRO • USG
USW-48-500W • USW-24-POE-250W 2x • USW-16-POE-150W • USW-24 • USW-8-150W • USW-8
UAP XG • UAP-SHD • UAP-HD • UAP-NanoHD • UAP-AC-PRO 2x • UAP-AC-LITE • UAP-AC-IW • UAP-AC-M
UCK-G2 • UCK
Reply