# UniFi ☁️ Installation with Cloud, UDM or UDR 📶 - New Interface

Source: https://help.captivewifi.io/wifi-hardware/unifi-installation-with-cloud-udm-or-udr-new-interface

## Setting Up CaptiveWiFi on UniFi (Cloud, UDM or UDR) — New Interface

This guide walks you through connecting your UniFi network to CaptiveWiFi's guest authentication platform. There are three main stages: preparing your network, configuring the UniFi Hotspot Portal, and linking your CaptiveWiFi dashboard.

---

### Before You Start

**Using a UDM (UniFi Dream Machine) or UniFi Cloud?** You're ready to go — skip to Step 1.

**Using a self-hosted UniFi Controller or Cloud Key?** You'll need to make sure the following TCP ports are open and forwarded on your firewall to your controller before continuing:

| Port | Purpose |
|---|---|
| TCP 8080 | Device-to-controller communication |
| TCP 8443 | Controller web interface and API *(use 443 for UDM/Cloud Key)* |
| TCP 8880 | HTTP captive portal redirection |
| TCP 8843 | HTTPS captive portal |

> **Note:** If you are using a UDM or Cloud Key, use port **443** instead of **8443**.

**Cloud Key users — also confirm the following:**

- Firewall ports are forwarded to the Cloud Key's internal IP
- The Cloud Key has a static internal IP (or a DHCP reservation)
- Your ISP provides a static external IP address
- You can access the Cloud Key remotely from outside your network

---

### Step 1 — Create a Guest WiFi Network

1. Log in to your UniFi Controller at [unifi.ui.com](http://unifi.ui.com) or via your local controller address
2. Go to **Wireless Networks** and click **+ Create New**
3. Name your network — we recommend something like `_Your Business Name FREE WiFi` (the underscore pushes it to the top of the device's network list)
4. Select **Manual** configuration
5. Enable **Hotspot Portal** ✅
6. Enable **Client Device Isolation** ✅ *(this prevents guests from seeing each other's devices on the network)*
7. Click **Add WiFi Network**

> **Need to limit guest speeds?** If your venue has a slower connection, you can set bandwidth limits. See our separate guide on speed limitations.

---

### Step 2 — Configure the Hotspot Portal

1. In the left-hand menu, click **Hotspot Manager**
2. At the top of the page, select **Landing Page**
3. Click **Authentication**
4. Enable **External Portal Server** ✅
5. Click **Edit** next to External Portal Server and enter: `138.68.152.191`

---

### Step 3 — Configure Hotspot Settings

1. Click the **Settings** button within Hotspot Manager
2. Ensure all checkboxes are enabled ✅
3. Set the **Domain** to: `getonline.captivewifi.com`
4. Click **Add Hostname, IP or Subnet** and add each of the following — **these must be set as Pre-Authentication access** (meaning guests can reach them before logging in):

```plaintext
captivewifi.fra1.digitaloceanspaces.com
getonline.captivewifi.com
5.101.109.44
138.68.152.191
```



> **What is pre-authentication access?** These are addresses your guests' devices need to reach in order to load the CaptiveWiFi login page — before they've signed in. Without them, the portal won't display correctly.

### SSL / HTTPS Error? Use These Settings Instead

If guests see a security warning or SSL error when connecting, your controller likely doesn't have a valid SSL certificate. Switch to these Landing Page settings:

| Setting | Value |
|---|---|
| Show Landing Page | ✅ Checked |
| HTTPS Redirection | ☐ Unchecked |
| Support Encrypted URL | ☐ Unchecked |
| Secure Portal | ☐ Unchecked |
| Domain | `connected.captivewifi.io` |
| External Portal Server | 139.59.187.128 |

Also add `connected.captivewifi.io` to your pre-authentication access list.

---

### Step 4 — Connect to the CaptiveWiFi Dashboard

1. Log in to your CaptiveWiFi Dashboard
2. Go to **Integrations → WiFi Hardware**
3. Select **UniFi Automated (Not UniFI)**
4. Enter your UniFi controller login credentials
5. Once verified, your MAC addresses and Site ID will populate automatically

**Important notes:**

- **Use a local admin account** — not your Ubiquiti/UI.com email login. UniFi is rolling out mandatory MFA on cloud accounts, which will break the API connection. A local username and password is required. [Guide: How to create a local UniFi user →](https://help.captivewifi.io/wifi-hardware/unifi-adding-a-local-user-on-the-new-interface)
- **Use your controller's direct URL or IP** — not `https://unifi.ui.com`. The CaptiveWiFi API needs a direct connection to your controller. Port forwarding must be enabled.
- **Do not add a trailing slash** to the URL (e.g. use `194.27.237.22` not `194.27.237.22/`)

---

### Need Help?

We recommend putting the guest WiFi on a separate LAN/VLAN — your IT team can handle this, or our support team can set it up for you in minutes.

📧 <support@captivewifi.io> — email us and we'll get you sorted.
