Quick & Easy 5-Minute UniFi Self Hosted Debian 12 Controller Setup & Update Script [YouTube Release]

Additional Resources:

UniFi Controller Tutorial: Managing Multiple Sites & Migrations with Ease!

Ui Glenn Script Page

Ui Glen Forum Post
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

Jims Garage UniFi Docker Tutorial

Connecting With Us

Lawrence Systems Shirts and Swag

►👕 https://lawrence.video/swag/

AFFILIATES & REFERRAL LINKS

Amazon Affiliate Store
:shopping_cart: Lawrence Systems's Amazon Page

All Of Our Affiliates that help us out and can get you discounts!
:shopping_cart: https://www.lawrencesystems.com/partners-and-affiliates/

Gear we use on Kit
:shopping_cart: Kit

Use OfferCode LTSERVICES to get 10% off your order at
:shopping_cart: Tech Supply Direct - Refurbished Tech at Unbeatable Prices

Digital Ocean Offer Code
:shopping_cart: DigitalOcean | Cloud Hosting for Builders

HostiFi UniFi Cloud Hosting Service
:shopping_cart: HostiFi - UniFi Cloud Hosting

Protect you privacy with a VPN from Private Internet Access
:shopping_cart: Buy VPN with Credit Card or PayPal | Private Internet Access

Patreon
:moneybag: lawrencesystems | creating Tech Tutorials & Reviews | Patreon

Chapters
00:00 UniFi Self Hosted Debian 12 Controller Setup
00:55 Ui-Glenn UniFI Controller Script
02:11 How to use the Ui-Glenn script
03:41 How to update the controller
04:20 Docker UniFi Controller

#unifi #networking

thanks for this tom

ps more evidence on how they value self hosted less than own hardware…

tip for anyone trying to update their controller running on arm64 via apt and getting an error message saying architecture is not supported anymore…

just lie and change your file to “deb [arch=amd64] https://www.ui.com/downloads/unifi/debian stable ubiquiti”

the arm64 build is present in the “pull” and will update ok, unifi have known about this for a while but can’t be arsed fixing it :slight_smile:

Harry

Thanks for the video. The script makes it indeed super easy to install. :slight_smile:

For those who prefer to manually install the controller on Debian 12, I have written down the necessary steps below, which aren’t too complicated either. The only annoying thing is the dependency on libssl 1.1, which is due to the ancient version of MongoDB required by UniFi :roll_eyes:

Prerequisites:

sudo apt update
sudo apt install -y gnupg curl wget ca-certificates apt-transport-https

Download and install libssl1.1:

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

Add the UniFi and MongoDB repositories:

echo 'deb [ arch=amd64,arm64 ] https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list
sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
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
curl -fsSL https://pgp.mongodb.com/server-4.4.asc | sudo gpg -o /usr/share/keyrings/mongodb-server-4.4.gpg --dearmor

Install UniFi: (MongoDB and the rest of the dependencies will be installed automatically)

sudo apt update 
sudo apt install -y unifi

Sources:

https://packages.debian.org/bullseye/amd64/libssl1.1/download

https://help.ui.com/hc/en-us/articles/220066768-Updating-and-Installing-Self-Hosted-UniFi-Network-Servers-Linux-

https://www.mongodb.com/docs/v4.4/tutorial/install-mongodb-on-debian/

libssl 1.1? Jeez I knew about the ancient mongodb restriction but didn’t know about this. Thanks for adding.

Yes, not so great, also that you have to install and update it manually on Debian 12, if there will be any updates for it at all in the future. Although Debian usually backports critical security fixes to older versions of their packages whenever possible.

Another option would be to use Debian 11 (old-stable) instead of Debian 12, in which case you will of course have the same old version of libssl installed, but you won’t have to install and maintain it manually.

Or you could use the script in Tom’s video, which takes care of all the dependencies, or the Docker image. But I assume that both solutions will use the same old libssl version, which is probably also true for Ubiquity’s devices like the CloudKey, because as I said, it’s a MongoDB 3.x and 4.x dependency, and I doubt that the maintainers of the script or the Docker image, or even the devs at Ubiquity themselves, are doing any magic to make those old MongoDB versions compatible with a newer OpenSSL version.

I know Tom doesn’t like it but I decided to use the linuxserver.io image for the Unfi Network Application with mongodb4 container. Just kind of seemed easier for me to keep all these old dependencies in a container.

Tom would have told you “whatever makes you happy”. Lol