subnub/myDrive

Everytime I restart mydrive script, Password doesn't work

calebdatechguy opened this issue · 6 comments

Hey! So whenever i restart my server, or the myDrive script, it always has trouble with user passwords. Every time i restart, it seems to just "forget the password". I don't change anything in mongo, or anything on the file system either... so i have no clue why this could be happening...
https://gyazo.com/c549562ff5f52e85acba0b88d240da8f
There is a screenshot of the password incorrect page.

Is there any command for me to reset my password? I do not mind doing this, but I just hate to loose access to my files every time the script restarts...

Hope this can be figured out because I love this!
Thanks,
Caleb

What an odd issue... I’ve never heard of this one before haha. Whenever the server starts does it ask you to enter an encryption key first? The only thing I can guess is the encryption key is different so it throws an error trying to decrypt the password.

For some reason I cannot see the image, can you try to upload it again please?

Edit: Most likely because you tried to upload the image through a reply in your email

Okay yeah this def looks like it is caused by the encryption key. I think most likely you accidently typed in the wrong password when you first created/ran the server. Now whenever you restart the server you're putting in a different key. I probably should add some type of fail safe for this in the future.

Unfortunately you cannot recover a lost/forgotten key, unless of course you can somehow figure out what you typed in when you first created the server.

If you cannot figure it out, you will have to clear out the database and start over I'm afraid. When you run the setup again, I recommend choosing the option to enter the encryption key once instead of every time the server starts if it's causing you to much trouble. While this is less secure (anyone can check in your env file and see your key) it should be okay if you're just using it for personal use.

Let me know if you are having trouble figuring out how to reset your database, if you aren't too familiar with commands you could also manually delete them using a program like Robo3T or Compass.