leave-cluster
- Last Updated: April 14, 2026
- 1 minute read
- MarkLogic Server
- Version 11.0
- Documentation
This command can be executed on a host to remove that host from the cluster. This command also removes the host from the cluster configuration information stored in the Metadata Database. The command leaves the host server in pre-initialized state (same as a fresh install). If the server is restarted, then it will re-join the cluster the same manner as an initial start.
Use the optional -terminate argument to terminate the instance and decrement the DesiredCount attribute of the AutoScaling group by one after leaving the cluster. After the node was first joined to the cluster, the “MARKLOGIC_ADMIN_PASSWORD” field is no longer present in the mlcmd.conf file. In order to get the “leave-cluster” command to execute successfully, manually add that field back to the mlcmd.conf file.
Note:
Leaving the cluster is a privileged operation. So you will need to run the script as a privileged user that has access to the information stored in /etc/marklogic.conf.