: :
Previous
Next

Use Unifi with Mongodb above 4.0.0

If you're trying to install the unifi controller on linux and you want to use a version of Mongodb above 4.0.0, like 4.4.0, then do the following as su.

You cannot use apt install unifi. You have to get the download link for the latest controller from https://www.ui.com/download/unifi/unifi-ap

Once you’ve got that link url, move into your home folder and download it from that link, something like this:

wget https://dl.ui.com/unifi/6.0.28/unifi_sysvinit_all.deb

Install it:

dpkg --ignore-depends=mongodb-org-server -i unifi_sysvinit_all.deb

Fix the broken packages:

  • vim commands are accessible by hitting :
  • hit the insert key or i to edit
  • hit the ESC key to exit editing
  • to save and exit, :wq
  • to exit and not save, :q!
  • to save, :w

vim /var/lib/dpkg/status

Find this location:

Package: unifi
Status: install ok installed

Remove the maximum Mondodb limitation so that the Depends looks something like this:

Depends: binutils, coreutils, adduser, libcap2, curl, mongodb-server (>= 2.4.10) | mongodb-10gen (>= 2.4.14) | mongodb-org-server (>= 2.6.0), mongodb-server | mongodb-10gen | mongodb-org-server, java8-runtime-headless, jsvc (>= 1.0.8), logrotate

You should be able to log in and configure or restore your new controller.

You may to need rerun acme.sh if you use it for SSL certificates, more can be found here or modify and run the command below:

acme.sh --force --issue --dns dns_cf -d unifi.naschenweng.info --pre-hook "touch /etc/ssl/private/cert.tar; tar -zcvf /root/.acme.sh/CloudKeySSL_`date +%Y-%m-%d_%H.%M.%S`.tgz /etc/ssl/private/*" --fullchainpath /etc/ssl/private/cloudkey.crt --keypath /etc/ssl/private/cloudkey.key --reloadcmd "sh /root/.acme.sh/cloudkey-renew-hook.sh"

Share on facebook
Facebook
Share on twitter
Twitter
Share on linkedin
LinkedIn

Leave a Reply

Your email address will not be published. Required fields are marked *