39 lines
2.5 KiB
Markdown
39 lines
2.5 KiB
Markdown
**Purpose**:
|
|
If you need to deploy Unifi Controller bare-metal into a virtual machine, you can do so with a few simple commands. You can feel free to reference the [original documentation](https://help.ui.com/hc/en-us/articles/220066768-Updating-and-Installing-Self-Hosted-UniFi-Network-Servers-Linux) if additional clarity is needed.
|
|
|
|
!!! note "Assumptions"
|
|
This document assumes that you are running Ubuntu Server (22.04 or higher). The instructions are not designed to accomodate RHEL-based Linux distributions.
|
|
|
|
!!! warning "INCOMPLETE DOCUMENT"
|
|
This document was originally written with the intention of comprehensively covering the deployment of the MongoDB server and Unifi Network Controller. However, I opted to use an automated scripted installation approach seen [here](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) that was almost turn-key instead.
|
|
|
|
```sh
|
|
apt-get update; apt-get install ca-certificates curl -y
|
|
curl -sO https://get.glennr.nl/unifi/install/install_latest/unifi-latest.sh && bash unifi-latest.sh
|
|
```
|
|
|
|
|
|
## Install Components
|
|
The installation will consist of a MongoDB server and a Unifi Network (controller) server. You will install the database first, then install the Unifi Controller second, so it can provision the newly-installed local MongoDB database server.
|
|
|
|
### General Configuration
|
|
We need to configure APT with a few commands to ensure that we can download the MongoDB and Unifi packages.
|
|
```sh
|
|
sudo apt-get update && sudo apt-get install ca-certificates apt-transport-https
|
|
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 [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
|
|
```
|
|
|
|
!!! node "Alternative GPG Key Installation"
|
|
If you run into issues installing the GPG key for the Unifi packages, you can alternatively run the command seen below:
|
|
```sh
|
|
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 06E85760C0A52C50
|
|
```
|
|
|
|
### MongoDB Server
|
|
Run the following commands install and enable automatic startup for the MongoDB server. Original reference documentation can be found [here](https://www.mongodb.com/docs/manual/tutorial/install-mongodb-on-ubuntu/).
|
|
```sh
|
|
|
|
``` |