This page explains how to reset Portainer password. This guide has been tested on portainer installed according to this page.
Before reseting the password, we have to stop the Portainer container:
docker container stop portainer
Reset the Portainer password with the following line. This line runs the container (portainer/helper-reset-password). This container reset the password in the Portainer volume (where Portainer persistent data are stored).
docker run --rm -v portainer_data:/data portainer/helper-reset-password
The container should display the new password:
2022/12/28 14:07:29 Password succesfully updated for user: admin 2022/12/28 14:07:29 Use the following password to login: Y*!o}7wF+^95K?h3_/EG2WSurI08exN1
Keep (note or copy) the password for the next step.
Restart Portainer with the following command:
docker start portainer
Open Portainer in your browser and log in with the new password.
Navigate in the user section of Portainer to change the password.