Cluster-init mandatory argument

I am trying to automate cluster initialisation where I am running cluster-init using automation.

I am facing an issue that cluster-init has a mandatory argument --cluster-password and providing this password in command line is a security vulnerability where the password is visible in process tree and it gets stored in bash history as well.

Is there any other way to provide such arguments?

The couchbase module for org.testcontainers may satisfy your needs. Or the code may show how to programmatically initialize a cluster.

Most of the couchbase operations have a corresponding REST API. Check the REST API documentation for a cluster-init.


1 Like

@dh @mreiche
Thanks for the update. But, using the curl command mentioned in the documentation, the password would still come in bash history.

Perhaps, I should clarify, I am writing a bash script for the automation. So, to access REST API, I would have to use curl which requires the data mentioned above in the command line itself.

But you don’t have to pass curl’s data on the command line. See the curl manual pages - notably the use of -d @/path/to/file for passing data. (Ref:

And if you use -d @ - it reads from STDIN.


Hi, thankyou so much for the quick response. This turns out to be helpful.
But, I just want to confirm one quick thing, I could not find any clusterInit api for couchbase 6.6.

Is it some workaround available for this?

For 6.6 please refer to:


This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.