Initialize a Node

A new Couchbase Server node can be initialized, to establish node-specific paths for local storage.

Understanding Initialization

Following installation and start-up of Couchbase Server, a node must be:

  • Initialized, whereby its disk-paths for data, indexes, and analytics are established.

  • Provisioned, whereby all other details, including Full Administrator credentials, service assignments, and memory quota-definitions are established.

Optionally, initialization can be performed explicitly and independently of provisioning, as a prior process, in order to establish custom disk-paths. When the node is subsequently provisioned, these are preserved (unless, as is possible with UI-based provisioning, they are optionally overwritten, and the node is thus re-initialized).

If initialization is not explicitly performed, it will occur as part of the eventual provisioning process, and default disk-path values will be applied.

Note that disk-paths cannot be changed after a node has been provisioned, and has thus either become a cluster of one node, or has been added to a cluster of other nodes.

Examples on This Page

The examples in the subsections below show how to initialize the same node; using the CLI, and the REST API respectively. Note that UI-based initialization only be performed as part of the overall provisioning process.

The examples assume:

  • Couchbase Server has been installed and started.

  • The IP address of the node is

Initialize a Node with the CLI

To initialize a node with the CLI, use the node-init command, as follows:

couchbase-cli node-init -c \
-u placeholdername -p placeholderpwd \
--node-init-data-path /home/vagrant/dpath \
--node-init-index-path /home/vagrant/ipath \
--node-init-analytics-path /home/vagrant/apath

This initializes the disk-paths for data, indexes, and analytics on node to the values shown. Note that the command requires that a username and password be specified, although the node has not yet been provisioned with credentials. Placeholders are therefore provided: these can be overwritten during subsequent provisioning.

If successful, the operation returns the following:

SUCCESS: Node initialized

For more information, see the reference for the node-init command.

Initialize a Node with the REST API

To initialize a node with the REST API, use the '/nodes/self/controller/settings' URI, as follows:

curl  -u Administrator:password -v -X POST \ \
-d 'data_path=/home/vagrant/dpath' \
-d 'index_path=/home/vagrant/ipath' \
-d 'cbas_path=/home/vagrant/apath'

This initializes the disk-paths for data, indexes, and analytics on node to the values shown.

For more information on /nodes/self/controller/settings, see Creating a New Cluster.

Next Steps

Following initialization, a node can be provisioned so as to become a Couchbase Cluster of one node. See Create a Cluster for details.