Skip to main content

Steps to Reset Portainer Administrator Password

Prerequisites

  1. Open the SSH terminal of your TNAS.
  2. Ensure that Portainer has been stopped in the TNAS App Center (must be stopped, otherwise the database file is locked and the reset will fail).

Steps

1. Locate your Portainer data directory

First, find the Portainer data folder which contains portainer\.db.

Run the following command:

find /Volume1/@apps/Portainer -name "portainer.db"

After execution, you will see output similar to:

/Volume1/@apps/Portainer/portainer.db

Note down the path prefix /Volume1/@apps/Portainer – this is your data directory.

2. Execute the official reset command

Replace /path/to/portainer in the command below with the data directory path you found in the previous step, then copy and run it in the terminal:

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

For example:

If your data directory is /Volume1/@apps/Portainer, the full command is:

docker run --rm -v /Volume1/@apps/Portainer:/data portainer/helper-reset-password

3. Get the new password

After executing the command, the terminal will output something like:

2025/04/22 12:00:00 Password successfully updated for user: admin
2025/04/22 12:00:00 Use the following password to login: aBcD1234!@#$
  • The first line indicates a successful reset.
  • The second line's aBcD1234!@#$ is the temporary new password – copy it!

4. Start Portainer and log in

  1. Return to the TNAS App Center and restart Portainer.
  2. Open the Portainer web page (default address: http://your_TNAS_IP:9000).
  3. Enter admin as the username, paste the temporary password you copied from the previous step, and you can log in.
  1. After logging into Portainer, click the user avatar in the top right corner.
  2. Select My AccountChange Password.
  3. Enter the temporary password, set your own new password, and save.

Frequently Asked Questions

1. Why do I need to stop Portainer first?

Because Portainer locks the portainer.db file while running; the reset tool cannot modify it. Once stopped, the file is released and the reset can succeed.

2. Will my previously created users and configurations be lost after the reset?

This operation only resets the admin account password. It does not delete or modify other users, runtime environments, template files, or any system configuration parameters.

3. The command returns docker: command not found?

This means Docker Engine is not enabled on your TNAS. Go to the TNAS App Center, install and enable Docker Engine, then run the command again.

4. No password output after executing the command?

  • Check if the data directory path is correct.
  • Confirm that Portainer has completely stopped.
  • Run the command again.