How do I reset the password for Couchbase web administrative console?

I forgot the password for the web console. How do I reset the password? I am on Windows.

Acutally the password seems to be saved in plain text in config.dat file! Is this really a good practice?

The password can be changed using the couchbase-cli tool.

shell> ./couchbase-cli cluster-init -c --user=[CURRENT_USERNAME] --password=[CURRENT_PASSWORD] --cluster-init-username=[NEW_USERNAME] --cluster-init-password=[NEW_PASSWORD]

More details about the couchbase-cli tool can be found here:

Dipti: changing the password is different from resetting it though. I thought that’s what was being asked about.

One current workaround having to reset the password is to stop the current server, copy out (or just cp -l) data files, uninstall, install, set up, cp -l data files back and create again the same bucket(s). It will honor the data files there.


i have tried that and looks like they read a command like bash. Here is the output

./couchbase-cli cluster-init -c localhost:8091 --user=Administrator --password=c3nt0s!2345 --cluster-init-username=administrator --cluster-init-password=golive
-bash: !2345: event not found

Please help me regarding this…is my command is right?or is it not?

You’ll probably need to escape that ‘!’ in your password.

Path: /opt/couchbase/bin

Command: ./erl -noinput -eval ‘case file:read_file("/opt/couchbase/var/lib/couchbase/config/config.dat") of {ok, B} -> io:format("~p~n", [binary_to_term(B)]) end.’ -run init stop | grep cred


userid is "a"
password is “passwd”