PortScan › Port guide › Port 8123

Port 8123 (Home Assistant): How to Open Smart Home Remote Access Safely

TCP 8123Home AssistantVideo & IoTExposure risk: Medium

Port 8123 is the Home Assistant web UI. It controls lights, locks and cameras, so plain HTTP on the internet is risky. Nabu Casa, TLS proxies, MFA and IP bans.

What is port 8123?

Home Assistant is an open-source home automation platform that controls the smart devices in your home from a single screen. The default port for its web interface and mobile app is 8123, and by default it serves plain, unencrypted HTTP.

Behind that screen sit your lights, boiler, door locks, garage door and cameras, and if you have installed add-ons (a terminal, a file editor and so on), it reaches all the way to the server's shell. There is a login, so an open 8123 does not mean instant compromise — but because the damage from a breach is your home, it deserves more care than other web services.

When it is normally open

Risks if it is open

Plaintext HTTP login

Forward 8123 as-is and your login password and access tokens cross the internet unencrypted. The moment you open the app on café Wi-Fi, someone on the same network can see them.

Control of the whole house

With a compromised account, an attacker can unlock doors, switch off security cameras and use occupancy sensors to learn when the house is empty. A leaked long-lived access token has the same result — treat tokens like passwords.

Platform vulnerabilities

Rare, but they happen. In March 2023 Home Assistant disclosed a critical authentication bypass vulnerability (CVE-2023-27482) affecting installations that use the Supervisor (Home Assistant OS and Supervised) and urged users to update. The more directly an instance is exposed to the internet, the less you can afford to delay updates.

Security checklist

How to check whether port 8123 is open

From outside (is it exposed to the internet?)

Whether your server or home router accepts port 8123 from the internet can only be confirmed by connecting from outside. A check from inside the same network bypasses the router's firewall and gives a different answer.

PortScan opens a real TCP connection from the Cloudflare edge and reports Open, Closed or Filtered. Members can scan every port on their own IP for free and other targets free once a day.

Check port 8123

On the server (what is listening?)

Windows (PowerShell):

netstat -ano | findstr ":8123 "
Get-NetTCPConnection -LocalPort 8123 -State Listen | Select LocalAddress,OwningProcess

Linux:

sudo ss -tlnp | grep ':8123 '

If it listens on 0.0.0.0 or [::] it is open on every network; 127.0.0.1 means only that machine can connect. To test port 8123 on a server from another computer, use Test-NetConnection server-address -Port 8123 on Windows or nc -vz server-address 8123 on Linux and macOS.

How to close or restrict port 8123

The best fix is to turn the service off or make it listen only on 127.0.0.1 (see the checklist above). If you need the service but must keep it off the internet, use a firewall.

Windows Firewall

# Administrator PowerShell
New-NetFirewallRule -DisplayName "Block TCP 8123" -Direction Inbound -Protocol TCP -LocalPort 8123 -Action Block
# To allow a single IP instead (block rules take precedence, so use this instead of the rule above)
New-NetFirewallRule -DisplayName "Allow TCP 8123 from office" -Direction Inbound -Protocol TCP -LocalPort 8123 -RemoteAddress 203.0.113.10 -Action Allow

Linux (ufw)

sudo ufw deny 8123/tcp
# Allow a single IP only
sudo ufw allow from 203.0.113.10 to any port 8123 proto tcp

On a cloud server, also check port 8123 in the security group (inbound rules), which is separate from the OS firewall. For services running in Docker, the rules Docker creates can bypass ufw, so binding the port to localhost with -p 127.0.0.1:8123:8123 is the reliable option.

Router

At home or in a small office, open the router's admin page and check whether port 8123 is in the port forwarding list, whether DMZ is enabled, and whether any program opened ports by itself through UPnP. If any of the three applies, port 8123 on your PC is directly visible from the internet.

How to read the scan result

The verdict can depend on where you connect from. Many ISPs (including most Korean ISPs) block some ports such as 135, 139 and 445 on their network, so the same server can look Filtered from inside that network and Closed from abroad.

FAQ

Is it fine if I forward a different port number instead of 8123?
Only the number changes — an unencrypted login page is still public. The Home Assistant login page reveals itself in its first response on any port. TLS and multi-factor authentication come first.
I put a reverse proxy in front and now get 400 Bad Request
This error commonly appears when the proxy server's IP is missing from trusted_proxies. The Home Assistant log records the rejected proxy address, so add that IP (or the Docker network range) and restart. It also uses WebSockets, so enable forwarding of the Upgrade header on the proxy.
1883 MQTT443 HTTPS554 RTSP (IP cameras / CCTV)8080 HTTP alternate port

Last updated 2026-11-04 · Use this guide to check systems you manage. Scanning systems without permission may carry legal liability.