30 lines
1.9 KiB
Markdown
30 lines
1.9 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.
|
|
|
|
## 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
|
|
|
|
``` |