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.
| Port | Protocol | Name | What it is for |
|---|---|---|---|
| 2375 | TCP | Docker API (plain) | The Docker daemon REST API without TLS. |
| 2376 | TCP | Docker 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
- What port does MQTT use?
- What port does SSH use?
- What port does RDP use?
- What port does MySQL use?
- What port does PostgreSQL use?
- What port does SQL Server use?
- What port does Oracle use?
- What port does MongoDB use?
- What port does Redis use?
- What port does Memcached use?
- What port does Elasticsearch use?
- What port does DNS use?
Port 2375 in full · Port 2376 in full · Every service · All port numbers