How do I fix http://homeassistant.local:8123 not connecting on a Raspberry Pi 4?

Issue

Home Assistant UI (http://homeassistant.local:8123) won't load from the browser and connecting directly via the Pi's IP address also fails.

Probable Cause

Network name resolution (mDNS) or the Pi’s network connection/service crashed, or Home Assistant supervisor/core didn't start properly.

Solutions

SOLUTION 1:

First, try a normal reboot of the Pi and wait 5–10 minutes for Home Assistant to start.

SOLUTION 2:

If that doesn't help, attach a keyboard and HDMI display to the Pi, boot to the command line and restart Home Assistant services:

ha supervisor restart
ha core restart

Try connecting again using the .local name or the IP:

If you don't know the Pi's IP, open your router/modem settings (usually by entering the gateway IP in a browser, commonly 192.168.1.1 or 192.168.0.1) and check the "Devices", "Attached Devices" or similar list for a hostname like "homeassistant" or a Raspberry Pi MAC vendor; note the IP.

SOLUTION 3:

If it still won't connect, suspect a Wi‑Fi/router-to‑Pi issue: connect the Raspberry Pi to the router with an Ethernet cable, reboot the Pi, wait ~10 minutes for Home Assistant to fully boot, then try:

Note: In my case the Ethernet + reboot step restored access.