Directly Connect to the Docker API Remotely

I am trying to get Portainer to connect to the API on a remote host and am not having any luck. Portainer is running on a docker host and connects to the local Docker API without issue. If I add a new endpoint, select “Directly Connect to the Docker API”, enter for endpoint URL, and click add endpoint, I get the following error:

“Failure Get dial tcp connection refused”

I do have “Expose daemon on tcp://localhost:2375 without TLS” enabled on the remote host and I did restart Docker after enabling.

Does anyone know if this feature is working or if there are additional steps required to make it work?

From the host Portainer is running on try and issue the command docker -H info if this doesn’t work then TCP access is not working from the host.

You can refer to this issue and this thread for troubleshooting advice

You are correct. Running that command confirms the Docker API is not responding on the LAN IP address. It works fine with localhost or

Following the Docker docs, I tried adding several variation of “hosts”: [“tcp://”] to daemon.json, but Docker then fails to load. Guessing this is another networking feature only supported on Docker Linux hosts.

I also found some other references about creating a local environmental variable for DOCKER_HOST, but no clear direction on how to use it. Even the Docker documentation mentions it, but does not give an example of the exact syntax needed to use it in config.json.

Not sure this will work with Windows Docker hosts.

Try tcp://

See this discussion for more info.