Localhost api not working

I’m using the cloud version of n8n and when I make a request to localhost I get: “The service refused the connection - perhaps it is offline”. When I run the same request on a test site it get a 200 response. Any ideas on what it could be?

Hi there, by default your localhost can never be accessed online or outside your computer

You need to re route the localhost into an httpsusing something like ngrok

The reason why u can call the localhost when you test it with something like postman, is because the postman exists on your local computer, same with your localhost, so it has access to it

But the rest of the internet does not have access toit

Hope it answer your question

2 Likes

Yes, so as mentioned calling localhost from n8n cloud is basically calling n8ncloud instance, which obviosuly isn’t running ure 3001/api app I assume is running locally on your desktop, as mentioned ngrok could be used but esentially you need to port forward or use tunnel from localhost ie your laptop/desktop, this will give you unique url which outside services like n8n in cloud can access.

Hope that helps bit further too :slight_smile:

2 Likes

Got itttt. Thank you for the explanation :+1:

Thank you for your help!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.