Back to Port Numbers

2375 Docker-daemon TCP Flagship

Reference for TCP port 2375, commonly associated with Docker-daemon.

What it's for

Port 2375 is the default port for the Docker daemon's unencrypted remote API — used when you want to control a Docker host (create/start/stop containers, pull images, inspect running services) from another machine rather than only via a local Unix socket. Tools that manage Docker hosts remotely, or CI systems building containers on a separate build host, sometimes connect here.

Protocol basics

  • Protocol: TCP, carrying a REST API for essentially every Docker operation — container lifecycle, image management, network and volume configuration.
  • No authentication at the protocol level. Unlike most remote-access services, the plain Docker API on 2375 doesn't require a username or password by default — Docker's design assumes network-level access control is doing that job instead.
  • Full daemon control equals host control. Anyone who can talk to the Docker API can run a container with the host's filesystem mounted in, which is functionally equivalent to root access on the host itself — this isn't a niche escalation path, it's the API's normal, documented capability being used maliciously.
  • CI/CD systems are common legitimate users of this port, needing to build and run containers on a dedicated build agent — the risk isn't in the use case, it's in leaving it reachable beyond that specific, trusted caller.

Security considerations

  • This is one of the most actively exploited misconfigurations in cloud infrastructure. Automated botnets specifically scan the internet for exposed port 2375 and, upon finding one, immediately deploy cryptomining containers or establish persistent backdoors — this isn't a theoretical risk, it's a documented, ongoing, large-scale attack pattern.
  • Never expose port 2375 to the public internet, under any circumstances. There is no legitimate reason to accept this risk; use port 2376 with TLS client certificates if remote API access is genuinely required.
  • Prefer SSH-tunneled Docker contexts over exposing the API directly. Modern Docker supports connecting to a remote daemon over SSH (docker context create --docker "host=ssh://user@host"), which piggybacks on SSH's existing authentication rather than exposing a separate, weaker API surface.
  • If you must use the API remotely, use 2376 with mutual TLS, and additionally restrict access at the network/firewall level to only the specific hosts that need it — defense in depth, not either/or.
  • Audit cloud instances for accidentally-exposed Docker APIs. A shockingly common real-world incident pattern is a developer temporarily exposing 2375 for local testing/debugging and forgetting to close it before deploying — treat this as something to actively check for, not just something to avoid doing intentionally.

Troubleshooting

"Cannot connect to the Docker daemon" from a remote client:

  • Confirm the daemon is actually configured to listen on a TCP socket (-H tcp://0.0.0.0:2375 or the equivalent daemon.json setting) — by default, Docker only listens on its local Unix socket, and enabling the TCP port is an explicit, deliberate configuration change

Connects but commands fail with permission errors:

  • If TLS is enabled (port 2376), verify the client certificate is valid and correctly referenced — a mismatched or expired cert is the most common cause

Suspicious/unexpected containers appearing on a host:

  • Immediately check whether port 2375 has been inadvertently exposed to the internet — this is the single most common explanation for unauthorized containers appearing on a cloud instance, and should be treated as an active incident, not routine troubleshooting

CI pipeline can't reach the Docker daemon on a remote build host:

  • Confirm network-level access (VPN, private network peering, or security group rules) between the CI runner and the build host, and prefer the TLS-secured port 2376 or an SSH-tunneled context over reopening 2375

Comparison / FAQ

Port Protocol Key difference from 2375 (Docker daemon, unencrypted)
2376 (Docker daemon, TLS) TCP Same API, but requires mutual TLS client certificate authentication before accepting any command
6443 (Kubernetes API) TCP Controls an entire orchestrated cluster rather than a single Docker host, but shares the same "full API access equals full control" risk profile
22 (SSH) TCP Can be used to tunnel Docker API access safely (via Docker contexts), piggybacking on SSH's mature authentication instead of the API's own weaker security model

Why is port 2375 considered so dangerous compared to other exposed services?

Because gaining API access is functionally equivalent to gaining root access on the host — an attacker can run a container with the host filesystem mounted, breaking out of any container isolation entirely. Combined with zero built-in authentication, this makes it one of the most immediately exploitable misconfigurations that exists.

Is it ever acceptable to use port 2375 without TLS?

Only when strictly bound to localhost or a fully isolated, trusted internal network with no possibility of external reachability — and even then, port 2376 with TLS is the safer default that costs little extra to set up.

How do attackers actually find exposed Docker APIs?

Through routine, automated internet-wide scanning for open port 2375 — this is one of the most heavily scanned "high value" ports precisely because the payoff (root-equivalent host access with zero authentication) is so significant relative to the effort required to find one.

What's the safest way to manage a remote Docker host?

Docker contexts over SSH are generally the best option for most teams — you get remote daemon control without exposing a separate network-facing API at all, since all traffic tunnels through an already-authenticated SSH connection.