How to enable docker remote API on docker host?

Steve Mak
Steve Mak
Apr 30, 2018 · 1 min read
  1. Navigate to /lib/systemd/system in your terminal and open docker.service file
    vi /lib/systemd/system/docker.service
  2. Find the line which starts with ExecStart and adds -H=tcp:// to make it look like
    ExecStart=/usr/bin/dockerd -H=fd:// -H=tcp://
  3. Save the Modified File
  4. Reload the docker daemon
    systemctl daemon-reload
  5. Restart the container
    sudo service docker restart
  6. Test if it is working by using this command, if everything is fine below command should return a JSON
    curl http://localhost:2375/images/json
  7. To test remotely, use the PC name or IP address of Docker Host

Steve Mak

Written by

Steve Mak

Front end developer & Technical writer

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade