If you’ve forgotten your Portainer admin password, you won’t have to redeploy the platform because there’s a handy tool to help you reset it. The tool in question comes by way of a Docker container, created by Portainer, for this very task. Let me show you how it’s done.

The first thing you must do is stop the running container. Log into your server, and locate the Portainer ID with the command:

docker ps.

You should see a listing for Portainer with an associated ID. Stop that container with:

docker stop ID

Where ID is the first four characters of the Portainer ID.

Next, you must pull the image designed to reset the password with the command:

docker pull portainer/helper-reset-password

Once the image has pulled, reset the password with the command:

docker run --rm -v portainer_data:/data portainer/helper-reset-password

After the command completes, you’ll see in the output a new password to use for the admin login. Copy that password and restart the Portainer container with:

docker start ID

Where ID is the first four digits of the container ID.

Paste the copied password into the Portainer prompt, and you’re good to go. You can change the password back to whatever you need by clicking your profile icon | My Account and then resetting it as needed.

Subscribe to TechRepublic’s How To Make Tech Work on YouTube for all the latest tech advice for business pros from Jack Wallen.

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays

Subscribe to the Developer Insider Newsletter

From the hottest programming languages to commentary on the Linux OS, get the developer and open source news and tips you need to know. Delivered Tuesdays and Thursdays