Troubleshooting
Common issues and solutions.
Cloud API Issues
"API key not configured"
Problem: Missing or empty UNIFI_API_KEY in .env
Solution:
# Check if .env exists
cat .env | grep UNIFI_API_KEY
# Add your API key
echo 'UNIFI_API_KEY=your-key-here' >> .env
"Invalid API key"
Problem: API key is incorrect or expired
Solution:
- Go to unifi.ui.com
- Navigate to Settings → API
- Delete the old key and create a new one
- Update
.envwith the new key
"Connection timeout"
Problem: Cannot reach api.ui.com
Solution:
- Check internet connectivity
- Verify firewall allows outbound HTTPS
- Try:
curl -I https://api.ui.com
Local Controller Issues
"Controller URL not configured"
Problem: Missing UNIFI_CONTROLLER_URL in .env
Solution:
"Invalid username or password"
Problem: Credentials don't match controller
Solution:
- Verify credentials work in the UniFi web UI
- Use a local admin account (not Ubiquiti SSO)
- Check for typos in
.env
SSO vs Local Accounts
UI-CLI requires a local admin account. Ubiquiti SSO accounts won't work for direct controller access.
"SSL certificate verify failed"
Problem: Controller uses self-signed certificate
Solution:
"Connection refused"
Problem: Cannot connect to controller
Solution:
- Verify controller URL is correct
- Check controller is running
- Ensure network access to controller
- Try:
curl -k https://192.168.1.1
"Session expired"
Problem: Cached session is no longer valid
Solution:
Client/Device Issues
"Client not found"
Problem: Client name or MAC not recognized
Solution:
- Try partial name match:
./ui lo clients get iPhone - Use MAC address:
./ui lo clients get AA:BB:CC:DD:EE:FF - List all clients:
./ui lo clients all
"Device not found"
Problem: Device identifier not recognized
Solution:
- List devices first:
./ui lo devices list - Try by MAC:
./ui lo devices get 70:a7:41:xx:xx:xx - Try by ID:
./ui lo devices get device-001
DPI Issues
"DPI unavailable"
Problem: DPI is not enabled on the controller
Solution:
- Open UniFi web UI
- Go to Settings → Traffic & Security → Deep Packet Inspection
- Enable DPI
- Wait a few hours for data to populate
Output Issues
JSON Output is Empty
Problem: Command returns [] or {}
Possible Causes:
- No data available (e.g., no vouchers created)
- Filter too restrictive
- API returned empty response
Debug:
Table Output Truncated
Problem: Long values cut off in table view
Solution:
Installation Issues
"ModuleNotFoundError"
Problem: Python dependencies not installed
Solution:
"Command not found: ui"
Problem: CLI not in PATH
Solution:
Getting Help
Check Version
Command Help
Debug Mode
Report Issues
Found a bug? Open an issue on GitHub
Include:
- UI-CLI version (
./ui version) - Controller type (UDM, Cloud Key, etc.)
- Error message
- Steps to reproduce