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 - note that the password for SSHing into the Pi is not the one you use to access OctoPrint's web interface, on OctoPi it defaults to the username "pi" and password "raspberry").
- SSH into your machine
- Activate the virtual environment. On OctoPi:
octoprint user password <user>with
<user>being the name of the user for whom you want to reset the password, e.g.
octoprint user password testfor changing the password of the user named
test. It will prompt you for a new password and then set it on the user.
OctoPrint earlier than 1.3.12
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 access control wizard again. The steps involved boil down to this:
- 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
If you have the OctoPrint server installed on Windows, the location of the files will be
%APPDATA%\OctoPrint\config.yaml. If you have it installed on MacOS, the locations will be
If you have multiple users set up
If you have multiple users configured which you don't want to lose, you have two options:
- If you have another user that's configured with admin rights, ask them to reset your password via "Settings" > "Access Control"
- If you are the only admin user, do the following:
- make a backup copy of
cp ~/.octoprint/users.yaml ~/.octoprint/users.yaml.bck
- run the access control wizard again like explained above
- open the the newly created
users.yamlin 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.yamlin a text editor, locate your user account therein and replace all its lines with those you just copied from the newly created
- delete the newly created
users.yamland rename your backup version - now modified with your new credentials - into
mv ~/.octoprint/users.yaml.bck ~/.octoprint.users.yaml
- restart OctoPrint, you should then be able to login with your new password
- make a backup copy of