When you run your Unifi controller inside a Docker container
you might face the problem that your Unifi devices are stuck
adopting. The main cause might be that you are not running your HTTP port on 8080, which is the default.
I strongly advise to run on this port to prevent future problems with this.
Solution
SSH into each device using the IP address as shown under your
devices in your Unifi controller interface.
First of all, in your unifi controller interface set the Monitor ip address to the IP of your docker host.
In the GUI go to Settings>System>Advanced>Monitor IP Address. You can' t do this step afterwards because your devices won't be able ping the unifi-controller.
The username and password of your Unifi devices is ubnt / ubnt.
Use info
to show the current status:
UAP-HD-IW-BZ.6.6.78# info
Model: UAP-HD-IW
Version: 6.6.78.15404
MAC Address: 74:ac:b9:1a:58:f5
IP Address: 192.168.1.40
Hostname: UAP-HD-IW
Uptime: 599 seconds
NTP: Synchronized
Status: Timeout (http://172.21.0.2:8080/inform)
UAP-HD-IW-BZ.6.6.78# set-inform http://192.168.1.45:8080/inform
You might get the following error:
$ ssh ubnt@192.168.1.47
Bad server host key: Invalid key length
Use this SSH command to temporary put your cryptography policies to LEGACY:
sudo update-crypto-policies --set LEGACY
After logging in you need to set-inform to http://<ip>:<port>/inform
UAP-HD-IW-BZ.6.0.19# set-inform http://192.168.1.45:9090/inform
Adoption request sent to 'http://192.168.1.45:9090/inform'. Use the controller to complete the adopt process.
Afterwards put your cryptography policies back to DEFAULT:
sudo update-crypto-policies --set LEGACY
You should see your devices online again.