Set up your own Vultr UniFi Controller in minutes. Follow every command and configuration step to create a secure and reliable UniFi cloud setup. Our Vultr Live Support Team is always here to help you.
Deploy Your Own Vultr UniFi Controller in the Cloud
Running your own Vultr UniFi Controller gives you complete control over your UniFi devices without relying on Ubiquiti’s hardware consoles. It’s a practical option for anyone managing multiple sites or wanting an always-on cloud controller. Let’s walk through the entire process of setting up a Vultr UniFi Controller, from server creation to SSL configuration, with every important command included.

An Overview
Setting up Your Vultr VPS
Start by creating a new virtual server on Vultr.
Configuration:
- Choose Server: Cloud Compute
- CPU & Storage Technology: Intel Regular Performance
- Server location: Nearest to your region
- Server image: Debian 11 x64
- Server size: $5/month – 1vCPU / 1GB Memory
- Auto Backup: Recommended
- Disable IPv6
Now, add your SSH keys:
Click Add new SSH Keys
Enter your computer name
Copy the contents of id_rsa.pub
Paste it into the SSH key field
Click Add SSH Key
Finally, add a hostname like unifi.yourdomain.com, select your SSH key, and click Deploy Now.
Configuring DNS and Connecting to the Server
Once the server shows “Running,” copy its public IP. In your DNS manager (e.g., Cloudflare), create an A record pointing your chosen hostname to this IP.
Connect to your server using SSH:
ssh root@95.180.45.43
If you’re using PuTTY, load your .ppk key file under SSH → Auth before connecting.
Launch Your UniFi Cloud Today!

Securing the Server
Security is essential before installing the controller.
Allow SSH only from your IP:
ufw allow from 80.90.100.110 to any port 22
Remove open rules:
ufw status numbered
ufw delete 1
ufw delete 3
Edit SSH configuration:
sudo nano /etc/ssh/sshd_config
Change the following lines:
PermitRootLogin without-password
PubkeyAuthentication yes
PasswordAuthentication no
Save and restart:
sudo service sshd restart
Install fail2ban for login protection:
sudo apt install fail2ban
Preparing the Server
Keep your VPS clean and updated:
sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove && sudo apt-get autoclean
sudo apt-get install unattended-upgrades apt-listchanges
sudo dpkg-reconfigure -plow unattended-upgrades
sudo dpkg-reconfigure tzdata
sudo apt-get install haveged -y
Install Java 8 (OpenJDK-8):
apt-get install -y wget apt-transport-https gnupg
wget -qO - https://adoptopenjdk.jfrog.io/adoptopenjdk/api/gpg/key/public | sudo apt-key add -
echo "deb https://adoptopenjdk.jfrog.io/adoptopenjdk/deb buster main" | sudo tee /etc/apt/sources.list.d/adoptopenjdk.list
sudo apt-get update; sudo apt-get install adoptopenjdk-8-hotspot
Installing the UniFi Controller
Add repositories and install UniFi:
echo 'deb http://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.ubnt.com/unifi/unifi-repo.gpg
echo "deb http://repo.mongodb.org/apt/debian stretch/mongodb-org/3.6 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.6.list
sudo wget -qO - https://www.mongodb.org/static/pgp/server-3.6.asc | sudo apt-key add -
sudo apt-get update; sudo apt-get install unifi -y
sudo systemctl enable unifi.service
sudo systemctl enable mongod.service
sudo systemctl enable haveged.service
Adjusting Firewall Rules
ufw allow from 80.90.100.110 to any port 8443
ufw allow 3478/udp
ufw allow 8080
ufw allow 8880
ufw allow 8843
Adding SSL Certificate
Install Let’s Encrypt and Certbot:
sudo apt install certbot python3-certbot-apache -y
ufw allow 80
ufw allow 443
certbot --apache -d unifi.lazyadmin.nl
Download the SSL import script:
sudo wget https://raw.githubusercontent.com/stevejenkins/unifi-linux-utils/master/unifi_ssl_import.sh -O /usr/local/bin/unifi_ssl_import.sh
chmod +x /usr/local/bin/unifi_ssl_import.sh
sudo nano -w /usr/local/bin/unifi_ssl_import.sh
Update these lines:
UNIFI_HOSTNAME=unifi.lazyadmin.nl
UNIFI_DIR=/var/lib/unifi
JAVA_DIR=/usr/lib/unifi
KEYSTORE=${UNIFI_DIR}/keystore
LE_MODE=true
Run:
/usr/local/bin/unifi_ssl_import.sh
Connecting UniFi Devices
Set your UniFi device inform address:
ssh ubnt@192.168.1.142
set-inform http://80.90.100.110:8080/inform
Your device will now appear for adoption in your Vultr UniFi Controller.
Optimizing Performance
Increase Java memory allocation:
ssh root@80.90.100.110
service unifi stop
nano /usr/lib/unifi/data/system.properties
unifi.xmx=2048
unifi.xms=2048
db.mongo.wt.cache_size_default=true
Conclusion
You now have a fully functional Vultr UniFi Controller secured with SSL, optimized for stability, and ready to manage all your UniFi devices from anywhere. Always keep security tight and updates regular to ensure reliable operation.
