Sometimes it can happen to even the most prepared of users to lose their Portainer password. If this happens, if you do not have a Backup of Portainer, the only solution left is to reset your current Portainer password. In this step by step guide I will show you how to reset the password in Portainer and get access again.
STEP 1
Please Support My work by Making a Donation.
STEP 2
Open Docker or Container Manager. On the left sidebar click Container. Right click on your Portainer instance, then click Stop. Follow the instructions in the image below.
STEP 3
Go to Control Panel / Task Scheduler / Create / Scheduled Task / User-defined script. Follow the instructions in the image below.
STEP 4
Once you click on User-defined script a new window will open. Follow the instructions below:
- General: In the Task field type in “Portainer Password Reset“. Uncheck the “Enabled” option. Select root User.
- Schedule: Select Run on the following date then select “Do not repeat“.
- Task Settings: Check “Send run details by email“, add your email then copy paste the code below in the Run command area. After that click OK.
docker run -d --name=portainer-reset \ -v /volume1/docker/portainer:/data \ portainer/helper-reset-password
STEP 5
After you click OK on STEP 4 a new warning pop up window will open. Click OK.
After you click OK, type in your DSM Password then click Submit. Follow the instructions in the image below.
STEP 6
After you click Submit at STEP 5, select your “Portainer Password Reset” Task then click the “Run” tab. You will be asked to run Portainer Password Reset – click OK. Follow the instructions in the image below.
STEP 7
Go back to STEP 1 or you will deal with karma 🙂
STEP 8
Open Container Manager or Docker. On the left sidebar click Container. Select your portainer-reset instance, then click the Details tab. Follow the instructions in the image below.
STEP 9
Click the Log tab, then Export. Click HTML. Follow the instructions in the image below.
STEP 10
From the HTML file that you have previously downloaded at STEP 9, copy your new auto-generated Portainer password and your username. Follow the instructions in the image below.
STEP 11
Open Docker or Container Manager. On the left sidebar click Container. Right click on your Portainer instance, then click Start. Follow the instructions in the image below.
STEP 12
Access your Portainer instance at YourNASIP:9000 Type in your own Username and your auto-generated Password that you have previously downloaded at STEP 10. Click Login. Follow the instructions in the image below.
STEP 13
Go back to STEP 1 or you will deal with karma 🙂
STEP 14
At the top right of the page, click on your username then My account. Follow the instructions in the image below.
STEP 15
Change your current auto-generated password with your own password, then click Update password. Follow the instructions in the image below.
STEP 16
Open Container Manager or Docker. On the left sidebar click Container. Right click on your portainer-reset instance, then click Delete.
STEP 17
Enjoy your Portainer!
This post was updated on Sunday / February 25th, 2024 at 10:15 PM