Enabling Docker Remote API on Ubuntu

If you need to enable the remote API on an Ubuntu 14.04 based system for Docker, you need to do the following, edit the file located at:


and just under the line that contains something like:

# Use DOCKER_OPTS to modify the daemon startup options.
# DOCKER_OPTS="--dns --dns"

add in your own entry. For example, if you want to listen on, port 4243:

DOCKER_OPTS="-H tcp://"

Then restart docker using:

service docker restart

Confirm it’s now running by pointing your browser at which should return some JSON with image names. You’ll need to set the environment variable for the docker CLI command as well, this should work for you:

export DOCKER_HOST=tcp://

Then restart your shell and it should work as usual.

Tip: If you’re using New Relic to monitor Docker containers, you’ll need this turned on for it to work properly.