Sunday, November 16, 2025

Updating and Installing Self-Hosted UniFi Network Servers (Linux)

 

Ubuntu or Debian-Based Scripts

Refer to this Community post.

UniFi Network APT Steps

  1. Install required packages before you begin with the following command:
    sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https
  2. Use the following command to add a new source list:
    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
  3. Add the GPG Keys.
    1. Method A (Recommended): Install the following trusted key into /etc/apt/trusted.gpg.d:
      sudo wget -O /etc/apt/trusted.gpg.d/unifi-repo.gpg https://dl.ui.com/unifi/unifi-repo.gpg
    2.  Method B: Using apt-key:
      sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
  4. Install the correct version of MongoDB.
    1. New UniFi Install: Run the following command:
      echo "deb [trusted=yes] https://repo.mongodb.org/apt/ubuntu bionic/mongodb-org/3.6 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
      sudo apt-get update
      Note: Depending on your Linux distribution, this step may not be necessary. If MongoDB is not included with your distro and isn't available in its repository, refer to the MongoDB installation guide (Ubuntu | Debian). 
    2. Existing Install (UniFi Network v7.5 or Newer): Skip this step.
    3. Existing Install (UniFi Network v7.4 or Prior): Refer to MongoDB's Help Article for instructions on updating MongoDB to v.3.6 or later.
  5. Install and upgrade the UniFi Network application with the following command:
    sudo apt-get update && sudo apt-get install unifi -y
  6. The UniFi Network application should now be accessible at the computer's configured local or public IP address, by typing that IP address in a browser's navigation bar (Chrome is recommended). If it is not launching, use the following command:
    sudo service unifi start