How to Install UniFi Controller on Ubuntu VPS (Contabo Guide)

If you’re hosting your own network or managing client sites, running the UniFi Controller on a Contabo VPS is a cost-effective and powerful solution. This guide walks you through the full setup of UniFi Controller on Ubuntu 20.04/22.04 LTS.

Illustration of a cloud-hosted UniFi Controller setup on an Ubuntu VPS server, symbolizing remote network management with Ubiquiti and Contabo.
Deploying a UniFi Controller on an Ubuntu VPS like Contabo – the perfect cloud-managed solution.

✅ Why Host UniFi Controller on a VPS?

  • 🌍 Remote management of all UniFi devices (APs, switches, gateways)
  • 💰 Affordable VPS hosting (e.g., Contabo)
  • 📈 Full control, backups, SSL support
  • 🔄 Persistent uptime & auto-start after reboot

🔧 Step-by-Step UniFi Controller Installation on Ubuntu

🚀 Step 1: Prepare Your VPS

Update and install essential packages:

sudo apt update && sudo apt upgrade -y
sudo apt install curl gnupg2 ca-certificates apt-transport-https software-properties-common -y

📦 Step 2: Add Ubiquiti Repository

echo 'deb https://www.ui.com/downloads/unifi/debian stable ubiquiti' | sudo tee /etc/apt/sources.list.d/100-ubnt-unifi.list

Import UniFi GPG key:

sudo curl -fsSL https://dl.ui.com/unifi/unifi-repo.gpg | gpg --dearmor -o /usr/share/keyrings/unifi-archive-keyring.gpg

🔄 Step 3: Update & Install UniFi Controller

sudo apt update
sudo apt install unifi -y

🔍 Step 4: Fix Common Issues (Port 8080 Error)

If the UniFi service fails to start, check with:

sudo journalctl -u unifi.service --no-pager

Error: Port 8080 not available?

Find the process:

sudo lsof -i :8080

Kill it if not needed:

sudo kill -9 <PID>

If you must keep whatever is using port 8080, you can configure UniFi to use a different port:

Edit the config file:

sudo nano /usr/lib/unifi/data/system.properties

Then restart:

sudo systemctl restart unifi

✅ Step 5: Access UniFi Controller

Open your browser and go to:

https://<your-server-ip>:8443

Ignore the SSL warning and proceed.

🔐 Recommended Firewall Configuration

sudo ufw allow 8443/tcp  # Web UI
sudo ufw allow 8080/tcp  # Inform port
sudo ufw allow 3478/udp  # STUN
sudo ufw allow 10001/udp # Device discovery
sudo ufw enable

🧠 Bonus Tips

  • 🌐 Static IP or Dynamic DNS: Makes access easier
  • 🔁 Backups: Use built-in backup scheduler
  • 📜 Enable SSL: For public-facing controllers, install Let’s Encrypt
  • 📦 Install on Docker: Optional for containerized environments

🏁 Final Thoughts

Running UniFi Controller on a Contabo Ubuntu VPS is powerful and affordable. Whether you’re managing multiple sites or a home lab, this setup gives you reliable control of your network.

📌 FAQ

Q: Is Contabo good for UniFi?
Yes, Contabo VPS offers excellent value, enough RAM/CPU for small to medium UniFi deployments.

Q: Which ports does UniFi need open?
Most essential: 8443 (UI), 8080 (inform), 3478 (STUN), 10001 (discovery), 27117 (internal MongoDB)

Q: How to auto-start UniFi?
It’s already enabled via systemd:
/etc/systemd/system/multi-user.target.wants/unifi.service

🔗 Useful Links

Leave a Comment