Homey Bridge constantly flashing blue (FIXED!)

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:

  1. The app found the Bridge over Bluetooth.
  2. The Bridge joined my Wi-Fi.
  3. The app said “Checking for update.”
  4. A few seconds later, the Bridge started blinking blue again, like it was brand new.
  5. 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!

For anyone reading this: only change the Linux server’s firewall!

Never disable your router’s firewall, that it very dangerous since it would allow anyone to access your network, and it won’t fix any issues either

Whoa! Good call, Sven.

My linux server sits in my home behind my router’s firewall. The self-hosted Homey server runs on it…so that’s where the firewall changes were needed.

Nice catch.

Typo?
Portrange should read 4859:4862 I think :wink: