Reset Portainer admin Password in Linux

Reset Portainer admin Password in Linux

When the first time connected to Portainer dashboard, we need to create administrator user. If you forgot admin password, you can reset it by using a commands.

This tutorial explains how to reset Portainer admin password in Linux. Commands have been tested on Ubuntu 20.04 LTS.

Reset admin password

If Portainer is installed in Docker container, we can use a password resetting tool named portainer/helper-reset-password.

First, we need to determine Portainer container ID. So get a list of Docker containers:

docker ps

You will need to find a line similar to the following:

f10293ed1238  portainer/portainer-ce  "/portainer"  25 minutes ago  Up 21 minutes  portainer

In our case, container ID is f10293ed1238.

Stop Portainer container by ID:


Run the following command to reset admin password:

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

If everything is good, the output should look like this:

2021/10/26 01:21:52 Password succesfully updated for user: admin
2021/10/26 01:21:52 Use the following password to login: k(3r21&tBp7Pvm`]T-^0Kj5)@VnRML46

Start Portainer container again:


The portainer/helper-reset-password image is no longer needed, you can remove it:

docker rmi portainer/helper-reset-password

Now you can log in to the dashboard with admin username and new password.

Leave a Comment

Cancel reply

Your email address will not be published.