How to call a local API from the self-hosted local deployment

Hello,

I am testing the local deployment of the self-hosted version of retool and I am into trouble to connect to a local API that runs on 0.0.0.0:4000. How can I call a local API, for the self hosted version in a local deployment.

I would like to avoid using ngrok because, I'd like to deploy my app in a private network in the future on AWS.

Thanks

Hello @Christelle_Marfaing , welcome,

Where is the api located? In the same docker stack? In a separate container? Or on the host?

For the moment there are 2 separate dockers. My API is locally running on 0.0.0.0:4000 while retool is on 0.0.0.0:3000.

Containers can not acces each other unles you create a separate network between both containers. The containers are by default also not able to connect to the host. See the docker networking documentation how you can achieve this.

1 Like

Hello, I found the answer. I just needed to use the following host : host.docker.internal. Thanks for your help