Thursday, February 1, 2024

Change the portainer admin password


Change the portainer admin password

If you need to change the Portainer admin password, follow these steps:

1. Stop the Portainer container by running the following command, replacing "ID" with the first four characters of the Portainer container ID:

docker stop ID


2. Pull the password reset container image:

docker pull portainer/helper-reset-password


3. Run the helper container, mounting the Portainer data volume:

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


If successful, you will see a message indicating that the password has been updated for the admin user, along with the new password:

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


4. Restart the Portainer container:

docker start ID


Log in to Portainer using the new password provided in step 4. Once logged in, you can change the password back to your desired password by clicking your profile icon, selecting "My Account," and resetting the password as needed