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

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").

OctoPrint 1.3.12+

  • SSH into your machine
  • Activate the virtual environment. On OctoPi: source ~/oprint/bin/activate
  • Run 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 test for changing the password of the user named test. It will prompt you for a new password and then set it on the user.
  • Restart OctoPrint for your changes to take effect, using sudo service octoprint restart or similar.

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:

  • 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 access control 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

Where should I run these commands?
rm ~/.octoprint/users.yaml
sed -i -e 's/firstRun: false/firstRun: true/g' ~/.octoprint/config.yaml
sudo service octoprint restart

1 Like

You have to connect to the RasPi via SSH (e.g. with PuTTy)


I tried to do this tonight and the first time setup wizard does not run. It just sits there with normal home page but all the details are blank and there is a login button on the top right that does nothing when I click it. I have rebooted several times.

Edit: Figured it out, emberassingly, answer below for anyone dumb enough to make my mistake.

1 Like

Did you try to reset your browsers cache or to use another browser?

So I am willing to admit to being an IDIOT. This might be a suggestion for Foosel though. So I am out of town and was connecting to my printer instances through a remote connection to the server I have running at home. Well I I had forgotten that while I was trying to get around some dumb stuff on another site I diasbled javascript. I'm an idiot. I figured it out when I went to try clearing cache and I saw that it was disabled..

Now for the suggestion for Gina. Octoprint's behavior when you have javascript disabled doesn't do a good job of indicating that your problem is related to javascript.. It might be worthwhile to have a warning modal when javascript is disabled. Don't believe me? Disable javascript and try to connect, it's non obvious. But since this isn't a machine I actually do any browsing on I didn't notice that it was disabled because I almost never use the browser for anything other than my octoprint servers.

I give you permission to make fun of me.


"HA... HA...!" /NelsonMuntz /Simpsons

(It's entirely possible that I would have still said that without your permisson.)

How about... here:

  <noscript>Hey tenthrow, turn on JavaScript!</noscript>

Will be in 1.4.0.

edit and @OutsourcedGuru was close:


This is a great suggestion. Thank you!

can anyone just give straight answer? forgot my password how do i reset it if i have no access to the pi 3bplus

1 Like

You need access to the Pi in order to reset your password.

Hi everyone,

Same issue as the start of this thread, all was working well and now my browser won't accept my login and password. My RPI logs in perfectly fine with these. I tried both solutions provided to change the password, to no avail. Is there a way to just disable these?

Did you by any chance add a second OctoPi to your network?

This is not working on 1.8.4. I am stuck trying to log int there.

As pi user get permission denied.

pi@octopi:~ $ oprint/bin/activate
-bash: oprint/bin/activate: Permission denied

pi@octopi:~ $ sudo /home/pi/oprint/bin/activate
sudo: /home/pi/oprint/bin/activate: command not found

I find the file but it is not marked executable.

pi@octopi:~ $ sudo ls -la /home/pi/oprint/bin/activate
-rw-r--r-- 1 pi pi 2074 Jan 10 2021 /home/pi/oprint/bin/activate

what's a poor confused senior citizen to do?

it's source ~/oprint/bin/activate :slight_smile:

Ahem. And so it is, so it is. Thanks for the illumination.

Actually, I did not forget the password, it seems to have changed after I did octoprint_deploy.sh remove while testing. That's another story,.

1 Like