Skip to content

Instantly share code, notes, and snippets.

@sinofool
Last active June 7, 2024 21:53
Show Gist options
  • Save sinofool/233ed96dd85123ee5a87ad12e812d424 to your computer and use it in GitHub Desktop.
Save sinofool/233ed96dd85123ee5a87ad12e812d424 to your computer and use it in GitHub Desktop.
Install Unifi Controller on Debian 11 (Bullseye)
# libssl1.1, the only missing mongodb dependency.
# I prefer enable oldstable in case this get backport security patches
echo "deb http://deb.debian.org/debian bullseye main" | sudo tee /etc/apt/sources.list.d/oldstable-bullseye.list
# MongoDB 4.4, [end of life Feb 2024](https://www.mongodb.com/support-policy/lifecycles)
curl -fsSL https://pgp.mongodb.com/server-4.4.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor
echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-4.4.gpg ] http://repo.mongodb.org/apt/debian buster/mongodb-org/4.4 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-4.4.list
sudo apt-get update && sudo apt-get install mongodb-org-server -y
# Unifi
sudo apt-get update && sudo apt-get install -y ca-certificates apt-transport-https
curl -fsSL https://dl.ui.com/unifi/unifi-repo.gpg | sudo gpg -o /usr/share/keyrings/unifi-repo.gpg --dearmor
echo 'deb [ signed-by=/usr/share/keyrings/unifi-repo.gpg ] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo apt-get update && sudo apt-get install unifi -y
@counterpoint
Copy link

counterpoint commented Apr 11, 2022

Unfortunately doesn't work on ARM (Raspberry Pi):
The following packages have unmet dependencies:
unifi : Depends: mongodb-server (>= 2.4.10) but it is not installable or
mongodb-10gen (>= 2.4.14) but it is not installable or
mongodb-org-server (>= 2.6.0) but it is not installable
Depends: mongodb-server (< 1:4.0.0) but it is not installable or
mongodb-10gen (< 4.0.0) but it is not installable or
mongodb-org-server (< 4.0.0) but it is not installable
E: Unable to correct problems, you have held broken packages.
Unifi can be successfully installed using the instructions at https://pimylifeup.com/rasberry-pi-unifi/

@sinofool
Copy link
Author

Thanks @counterpoint !
Shame on Ubiquiti for the official instruction and still using end-of-life MongoDB 3.6.

@MindTooth
Copy link

Taken from the install script on the forums: https://community.ui.com/questions/UniFi-Installation-Scripts-or-UniFi-Easy-Update-Script-or-UniFi-Lets-Encrypt-or-UniFi-Easy-Encrypt-/ccbc7530-dd61-40a7-82ec-22b17f027776

For Raspberry OS (bullseye 64bit), you can use the following:

$ cat /etc/apt/sources.list.d/mongodb-org-3.6.list
deb [ arch=amd64,arm64 ] https://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.6 multiverse

Just installed using the script mentioned, and was able to install a working MongoDB version.

@nosrednawall
Copy link

Thanks

@laserguidedcake
Copy link

Great stuff - works great in proxmox w/ a debian 11 template!

@madphilosopher
Copy link

Just wondering... Why the third-party Java 8?

I skipped that part of your script and just did this:

# apt install openjdk-11-jre-headless

And everything works as advertised. Thanks!

@Vertux
Copy link

Vertux commented Jan 7, 2023

Thanks @counterpoint ! Shame on Ubiquiti for the official instruction and still using end-of-life MongoDB 3.6.

And the oldest version offered for Debian 11 is Mongo v4.2 🙄

@sinofool
Copy link
Author

Updated to debian 12 bookworm and unifi 8.0.
Tested on 2023-11-17, with debian 12.2 and unifi 8.0.7

@weeheavy
Copy link

Updated to debian 12 bookworm and unifi 8.0. Tested on 2023-11-17, with debian 12.2 and unifi 8.0.7

Works fine on a freshly upgraded Debian 12 (amd64). Thank you!

@breakerbar
Copy link

I'll note that if you're going with a very minimal Debian 12 install, you'll need to install curl and gpg
sudo apt install gpg curl -y

Otherwise worked perfectly - excellent guide.

@Hicsy
Copy link

Hicsy commented May 21, 2024

wget http://ftp.au.debian.org/debian/pool/main/o/openssl/libssl1.1_1.1.1w-0+deb11u1_amd64.debD
sudo dpkg -i libssl1.1_1.1.1w-0+deb11u1_amd64.deb

@0n31l
Copy link

0n31l commented Jun 7, 2024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment