Couldn’t connect with these settings please help

I installed n8n locally, but I keep encountering this error. Whenever I try to add API credentials, such as OpenAI, DeepSeek, or any other API, I always get the message: “Couldn’t connect with these settings. More details.” even after entering the correct information.

Here’s a screenshot of the issue: Screenshot by Lightshot.

However, when I try the same setup on my VPS server, it works without any errors.

Additionally, I see the following output in my CMD:

Editor is now accessible via:
http://localhost:5678

Press "o" to open in Browser.
The service refused the connection - perhaps it is offline.
connect ECONNREFUSED 127.0.0.1:443
connect ECONNREFUSED 127.0.0.1:443
The service refused the connection - perhaps it is offline.
connect ECONNREFUSED 127.0.0.1:443
connect ECONNREFUSED 127.0.0.1:443

How can I fix this issue? Thanks!

hello @ice_price

How is your n8n configured?

npm install -g n8n
is all i did after the install i press o to open in the browser, i didn’t do any other configuration

did you figure this out? i’m having the same problem

I’m having the same issue
any update /fix ???

UPDATE:
It looks like I was behind a firewall ,
the problem was fixed after I change my Connection

The 443 port needs HTTPS use. Try it.