I have an API hosted on my server that can only be accessed locally, and it is purposefully blocked by the firewall. I would like to be able to access and use this API in n8n, which is available publicly.
I assume the problem is that n8n runs in Docker. So when try to reach localhost within n8n it will be the the Docker host instead of your host.
Does that other API also run within Docker? In this case you have to make sure they are in the same network. If the API is running directly on your server, without Docker, you have to add the following to your docker-compose file: