- Print
- DarkLight
- PDF
Environment Configuration
- Print
- DarkLight
- PDF
This guide provides detailed instructions for configuring the environment necessary to run Rocket.Chat. Proper environment configuration ensures optimal performance, security, and functionality of Rocket.Chat.
As of December 15, 2023, Rocket.Chat has ceased support for connections from cloud services and official mobile/desktop apps to workspaces running legacy versions outside our support window. Users on unsupported legacy servers are advised to upgrade to the latest Rocket.Chat version to ensure continued access to cloud, mobile, and desktop applications. Each Rocket.Chat version is supported for six months post-release.
Prerequisites
Before proceeding with the environment configuration, ensure the following prerequisites are met:
System requirements: Verify that your system meets the minimum hardware and software requirements for Rocket.Chat.
Deploy Rocket.Chat: Make sure that you have a Rocket.Chat workspace installed. You can deploy using any of the following methods:
Deploy with Docker and Docker Compose (recommended)
Deploy with AWS (recommended)
Deploy with Kubernetes (recommended)
Deploy with any of the additional deployment methods
Basic understanding: Familiarity with command-line interfaces, server management, and network configuration is recommended.
Configuration steps
1. Setting environment variables
Environment variables can be used to influence the workspace deployment or the workspace settings. Configuring the environment variables depends on the method of deployment. Generally, you can follow these steps:
Set deployment environment variables: In the
.env
or thecompose.yml
file (for Docker deployment), set values for the mandatory variables such asROOT_URL
,PORT
, andMONGO_URL
. You can also set values for the optional variables according to your requirements.Modify deployment environment variables: Modify the variables you need and deploy the workspace again for the changes to take effect.
See environment variables for detailed information.
Settings environment variables: Configure the environment variables to manage the workspace settings.
2. Database configuration
Rocket.Chat uses MongoDB. Configure the database connection:
MongoDB connection string URI: Connect Rocket.Chat and the MongoDB instance using a connection string URI. The authentication is done with a username and password.
Backup and restore: Perform a backup of your workspace data.
Replication: Configure a MongoDB replica set to improve the data availability.
3. Integrating external services
Integrate external services like email, authentication, and file storage:
Email: Use the mailer tool to send emails to users in your workspace. For Omnichannel, use email inboxes to create and manage the email accounts for the channels.
Authentication: Set up user authentication and authorization using any of the available methods.
File upload and storage: Configure storage options for file uploads and storage (e.g., local file system, AWS S3, Google Cloud Storage, etc.).
4. Security settings
Enhance the security of your Rocket.Chat server:
SSL certificate authentication: Add a layer of security to your workspace by configuring the Nginx web server.
SSL reverse proxy configuration: Implement reverse proxy servers to handle SSL.
Firewall setup: Configure the server's firewall to allow necessary traffic and block unwanted access.
Regular updates: Keep Rocket.Chat and its dependencies updated to patch security vulnerabilities.
5. High-scale deployment and automation
Add additional resources as your users grow to maintain optimal system performance:
Microservices deployment: Get more flexibility and fault tolerance by deploying Rocket.Chat as separate components to manage large user volumes and adapt to dynamic business requirements.
Run multiple instances: Utilize your existing hardware to run multiple instances of the Rocket.Chat app on your current host.
Automation tools: Streamline the deployment process by using Ansible, OpenShift, Kubernetes with Helm, or Vagrant.
6. Data migration
Migrate your existing data from another service using the import integration:
Import from HipChat: Move your data from HipChat Cloud or HipChat Enterprise.
Import from Slack: Get your Slack users and data into Rocket.Chat.
Import CSV: Provide a CSV file or URL to import user data.
7. Data monitoring
Gather and visualize your workspace metrics with the Prometheus and Grafana integrations. Configuring the monitoring setup provides information such as workspace data, subscriptions, REST API details, and more.
Troubleshooting
Address common issues during environment configuration:
Connectivity issues: Ensure all services are correctly configured and can communicate with each other.
Environment variable mistakes: Double-check environment variable settings for typos or incorrect values.
Proper environment configuration is crucial for a stable and efficient Rocket.Chat deployment. By following these steps, you can ensure that your Rocket.Chat server is well-configured, secure, and ready for use.