ether / etherpad-lite

Etherpad: A modern really-real-time collaborative document editor.
http://docs.etherpad.org/
Apache License 2.0
16.14k stars 2.8k forks source link

How to change the admin password with Etherpad Lite that runs inside a docker container? #6205

Closed q2apro closed 4 months ago

q2apro commented 4 months ago

This is not a bug report, but I need help on this. It cannot be so hard...

I have Etherpad running inside a docker container.

I set up the docker with:

docker run -d --name=etherpad --restart=always --network=host \
-e ADMIN_PASSWORD=pw12345 \
-e DB_TYPE=postgres \
-e DB_USER=postgres \
-e DB_PASS=pw12345 \
-e DB_NAME=etherpad \
-e DB_HOST=127.0.0.1 \
etherpad/etherpad

When opening the website under /admin/ I need to login accordingly:

admin login popup

Now I would like to change the admin password pw12345 to a safer password.

I can open the website under /admin/settings and find the content of settings.json there. One line says "password": "${ADMIN_PASSWORD:null}", but as I understand, this is the user management of Etherpad itself.

I assume the "login admin" password is set somewhere else.

How to change the admin password?


Sidenote: ChatGPT suggested to remove the docker and reinstall. Is this really the only way?!

q2apro commented 4 months ago

By the way, this changes the root password of the running docker container (but not the login prompt)

docker exec -itu 0 etherpad passwd

Then assign the new password. But this docker password is not the password for the Etherpad admin login.

q2apro commented 4 months ago

Indeed, the solution is to change the line "password": "${ADMIN_PASSWORD:null}", inside the admin/settings to something like:

"password": "thenewrandompassword",
is_admin": true

This password is valid for the admin login on the website.