- Print
- DarkLight
- PDF
Deployment Environment Variables
- Print
- DarkLight
- PDF
Environmental variables can be specified to impact how the workspace is deployed or affect the workspace settings and configuration. Setting the deployment environment variables depends on your preferred deployment method. This topic covers the mandatory and optional deployment environment variables for you to successfully deploy your workspace as per your needs.
Using the most common deployment method, deploy with Docker & Docker Compose, these variables can be set within the environment
section under services
in your compose.yml file.
Mandatory environment variables
Name | Description | Comment |
---|---|---|
| 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 |
| 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. |
| MongoDB connection string. | Read MongoDB's official documentation to understand this better. Usage also depends on your deployment method of choice. |
| MongoDB connection string to the | Similar to the above, except this points directly to the |
Optional environment variables
Name | Description | Comment |
---|---|---|
| Which IP 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. |
| 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 user's name. | Mandatory if any of the other ADMIN_* variables are passed for a successful account creation. |
| Admin user's password (in plaintext). | Mandatory if any of the other ADMIN_* variables are passed for a successful account creation. |
| Admin user's email address. | Mandatory if any of the other ADMIN_* variables are passed for a successful account creation. |
| 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. |
| The Rocket.Chat IP address accessible by other Rocket.Chat servers when scaling 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. |
After configuring the mandatory and optional deployment environment variables, see how to manage your workspace settings with environment variables in the next topic.