Toolman

What port does Docker use?

Docker uses 2375 and 2376, and which one depends on what you are doing.

Plain and TLS. Exposing the plain one is equivalent to handing out root on the host.

PortProtocolNameWhat it is for
2375TCPDocker API (plain)The Docker daemon REST API without TLS.
2376TCPDocker API (TLS)The Docker daemon API with TLS client certificate authentication.

Exposing it

Exposing this is equivalent to handing out root on the host. It is one of the most scanned ports on the internet for exactly that reason. Use the Unix socket, or 2376 with client certificates.

Checking it is listening

sudo lsof -i :2375          # macOS, Linux
netstat -ano | findstr :2375   # Windows
nc -zv host 2375               # from elsewhere

An "address already in use" error on a port nothing appears to be holding usually means the socket is in TIME_WAIT rather than that a process has it — the ports reference covers that and the ephemeral range.

Frequently asked questions

What port does Docker use?

Docker uses ports 2375, 2376, and they do different jobs. 2375: The Docker daemon REST API without TLS. 2376: The Docker daemon API with TLS client certificate authentication.

Is port 2375 safe to expose to the internet?

Exposing this is equivalent to handing out root on the host. It is one of the most scanned ports on the internet for exactly that reason. Use the Unix socket, or 2376 with client certificates.

How do I check whether Docker is listening?

sudo lsof -i :2375 on macOS or Linux, netstat -ano | findstr :2375 on Windows. From another machine, nc -zv host 2375 says whether anything answers.

Other services

Port 2375 in full · Port 2376 in full · Every service · All port numbers