๐ Unifi Toolkit
![]()
Unifi Toolkit is a third-party, unofficial web-based toolkit for managing Ubiquiti Unifi networks. It is not affiliated with or endorsed by Ubiquiti Inc. It provides an alternative interface for configuring Unifi devices via the Unifi Controller API.
โ ๏ธ This is NOT official Ubiquiti software. It is a community tool created by Crosstalk Solutions that connects to your existing Unifi Controller via API.
Perfect for Unifi network administrators who want a simplified management interface alongside or instead of the standard Unifi Controller.
๐ท๏ธ Category: Network
๐ณ Image: crosstalksolutions/unifi-toolkit:latest
๐ Links
| ย | ย |
|---|---|
| ๐ฆ Project | github.com/Crosstalk-Solutions/unifi-toolkit |
| ๐ Support | GitHub Issues |
| ๐ Crosstalk Solutions | crosstalksolutions.com |
๐ Ports
| Port | Protocol | Description |
|---|---|---|
8000 | TCP | Unifi Toolkit web interface |
๐พ Volumes
| Host Path | Container Path | Mode | Description |
|---|---|---|---|
/mnt/cache/appdata/unifi-toolkit | /app/config | RW | Configuration and settings |
โ๏ธ Environment Variables
๐ค Permissions
| Variable | Default | Masked | Description |
|---|---|---|---|
PUID | 500 | โ | User ID for file permissions |
PGID | 500 | โ | Group ID for file permissions |
TZ | Europe/Vienna | โ | Timezone for the container |
๏ฟฝ Required Settings
| Variable | Default | Masked | Description |
|---|---|---|---|
ENCRYPTION_KEY | `` | โ | Required! Encryption key for stored credentials. Generate with: openssl rand -base64 32 |
๏ฟฝ Deployment Settings
| Variable | Default | Masked | Description |
|---|---|---|---|
DEPLOYMENT_TYPE | local | โ | Deployment mode: local for homelab, production for public access |
๐ Unifi Controller Connection
| Variable | Default | Masked | Description |
|---|---|---|---|
UNIFI_CONTROLLER_URL | https://192.168.1.1 | โ | Required. Local controller IP/hostname (e.g., https://192.168.1.1). Note: Cloud access via unifi.ui.com is NOT supported. |
UNIFI_API_KEY | `` | โ | Recommended. API key from Unifi OS Settings โ Admins. Generate in your Unifi Controller. |
UNIFI_USERNAME | `` | โ | Fallback username if not using API key (optional) |
UNIFI_PASSWORD | `` | โ | Fallback password if not using API key (optional) |
UNIFI_SITE_ID | default | โ | Site ID from URL, not friendly name. Use ID from /manage/site/{id}/... |
UNIFI_VERIFY_SSL | false | โ | SSL verification. Set to true only with valid SSL certificates |
STALKER_REFRESH_INTERVAL | 60 | โ | Device refresh interval in seconds |
๐ Quick Start
Prerequisites
You need an existing Unifi Controller (self-hosted or cloud key). This tool connects to it via API.
Step 1: Generate Encryption Key
Required: Generate a strong encryption key:
openssl rand -base64 32
Copy the output and save it for the ENCRYPTION_KEY variable.
Step 2: Generate API Key (Recommended)
- Login to your Unifi Controller web interface
- Go to Settings (gear icon) โ Admins
- Click on your admin user
- Click Create API Key
- Copy the API key (you wonโt see it again!)
Step 3: Install via MOS Hub
- Open the MOS Hub and search for Unifi-Toolkit
- Set the Encryption Key - Paste the key from Step 1 into
ENCRYPTION_KEY - Configure the Unifi Controller connection:
- Set
UNIFI_CONTROLLER_URLto your controller (e.g.,https://192.168.1.1) - Set
UNIFI_API_KEYwith the key from Step 2 (recommended) - OR set
UNIFI_USERNAMEandUNIFI_PASSWORDas fallback
- Set
- Click Install
- Access Unifi Toolkit at
http://YOUR_SERVER_IP:8000
Step 4: Verify Connection
- Open the web interface
- The toolkit should automatically connect to your Unifi Controller
- You should see your network devices and configuration
๐ง Configuration
Unifi Controller URL Examples
| Setup | URL Example | Notes |
|---|---|---|
| UDM/UDM-Pro | https://192.168.1.1 | Use IP address, port 443 is default |
| Cloud Key Gen2+ | https://192.168.1.20 | Local IP, not unifi.ui.com |
| Self-hosted Controller | https://192.168.1.10:8443 | Default port 8443 |
| Docker Container | https://unifi:8443 | If on same Docker network |
โ ๏ธ Important: Use your controllerโs local IP address. Cloud access via unifi.ui.com is NOT supported by this toolkit.
SSL Certificate Verification
If your Unifi Controller uses a self-signed certificate (default), keep:
UNIFI_VERIFY_SSL=false
If you have a valid SSL certificate installed:
UNIFI_VERIFY_SSL=true
Multi-Site Setup
If you have multiple sites in your Unifi Controller, specify the site ID (not the friendly name):
UNIFI_SITE_ID=default # Default site
UNIFI_SITE_ID=5f3a2b1c4d8e9f0a1b2c3d4e # Site ID from URL
Finding your Site ID:
- In Unifi Controller, switch to the site you want
- Look at the URL:
/manage/site/5f3a2b1c4d8e9f0a1b2c3d4e/dashboard - The Site ID is the long string after
/site/
๐ Features
Device Management
- View all Unifi devices on your network
- See device status and connectivity
- Manage device configurations
- Restart or adopt devices
Network Configuration
- Configure WiFi networks
- Manage VLANs and subnets
- Set up port forwarding
- Configure firewall rules
Client Monitoring
- View connected clients
- See bandwidth usage
- Manage client access
- Block/unblock devices
Site Management
- Switch between multiple sites
- Site-specific configurations
- Site statistics and health
๐ Security Considerations
API Access
- The toolkit requires admin access to your Unifi Controller
- Credentials are stored in the container environment
- Use a dedicated service account if possible
Network Access
- Keep Unifi Toolkit on internal network
- Use reverse proxy with authentication for external access
- Consider VPN access instead of public exposure
SSL/TLS
- Unifi Controllers typically use self-signed certificates
- Set
UNIFI_VERIFY_SSL=falsefor default setups - Install valid SSL certificates on your controller for production
๐ Unifi Controller Setup
Generating an API Key (Recommended Method)
The API Key is the most secure way to connect:
- Login to your Unifi Controller web interface
- Go to Settings (gear icon in bottom left) โ Admins
- Click on your admin user account
- Scroll down to API Keys section
- Click Create API Key
- Give it a name (e.g., โMOS-Hub-Toolkitโ)
- Copy the key immediately - you wonโt see it again!
- Paste the key into
UNIFI_API_KEYenvironment variable
Controller Requirements
- Controller must be running and reachable via local IP
- Network connectivity between MOS Hub and Controller
- For UDM/UDM-Pro: Use
https://192.168.1.1(no port, uses 443) - For self-hosted: Use
https://IP:8443(or 443 if configured)
๐ ๏ธ Troubleshooting
โERROR: No .env file found and ENCRYPTION_KEY not set!โ
This is the most common error! You must set the ENCRYPTION_KEY environment variable.
Solution:
- Generate a key:
openssl rand -base64 32 - Copy the output (it looks like:
aBcD1234...) - Paste it into the
ENCRYPTION_KEYfield in MOS Hub - Redeploy the container
Connection Failed
- Check URL - Verify
UNIFI_CONTROLLER_URLis correct withhttps://- UDM/UDM-Pro: Use
https://192.168.1.1(no port needed, uses 443) - Self-hosted: Use
https://IP:8443if not using standard 443 - DO NOT use
unifi.ui.com- only local IPs work
- UDM/UDM-Pro: Use
- Network Access - Ensure MOS Hub can reach the Unifi Controller
curl -k https://UNIFI_IP:8443
Authentication Failed
- API Key (Recommended) - Verify you generated the API key correctly in Unifi OS Settings โ Admins
- Username/Password Fallback - Only used if API key is empty
- Local Account - Ensure youโre using a local admin account, not a UI.com SSO account
SSL Certificate Errors
If you see SSL errors:
- Set
UNIFI_VERIFY_SSL=false(default, works with self-signed certs) - Or install valid certificates on your Unifi Controller and set to
true
Site Not Found
- Check
UNIFI_SITE_IDmatches the ID from URL (not friendly name) - Site ID is the long string in URL:
/manage/site/{ID}/dashboard - Example:
5f3a2b1c4d8e9f0a1b2c3d4enotHome Office
๐ก Tip: Keep your Unifi Controller updated for the best API compatibility and security.
๐ก Tip: Use Unifi Toolkit alongside the official Unifi Controller - they complement each other.
๐ก Tip: For UDM/UDM-Pro users, the controller runs on port 443, not 8443.
๐ For more information: Visit the Unifi Toolkit GitHub for detailed documentation and feature updates.