> For the complete documentation index, see [llms.txt](https://docs.weka.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.weka.io/5.0/security/secure-cluster-membership-with-join-secret-authentication.md).

# Secure cluster membership with join secret authentication

To enhance security in multi-cluster environments, WEKA supports join secret authentication in on-premises deployments, which ensures that only authorized backends with the correct secret can join a cluster. This mechanism prevents accidental cross-cluster joins and unauthorized access, maintaining a secure and isolated cluster environment.

{% hint style="info" %}
Join secret authentication is not supported on cloud deployments.
{% endhint %}

## Enable join secret authentication

Join secret authentication is enabled during cluster creation by specifying a secret:

```
weka cluster add --join-secret <join-secret>
```

The `<join-secret>` acts as a shared credential required for all backend containers that need to join the cluster.

## Set join secret for existing clusters

If the cluster was initially created without a join secret, you can assign it post-deployment to each container using:

```
weka cluster container join-secret <container-id> <secret>
```

Replace `<container-id>` with the container’s identifier and with the desired join secret value.

## Add resources to a cluster with join secret

When expanding a cluster with join secret authentication enabled, the following commands must include the correct secret:

* Set up a new container:

```
weka local setup container --join-secret <join-secret>
```

* Join using local resources:

```
weka local resources join-secret <secret>
```

**Related topic**

[Expand specific resources of a container](/5.0/operation-guide/expanding-and-shrinking-cluster-resources/expansion-of-specific-resources.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation by asking a question.

Perform an HTTP GET request on the following URL with the `ask` and `goal` query parameters:

```
GET https://docs.weka.io/5.0/security/secure-cluster-membership-with-join-secret-authentication.md?ask=<question>&goal=<user_goal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is what the user is ultimately trying to achieve, the reason they need the answer. Sharing it helps GitBook give you a better, more relevant answer. A goal is most helpful when it describes the outcome the user wants rather than restating the question. For example, with `ask=how do I create an API token`, a goal like `automate deployments from our CI pipeline` lets GitBook tailor the answer to that use case.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
