How to change the default admin password?
-
Maybe I am missing something obvious, but I don't see how to change the default admin password.
This link says to use a postgre user but that user does not exist in the cloudron web terminal.
-
Maybe I am missing something obvious, but I don't see how to change the default admin password.
This link says to use a postgre user but that user does not exist in the cloudron web terminal.
@OrezBodajoy
It is always good to check the official documentation for an app.
But in this case, it is a bit misleading.
Since you are using Cloudron, the PostgreSQL access is different.Creat an app backup first.
If you are in the web terminal of your Invidious app, look to the top right corner.
There is a big green button labeledPostgres
.
You can just click that button and confirm withENTER
. Then you are logged into your Invidious PostgreSQL database.From the official documentation you still need to do:
python3 -c 'import bcrypt; print(bcrypt.hashpw(b"<INSERT PASSWORD HERE>", bcrypt.gensalt(rounds=10)).decode("ascii"))' # python mkpasswd --method=bcrypt-a -R 10 # mkpasswd
Now you have your new password hash.
Connect to your PostgreSQL database with the described button or copy and paste the following into your web-terminal (the button will print the same into your web terminal):PGPASSWORD=${CLOUDRON_POSTGRESQL_PASSWORD} psql -h ${CLOUDRON_POSTGRESQL_HOST} -p ${CLOUDRON_POSTGRESQL_PORT} -U ${CLOUDRON_POSTGRESQL_USERNAME} -d ${CLOUDRON_POSTGRESQL_DATABASE}
Now you should be able to update the password:
UPDATE users SET password = 'HASH' WHERE email = 'USERNAME';
I will request an update of the Cloudron documentation for Invidious to include the password reset with the Cloudron way to do it.
Thanks for reporting this missing documentation and please report back if everything worked out on your part.~Cheers