Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Latest commit

 

History

History
19 lines (11 loc) · 3.78 KB

File metadata and controls

19 lines (11 loc) · 3.78 KB
description
Configuring Rocket.Chat via environment variables

Deployment Environment Variables

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 the deployment method of choice. This topic takes you through 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-and-docker-compose.md, these variables can be set within the environment section under services in your compose.yml file.

Mandatory Environment Variables

NameDescriptionComment
ROOT_URLThe 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]
PORTPort 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_URLMongoDB connection string.Read the official documentation of MongoDB to understand better. This also somewhat depends on your deployment method of choice.
MONGO_OPLOG_URLMongoDB connection string to the local database.Similar to the above, except this one points directly to the local database. E.g. mongodb://localhost:27017/local

Optional Environment Variables

NameDescriptionComment
BIND_IPWhich 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. 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_USERNAMEAdmin 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_NAMEAdmin user's name.Mandatory if any of the other ADMIN_* variables are passed for a successful account creation.
ADMIN_PASSAdmin user's password (in plaintext).Mandatory if any of the other ADMIN_* variables are passed for a successful account creation.
ADMIN_EMAILAdmin user's email address.Mandatory if any of the other ADMIN_* variables are passed for a successful account creation.

After configuring the mandatory and optional deployment environment variables, see how to manage your workspace settings with environment variables in the next topic.