Troubleshooting unauthorized for Droplet setup

Posted March 22, 2021 321 views
DockerDigitalOcean Droplets

I have been trying to resolve the following issue. Maybe someone could point me to additional documentation or some other setup step.

I have a droplet created with some basic setup. Docker is installed. The DigitalOcean command line tools are installed. I went through the following setup which includes commands for doctl auth list, auth init, and auth switch so that I can see and use/verify my registry: I have an API key that appears to be set up. However, after doing all that, I am stuck when trying to do a docker run command:
docker run -p 8089:8089 [private repo URL]
The error that comes up is:
“Error response from daemon: Get [private repo URL]: unauthorized: authentication required.”

The private repo URL is valid. Using the root user. Should I use a different user? I did look for documentation on user setup but could not find it. Sorry, if I missed it.

One thing to note is that I am not using Kubernetes integration yet. I am trying verify a basic docker run before I expand this setup with Kubernetes integration.

I was able to run the above docker command locally so I am trying to replicate this on the droplet. What am I missing?

Any assistance is greatly appreciated! Thanks in advance.

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer


I encountered the same problem being logged in to sudoer account and messed things up running doctl and docker with different privileges (user/root). I ran doctl as a regular user, and docker as a root. It was like that:

doctl registry login
Logging Docker in to
sudo docker run
Unable to find image '' locally docker: Error response from daemon: Get unauthorized: authentication required. See 'docker run --help'.

Everything started running fine when I set up doctl authentication with sudo command, and used it consequently since then.

I hope it gives you some clue.