> For the complete documentation index, see [llms.txt](https://docs.cybus.io/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.cybus.io/2-6-1/broker/cybusmq/environment-variables.md).

# Environment Variables (CybusMQ)

Environment variables for configuring CybusMQ.

Configure CybusMQ to match your deployment requirements using environment variables.

{% hint style="info" %}
CybusMQ uses the original VerneMQ variable names.
{% endhint %}

{% hint style="warning" %}

## Prefer Helm values over environment variables in Kubernetes deployments

For Kubernetes deployments, configuration is primarily done through Helm chart values. Environment variables should only be used if there is no corresponding Helm value.
{% endhint %}

The following environment variables are available for simple configurations. If you need further options, you must provide your own configuration file in which you can use all VerneMQ configuration options.

## Environment Variables

| Environment Variable                               | Description                                                                                                                                                                                                                                             |
| -------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `DOCKER_VERNEMQ_ALLOW_REGISTER_DURING_NETSPLIT`    | Allows clients to connect even if the cluster is incomplete.                                                                                                                                                                                            |
| `DOCKER_VERNEMQ_ALLOW_PUBLISH_DURING_NETSPLIT`     | Allows clients to publish even if the cluster is incomplete.                                                                                                                                                                                            |
| `DOCKER_VERNEMQ_ALLOW_SUBSCRIBE_DURING_NETSPLIT`   | Allows clients to subscribe even if the cluster is incomplete.                                                                                                                                                                                          |
| `DOCKER_VERNEMQ_ALLOW_UNSUBSCRIBE_DURING_NETSPLIT` | Allows clients to unsubscribe even if the cluster is incomplete.                                                                                                                                                                                        |
| `MAX_OFFLINE_MESSAGES`                             | Maximum number of messages stored while a client is offline.                                                                                                                                                                                            |
| `MAX_ONLINE_MESSAGES`                              | Maximum number of messages stored while a client is online. To keep buffered messages from being dropped when a client reconnects after a network partition or other infrastructure disruption, set this close to the expected per-client MQTT traffic. |
| `PERSISTENT_CLIENT_EXPIRATION`                     | Defines how long persistent sessions are kept without client activity.                                                                                                                                                                                  |
| `DOCKER_VERNEMQ_LOG__CONSOLE__LEVEL`               | Configures the console log level.                                                                                                                                                                                                                       |


---

# 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.cybus.io/2-6-1/broker/cybusmq/environment-variables.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.
