How to Set Up UniFi Protect

How to Set Up UniFi Protect for the Home Assistant Integration (Local User + API Key)

If you’re setting up the Home Assistant UniFi Protect integration and got stuck on the “API key” field, this guide covers the whole process — including the one step that’s easy to miss.

Tested on: UDM SE, UniFi OS 5.1.26, Network 10.5.67, Protect 7.2.105.

The short version

  1. Create a local-only admin user on your UniFi console.
  2. Log in as that local user.
  3. Generate an API key from Settings → Control Plane → Integrations (or the direct URL below).
  4. Plug the username, password, and API key into the Home Assistant integration form.

Step 1: Create a local-only user

Home Assistant’s UniFi Protect integration will not work with a Ubiquiti cloud/SSO account — it needs a local user.

  1. Log into your UniFi console directly by IP address (e.g. https://192.168.1.1), not via unifi.ui.com or the Protect app. You’ll likely need to click through a “This Connection is Not Private” warning since UniFi consoles use a self-signed certificate — that’s normal and safe on your own local network.
  2. Go to the People section (left sidebar, icon looks like two people).
  3. Click Create NewCreate New User.
  4. Fill in a name.
  5. Check Admin.
  6. Check “Restrict to Local Access Only” — this is the key checkbox. It reveals a Local Credentials section where you set a username and password directly (no cloud invite).
  7. Under Role, leave “Use a Predefined Role” checked and select Super Admin (or at minimum, make sure the Protect permission is set to Full Management — the integration works best with full read/write access, though it will adapt to whatever permissions the user has).
  8. Click Create.

Step 2: Log in as the local user

  1. Sign out of your cloud account.
  2. On the login screen, log in with the local username/password you just created (not your Ubiquiti ID/email).
  3. You must be logged in as an administrator to generate an API key — the local user with Super Admin covers this.

Step 3: Generate the API key

This is the step that’s genuinely hard to find, because it’s not under the local user’s own account settings panel, and it’s notin the Protect app’s settings. It’s under the Network app:

  1. Make sure you’re in the Network app (not Protect) — check the tabs at the top of the console.

  2. Go to Settings (gear icon) → Control Plane → Integrations.

  3. Or skip the clicking entirely and go straight to:

    https://<your-console-ip>/network/default/integrations/
    
    

    (e.g. https://192.168.1.1/network/default/integrations/)

  4. Click Create New API Key.

  5. Give it a name (e.g. “Home Assistant”).

  6. Copy the key immediately — it’s only shown once.

Step 4: Set up the integration in Home Assistant

When Home Assistant shows “UniFi Protect discovered”:

  • Port: 443 (default)
  • Verify SSL certificate: off (the console’s cert is self-signed)
  • Username / Password: your local user’s credentials
  • API key: the key from Step 3

Dead ends to avoid

These all look like plausible places for the API key but aren’t (at least not on this version):

  • The local user’s own account settings panel (People → click user → gear icon) — this only shows account/role settings, no API key section.
  • Control Plane → Console tab, or any of the Updates/Backups/Storage/Push Notifications tabs.
  • The profile icon dropdown (top-right corner) — this only has Support/Sign Out/legal links.
  • UniFi Identity settings.
  • Protect app’s own General settings.
  • The System settings page.
  • The Search Settings box (searching “API” returns nothing).

Why this is confusing

UniFi has moved account, admin, and integration settings around across versions, and official documentation doesn’t always match the current UI. If the steps above don’t match what you see, your version may differ — check the Ubiquiti Community forums or the Home Assistant UniFi Protect integration docs for the latest guidance, or open a Ubiquiti support ticket.

1 Like