Skip to content

Reset password for the Admin user

It can happen to anyone, admin passwords get forgoteen and lost all the time. If this ever happens to your Portainer admin, you can follow these steps to reset it.

Resetting Admin password in Portainer running as container

Reset the password for the Admin user can be accomplished using our reset password container helper.

First, stop the Portainer container by running:

 docker stop "id-portainer-container"

Run the helper with the following command. Be advised that you need to mount the Portainer data volume.

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

If successful, your output should look like this:

2020/06/04 00:13:58 Password successfully updated for user: admin
2020/06/04 00:13:58 Use the following password to login: &_4#\3^5V8vLTd)E"NWiJBs26G*9HPl1

Start the Portainer container running and try login with the password generated:

docker start "id-portainer-container"

Resetting Admin password in Portainer running as a stack/service

To reset the password of the Admin user in Portainer running as Stack or Service, we need to scale the Portainer service to zero. To do this, you can run the following:

docker service scale portainer_portainer=0

Run the helper using the same bind-mount/volume for the data volume:

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

If successful, your output should look like this:

2020/06/04 00:13:58 Password successfully updated for user: admin
2020/06/04 00:13:58 Use the following password to login: &_4#\3^5V8vLTd)E"NWiJBs26G*9HPl1

Start the Portainer service scaling up and try login with the password generated:

docker service scale portainer_portainer=1

Notes

Contribute to these docs.