Homey Bridge keeps going back to blinking blue on Self-Hosted Server? Check your firewall.
I run Homey Self-Hosted Server in Docker on a Linux box. When I set up my new Homey Bridge, this kept happening:
- The app found the Bridge over Bluetooth.
- The Bridge joined my Wi-Fi.
- The app said “Checking for update.”
- A few seconds later, the Bridge started blinking blue again, like it was brand new.
- The app waited a long time and then gave up.
What was wrong
My server had a firewall. It blocks everything unless you say “this is OK.” I had never told it Homey was OK.
The Bridge was trying to talk to the server on port 4861. The firewall threw those messages away without saying anything. The Bridge kept knocking, nobody answered, and it gave up. Then it went back to setup mode.
The Wi-Fi was fine. The app was fine. The server was fine. Only the firewall on the Linux box was in the way.
How to check
On the Linux server, run:
sudo iptables -S INPUT
If the first line says -P INPUT DROP and you do not see ports 4859 to 4862 anywhere, this is probably your problem.
How to fix it
Change 192.168.1.0/24 to match your home network:
sudo iptables -I INPUT -s 192.168.1.0/24 -p tcp --dport 4859:4862 -j ACCEPT
sudo iptables -I INPUT -s 192.168.1.0/24 -p udp --dport
To keep the rules after a reboot (Debian or Ubuntu with
sudo netfilter-persistent save
If you use ufw instead:
sudo ufw allow from 192.168.1.0/24 to any port 4859:486
sudo ufw allow from 192.168.1.0/24 to any port 5353 proto udp
What the ports are for
- 4859: the Homey web page (HTTP)
- 4860: the Homey web page (HTTPS)
- 4861 and 4862: where the Bridge connects to the server
- 5353 (UDP): lets devices on your network find Homey
One more tip
If the Bridge connects but the server says “Homey Bridgy Resetting…”, don’t worry. That only means the old setup timed out first. Start the setup again from the beginning and it should work.
After the fix, my Bridge connected right away. The light turned rainbow while it updated its firmware. Hope this saves someone a few hours!