Fixing Unifi Devices Reverting to Incorrect Inform Address
This guide addresses a persistent issue where Unifi devices (Access Points, Switches, etc.) show as "Offline" in the Unifi Controller and revert to an incorrect inform address even after using set-inform.
Problem Description
Unifi devices sporadically appear as "Offline" in the Unifi Controller. When checking the device status via SSH, the inform address is incorrect:
# Example output from 'info' command
Model: UAP-AC-Lite
Version: 6.5.28.14491
MAC Address: <MAC>
IP Address: <IP>
Hostname: AP-Lite
Uptime: 584333 seconds
NTP: Synchronized
Status: Timeout (http://192.168.1.89:8080/inform)
The inform address (192.168.1.89 in this example) does not match the actual Unifi Controller address, causing the device to fail communication with the controller.
Common Solution (Often Unsuccessful)
The typical recommendation is to repeatedly run set-inform to overwrite backup configurations:
# SSH into the Unifi device
ssh ubnt@<device-ip>
# Run set-inform multiple times
set-inform http://<controller-ip>:8080/inform
set-inform http://<controller-ip>:8080/inform
set-inform http://<controller-ip>:8080/inform
Problem: This approach often fails because the device reverts to the incorrect address stored in its persistent configuration file.
Root Cause
The incorrect inform address is stored in the device's persistent configuration file at:
This file contains management configuration that persists across reboots and takes precedence over set-inform commands.
Solution: Edit Persistent Configuration
Step 1: SSH into the Unifi Device
# SSH into the problematic device
ssh ubnt@<device-ip>
# Default credentials (if not changed):
# Username: ubnt
# Password: ubnt
Step 2: View Current Configuration
Example output:
mgmt.is_default=false
mgmt.led_enabled=true
mgmt.cfgversion=3d76e600b230b191
mgmt.authkey=
mgmt.selfrun_guest_mode=pass
mgmt.capability=notif,notif-assoc-stat
mgmt.use_aes_gcm=true
mgmt.report_crash=true
mgmt.is_setup_completed=false
mgmt.servers.1.url=http://192.168.1.89:8080/inform
stun_url=stun://<Unifi-Controller-IP>
mgmt_url=https://<Unifi-Controller-IP>:8443/manage/site/default
Step 3: Edit the Configuration File
Identify the incorrect inform address in the mgmt.servers.1.url line:
Vi editor quick reference:
- Press i to enter insert mode
- Navigate to the mgmt.servers.1.url line
- Change the incorrect IP address to your correct Unifi Controller IP
- Press Esc to exit insert mode
- Type :wq and press Enter to save and quit
Example change:
# Before
mgmt.servers.1.url=http://192.168.1.89:8080/inform
# After (replace with your actual controller IP)
mgmt.servers.1.url=http://192.168.1.100:8080/inform
Step 4: Reboot the Device
Or trigger a provision from the Unifi Controller: 1. Go to Devices in the Unifi Controller 2. Select the device 3. Click Force Provision (gear icon → Advanced → Force Provision)
Step 5: Verify the Fix
After the device reboots, SSH back in and verify:
# Check device info
info
# Verify the inform address is correct
# Example output:
# Status: Connected (http://192.168.1.100:8080/inform)
Alternative: Using sed for Quick Edit
If you're comfortable with command-line editing:
# Backup the original file
cp /etc/persistent/cfg/mgmt /etc/persistent/cfg/mgmt.backup
# Replace incorrect IP with correct IP (adjust IPs as needed)
sed -i 's/192.168.1.89/192.168.1.100/g' /etc/persistent/cfg/mgmt
# Verify the change
cat /etc/persistent/cfg/mgmt | grep mgmt.servers.1.url
# Reboot
reboot
Bulk Fix for Multiple Devices
If multiple devices have the same issue, create a script:
#!/bin/bash
# fix-unifi-inform.sh
CORRECT_CONTROLLER_IP="192.168.1.100"
INCORRECT_IP="192.168.1.89"
# List of device IPs
DEVICES=(
"192.168.1.201"
"192.168.1.202"
"192.168.1.203"
)
for DEVICE in "${DEVICES[@]}"; do
echo "Fixing device: $DEVICE"
ssh ubnt@$DEVICE << EOF
# Backup original file
cp /etc/persistent/cfg/mgmt /etc/persistent/cfg/mgmt.backup
# Replace incorrect IP
sed -i 's/${INCORRECT_IP}/${CORRECT_CONTROLLER_IP}/g' /etc/persistent/cfg/mgmt
# Verify change
echo "New config:"
cat /etc/persistent/cfg/mgmt | grep mgmt.servers.1.url
# Reboot
reboot
EOF
echo "Device $DEVICE fixed and rebooting..."
sleep 5
done
echo "All devices processed"
Make it executable and run:
Why This Works
The /etc/persistent/cfg/mgmt file is the device's persistent management configuration:
- Survives Reboots: Configuration persists across device restarts
- Takes Precedence: Overrides temporary
set-informcommands - Controls Failover: Defines backup inform addresses that devices fall back to
- Direct Configuration: Editing this file directly ensures the correct inform address is always used
Prevention
Set Correct Inform During Adoption
When adopting new devices:
- Ensure DNS resolves controller hostname correctly
- Use static IP or DHCP reservation for the Unifi Controller
- Configure devices with correct inform address from the start
- Use controller hostname instead of IP address when possible
Use Controller Hostname
Instead of IP addresses, configure using the controller hostname:
This prevents issues when the controller IP changes.
DHCP Option 43
For automatic controller discovery, configure DHCP Option 43:
Example for controller at 192.168.1.100:
Troubleshooting
Cannot SSH into Device
Solutions:
- Verify SSH is enabled in controller settings
- Check device IP address is correct
- Try default credentials: ubnt / ubnt
- Reset device to factory defaults if necessary
- Connect via console cable if available
File is Read-Only
Solutions: - Ensure you're logged in as root or with sudo privileges - Remount filesystem as read-write:
Changes Don't Persist
Solutions:
- Verify file was saved correctly: cat /etc/persistent/cfg/mgmt
- Ensure the file path is exactly /etc/persistent/cfg/mgmt
- Check for typos in the IP address
- Reboot the device to apply changes
- Re-provision device from controller
Device Still Shows Offline
Solutions:
- Wait 5-10 minutes for device to reconnect
- Check controller is reachable from device: ping <controller-ip>
- Verify controller port 8080 is open: telnet <controller-ip> 8080
- Check firewall rules on controller and network
- Force provision from controller interface
- Review controller logs for adoption errors
Multiple Inform Addresses
If the file contains multiple mgmt.servers entries:
mgmt.servers.1.url=http://192.168.1.89:8080/inform
mgmt.servers.2.url=http://192.168.1.100:8080/inform
Update all entries to ensure consistency:
# Update all inform URLs
sed -i 's/mgmt.servers.[0-9].url=http:\/\/192.168.1.89/mgmt.servers.1.url=http:\/\/192.168.1.100/g' /etc/persistent/cfg/mgmt
Verification Checklist
After applying the fix:
- [ ] Device shows as "Connected" in Unifi Controller
- [ ]
infocommand shows correct inform address - [ ] Device remains connected after reboot
- [ ] Configuration changes sync from controller
- [ ] Device statistics update in real-time
Related Documentation
This solution applies to Unifi devices including UAP, USW, and USG models running UniFi firmware. Original solution credit: anakinfoxe.com