Allow external connections in dev environment

Hi all!

I’m building an integration that needs latitude and longitude from device trackers. In order to have some testing data, I want to connect a phone to my dev hass instance (setup with docker dev environment — running on a Intel Mac with latest macOS , if it matters).
The problem is that it seems to accept connections only from 127.0.0.1 instead of 0.0.0.0 .

I’ve looked it up in devcontainer.json , Dockerfile, Dockerfile.env but seems I cannot figure out where it this restriction comes from or where I can open up the connection acceptance.

How can I make this work?

Hey,

I know this is a bit old but I just ran into the same issue you were facing. Just in case you still needed an answer here’s how I managed to get it to work.

In your devcontainer.json file change your app port to this…

"appPort": ["8123:8123"],

The ports are like this [“host:container”] so you can change the port that’s exposed on your machine.

1 Like