I forgot my OctoPrint password, how can I reset it?

general

#1

You'll need to do this via the command line (e.g. by SSHing into your Pi or other machine that OctoPrint is installed on).

If you only have a single user set up

If you only have a single user setup in OctoPrint for which you forgot the password, the easiest way is simply resetting OctoPrint's user database and run the first time setup wizard again. The steps involved boil down to this:

  • remove ~/.octoprint/users.yaml
  • in ~/.octoprint/config.yaml replace firstRun: false with firstRun: true
  • restart the OctoPrint server and reload, you should be prompted to run the first time setup wizard again

If you are running OctoPi, you can use these commands to do all that:

rm ~/.octoprint/users.yaml
sed -i -e 's/firstRun: false/firstRun: true/g' ~/.octoprint/config.yaml
sudo service octoprint restart

:spiral_notepad: Note:

If you have the OctoPrint server installed on Windows, the location of the files will be %APPDATA%\OctoPrint\users.yaml and %APPDATA%\OctoPrint\config.yaml. If you have it installed on MacOS, the locations will be ~/Library/Application\ Support/OctoPrint/users.yaml and ~/Library/Application\ Support/OctoPrint/config.yaml.

If you have multiple users set up

If you have multiple users configured which you don't want to lose, you have two options:

  1. If you have another user that's configured with admin rights, ask them to reset your password via "Settings" > "Access Control"
  2. If you are the only admin user, do the following:
    • make a backup copy of users.yaml, e.g.: cp ~/.octoprint/users.yaml ~/.octoprint/users.yaml.bck
    • run the first time setup wizard again like explained above
    • open the the newly created users.yaml in a text editor - there will only be one entry, your new admin account, copy all of those lines
    • open the backed up version of users.yaml in a text editor, locate your user account therein and replace all its lines with those you just copied from the newly created users.yaml
    • delete the newly created users.yaml and rename your backup version - now modified with your new credentials - into users.yaml again, e.g. mv ~/.octoprint/users.yaml.bck ~/.octoprint.users.yaml
    • restart OctoPrint, you should then be able to login with your new password

Cant login to my OctoPrint
Forgot username
How to Set Password on Octoprint
Octoprint Registration