--- title: "Deployment Environment Variables" slug: "deployment-environment-variables" updated: 2026-10-26T21:06:42Z published: 2026-10-26T21:06:42Z canonical: "docs.rocket.chat/deployment-environment-variables" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.rocket.chat/llms.txt > Use this file to discover all available pages before exploring further. # Deployment Environment Variables Deployment environment variables in Rocket.Chat provide a structured and reliable way to configure deployments, manage workspace settings, and provision admin users without relying on the UI. They define key settings that influence or control how your workspace is deployed and configured. This documentation will cover the following key topics: - [Mandatory](/v1/docs/deployment-environment-variables#mandatory-environment-variables) and [optional](/v1/docs/deployment-environment-variables#optional-environment-variables) deployment environment variables to customize your deployment instance - [Manage or override workspace settings using environment variables](/v1/docs/manage-settings-using-environmental-variables) - [Provision an admin user during deployment](/v1/docs/admin-account-creation) --- ## How to set up environment variables Each recommended [deployment method](/v1/docs/deploy-rocketchat) discusses how to set up these environment variables in its respective documentation. To set deployment enviroment variable, choose your deployment method below and follow the corresponding guide: 1. **Docker**: Refer to [Set Rocket.Chat deployment enviroment variable on Docker](/v1/docs/deploy-with-docker-docker-compose#set-rocketchat-deployment-environment-variable-on-docker). 2. **Kubernetes**: Visit the [Set Rocket.Chat deployment enviroment variable on Kubernetes](/v1/docs/deploy-with-kubernetes#set-rocketchat-deployment-environment-variable-on-kubernetes) guide. 3. **Podman**: Go to [Set Rocket.Chat deployment enviroment variable on Podman](/v1/docs/deploy-with-podman#set-rocketchat-deployment-environment-variable-on-podman). --- ## Mandatory environment variables Most mandatory environment variables are included by default in your deployment, so verify this before making further changes. | Name | Description | Comment | | --- | --- | --- | | `RELEASE` | Set the variable to your preferred Rocket.Chat release version. For example: `7.4.0` | See our [releases page](https://github.com/RocketChat/Rocket.Chat/releases) and available [docker images](https://hub.docker.com/r/rocketchat/rocket.chat.preview). Keeping the default release as `latest` is not recommended. | | `ROOT_URL` | The URL where your Rocket.Chat instance will be hosted on. In other words the URL you will enter on your browser to access Rocket.Chat. | Format is `[protocol]://[domain or ip][: optional port]/[optional path]` | | `PORT` | Port your Rocket.Chat instance will bind to. | If served under a FQDN (which is recommended) this doesn't matter much, as long as the configured one is not in reserved range and doesn't collide with any other services. | | `MONGO_URL` | MongoDB connection string. | Read MongoDB's [official documentation](https://www.mongodb.com/docs/manual/reference/connection-string/) for more details. Usage also depends on your deployment method of choice. | | `MONGO_OPLOG_URL` ![](https://cdn.us.document360.io/6ae79a05-7252-45d0-96e8-8f375e07b1b2/Images/Documentation/Deprecated(1).svg) | MongoDB connection string to the `local` database. | It was previously used to connect to MongoDB’s local database for reading the oplog, which allowed Rocket.Chat to detect database changes across instances. This variable has been deprecated and removed in version `8.0.0`. Rocket.Chat now handles the event stream internally using [MongoDB change streams](https://www.mongodb.com/docs/manual/changeStreams/). | ## Optional environment variables | Name | Description | Comment | | --- | --- | --- | | `ROCKETCHAT_LICENSE` | The Rocket.Chat license key provided by the [Sales](https://www.rocket.chat/sales-contact) or [Support](/v1/docs/support-center) team. | Starting in Rocket.Chat 8.7, Rocket.Chat validates `ROCKETCHAT_LICENSE` at startup and applies it if it’s the newest valid license. If multiple licenses are available, the server selects the newest valid license. > [!WARNING] > Using the [Subscriptions menu](/v1/docs/subscription) is the recommended way to manage license keys. | | `BIND_IP` | The IP that the node (or main Rocket.Chat) process will bind to. | If intended to be accessed under a domain, which is recommended, users should set this to the loopback address (i.e. `127.0.0.1`) or any **private** IP in the host that's accessible via a reverse proxy or load balancer. This will ensure the instance isn't accessible via any IP that isn't intended. | | `ADMIN_USERNAME` | Admin user's username. | Admin user can be created automatically on deployment. Set this to your admin user's desired username. **Mandatory** if any of the other **ADMIN_*** variables are passed for a successful account creation. | | `ADMIN_NAME` | Admin user's name. | **Mandatory** if any of the other **ADMIN_*** variables are passed for a successful account creation. | | `ADMIN_PASS` | Admin user's password (in plaintext). | **Mandatory** if any of the other **ADMIN_*** variables are passed for a successful account creation. | | `ADMIN_EMAIL` | Admin user's email address. | **Mandatory** if any of the other **ADMIN_*** variables are passed for a successful account creation. | | `HTTP_FORWARDED_COUNT` | The number of proxies in front of Rocket.Chat. | If not configured, it defaults to 1 as Rocket.Chat assumes there’s always a proxy in front of it. This variable should be properly configured to avoid security and performance issues regarding rate limiting and other controls. | | `INSTANCE_IP` | The Rocket.Chat IP address accessible by other Rocket.Chat servers when [scaling multiple instances](/v1/docs/running-multiple-instances). | It enables instances to communicate directly with each other. This direct communication is essential for transmitting ephemeral events, such as user typing indicators, between instances. | | `APPS_ENGINE_RUNTIME_TIMEOUT` | Modify the amount of time (in milliseconds) it takes for an app to respond to a call. By default, the timeout is 30 seconds. | You can use this variable to set longer timeouts if you have apps with larger operations. | | `CREATE_TOKENS_FOR_USERS_SECRET` | Authorize requests made to the [Create Users Token endpoint](https://developer.rocket.chat/apidocs/create-users-token). | Starting with version 8.0, workspace administrators must configure the shared secret variable to secure the [Create Users Token endpoint](https://developer.rocket.chat/apidocs/create-users-token). Once configured, this secret must be included in every request to the endpoint to ensure only authorized users can generate tokens. | | `USE_ROOM_SEARCH_INDEX` | Set to `true` to create the messages text index with the room identifier (rid) as a leading key. This scopes text search indexes by room and reduces the amount of index scanned for in-room searches on large workspaces. | Available from Rocket.Chat 8.5, it’s intended for workspaces where users only search within rooms and do not rely on global cross-room search. Changing this value recreates the messages text index on the next startup, which can take time on large databases. The default value is `false`. > [!WARNING] > Do not set this to `true` if you use global search. It is not supported in that setup and will break search, causing errors and preventing search results from working correctly in the workspace | | `MESSAGE_MAX_PARSE_LENGTH` | Maximum message length that Rocket.Chat processes for server-side markdown parsing. Messages longer than this value are still sent normally, but markdown processing is skipped to reduce CPU usage. Set to 0 or a negative number to disable the limit. | Available from Rocket.Chat 8.5, it’s recommended for workspaces where very large messages increase CPU usage during markdown parsing. > [!WARNING] > From Rocket.Chat 9.0.0, the default value is `10000` (previously `0`, no limit). Messages longer than this render as plain text. Workspaces using the default **Message_MaxAllowedSize** (`5000`) are not affected. To parse messages of any length, set it to `0`. | | `APPS_ENGINE_RUNTIME_BACKEND` | Selects the runtime backend that Apps Engine uses to run installed apps. The behavior depends on your [Rocket.Chat](http://Rocket.Chat) version: - 8.6.x and earlier: Apps run on Deno only. This variable isn't available. - 8.7.x: Apps run on Deno by default. Set this variable to `node` to use the Node.js runtime. - 8.8.x: Apps run on Node.js by default. Set this variable to `deno` to use the Deno runtime. - 8.9.0 and later: Apps run on Node.js. This variable is ignored, and setting it to `deno` has no effect. | Both runtimes use the same core execution engine, so apps behave the same regardless of which runtime you use. | After configuring the mandatory and optional deployment environment variables, see how to [manage your workspace settings with environment variables](/v1/docs/manage-settings-using-environmental-variables) in the next topic.