Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://", "unix:///var/run/docker.sock"]}
  2. Add /etc/systemd/system/docker.service.d/override.conf

  3. Reload the systemd daemon:

     systemctl daemon-reload
  4. Restart docker:

     systemctl restart docker.service
Copy link

vincentgerris commented Jan 24, 2022

check logs, journalctl -xe. The options overlap, remove the , means all interfaces.

Copy link

h4r5h1t-hrs commented Jan 28, 2022

Follow this:

NOTE: Just change the IP from to and its work fine for Ubuntu ( for selenium dynamic grid)

Copy link

smblott-github commented Feb 1, 2022

I found that the docker daemon failed to start on reboot (only) with the approach described here. I never tracked down the source of the problem.

However, it did lead me to implement instead an alternative solution with socat:

exec socat -d TCP-LISTEN:2375,fork UNIX-CONNECT:/var/run/docker.sock


  • I used daemontools to launch this an keep it running (
  • You can protect the port with the range=... option to socat, or with IP tables or netfilter.

Copy link

Nakilon commented Apr 20, 2022

Does not work for Docker Desktop on Windows. It refuses bind to

Copy link

rcedillo45 commented Apr 27, 2022

I was having an issue to connect from another machine, turns out it was a firewall issue.
to fix I did:
ufw allow 2375/tcp
ufw reload
hopefully this helps someone.

Copy link

russellhoff commented May 12, 2022


Copy link

sithson commented May 19, 2022

👍 ✔️ 🙇‍♀️
I can also confirm this, very much GG @styblope, my rock star hero!1 :))))))


  • Linux Mint 20.3 Una x64
  • Docker version 20.10.16, build aa7e414
  • Docker Compose version v2.5.0

Copy link

sumitdhungana14 commented Aug 4, 2022


Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment