Port 443 and 80 are both used while starting nginx

Hi,
First I got only a single point of url up and running using DuckDNS, everything worked flawlessly. Then I came up with the idea to use http at local network and https externally using duckpins + nginx. After configured nginx for the first time it started without any problems. The problem occurred after I rebooted HA for the first time after installed nginx. It won’t start after the reboot and says port 443 and 80 are both used.

System info:
Home Assistant 2023.2.3
Supervisor 2023.01.1
Operating System 9.5

Here is what I tried:

  • I’ve stopped all addons even rebooted and tried to start nginx as the only add-on → still the same error
  • I logged into ssh and did netstat which leads me to no clue. (Yes I used “sudo” as well)
➜  ~ sudo netstat -anpe | grep "443" | grep "LISTEN"                        
tcp        0      0 0.0.0.0:443             0.0.0.0:*               LISTEN      0          10087      -                   
tcp6       0      0 :::443                  :::*                    LISTEN      0          14402      -     
➜ sudo netstat -anpe | grep "80" | grep "LISTEN"
tcp        0      0 0.0.0.0:80              0.0.0.0:*               LISTEN      0          12771      -   
tcp6       0      0 :::80                   :::*                    LISTEN      0          12776      -      

I googled a lot and did my search for several days and still found no solution. Any idea/help is appreciated! Thanks!

If you are using Let’s Encrypt certificates and HTTP challenges, then port 80 would be reserved for this.

Hi Wally, thanks for the reply. How about port 443? Any idea which service or component could use this port? I am really confused…

Port 443 is HTTPS, so probably some kind of web server. :slight_smile:
Port 80 is HTTP, so also some kind of web server.

My problem was solved. I didn’t know what I did but port 443 and 80 are free now.