How to install UniFi Video on Ubuntu Server 24.04?
Self Hosted UniFi Video. It's extremely easy to follow every step and you can't go wrong.
Is it possible to install unifi video 3.10.13 on ubuntu server 24.04, the answer is yes.
01. Frstu ... Update Ubuntu
sudo apt update && apt upgrade
02. Install prerequisite
sudo apt install curl haveged gpg wget
03. Install Java
If you want to install unifi network controller on the same server, also install java 17
sudo apt install openjdk-17-jre-headless
sudo apt install openjdk-8-jre-headless
View version:
java -version
Then to prevent java from updating & breaking everything again in the future with "sudo apt upgrade" do:
sudo apt-mark hold openjdk-17-jre-headless
04. The required java version for unifi video to work is jre1.8.0_271
Download jre1.8.0_271 from this direct link and adjust:
sudo mkdir /usr/local/java
sudo cd /usr/local/java
sudo wget https://javadl.oracle.com/webapps/download/AutoDL?BundleId=243727_61ae65e088624f5aaa0b1d2d801acb16
sudo tar zxvf AutoDL\?BundleId\=243727_61ae65e088624f5aaa0b1d2d801acb16
sudo rm AutoDL\?BundleId\=243727_61ae65e088624f5aaa0b1d2d801acb16
sudo update-alternatives --install "/usr/bin/java" "java" "/usr/local/java/jre1.8.0_271/bin/java" 1
05. MongoDB install Libssl 1.1
Download
wget http://archive.ubuntu.com/ubuntu/pool/main/o/openssl/libssl1.1_1.1.1f-1ubuntu2_amd64.deb
Install
sudo dpkg -i libssl1.1_1.1.1f-1ubuntu2_amd64.deb
06. Install and add Repository MongoDB Ubuntu
Use the following command to add the MongoDB version 4.4 Repo
curl https://pgp.mongodb.com/server-4.4.asc | sudo gpg --dearmor | sudo tee /usr/share/keyrings/mongodb-org-server-4.4-archive-keyring.gpg >/dev/null
Then add GPP, for ubuntu Repository
echo 'deb [arch=amd64,arm64 signed-by=/usr/share/keyrings/mongodb-org-server-4.4-archive-keyring.gpg] https://repo.mongodb.org/apt/ubuntu focal/mongodb-org/4.4 multiverse' | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list > /dev/null
Update Ubuntu
sudo apt update -y
Install MongoDB package
sudo apt install mongodb-org-server -y
07. Instal prerequisites jsvc
sudo apt install jsvc
08. Download and instal Unifi Video package
Download choose Debian or Ubuntu:
wget https://dl.ubnt.com/firmwares/ufv/v3.10.13/unifi-video.Debian7_amd64.v3.10.13.deb
wget https://dl.ubnt.com/firmwares/ufv/v3.10.13/unifi-video.Ubuntu18.04_amd64.v3.10.13.deb
Install depending on your choice of commands:
sudo dpkg -i unifi-video.Debian7_amd64.v3.10.13.deb
sudo dpkg -i unifi-video.Ubuntu18.04_amd64.v3.10.13.deb
You can check the status, but the ports will not be opened until the following file is set:
sudo service unifi-video status
09. Set unifi video to work with java jre1.8.0_271
That is, to open the ports:
Edit file: sudo nano /usr/sbin/unifi-video
java_autodetect() {
! JAVA=$(readlink -e $(which java))
! JAVA_HOME=
to
java_autodetect() {
! JAVA=/usr/local/java/jre1.8.0_271/bin/java
! JAVA_HOME=/usr/local/java/jre1.8.0_271
After this, it is necessary to restart unifi video
sudo systemctl restart unifi-video.service
08. Tuls to see if the 7443 potr is open
sudo apt install net-tools
netstat -tnl
If the port is open you have successfully installed unifi video on you 24.04 ubuntu server ...
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
Important:
For the cameras to work on Unifi Video, you need to restore the firmware to 4.23.8 ...