Deployment Overview of Rocket.Chat on Server¶
Prerequisites and Basic Requirements¶
To ensure a successful deployment, the following requirements must be met by the host server:
-
Operating System: Ubuntu or AlmaLinux.
-
Privileges: Root or sudo access is required for installing dependencies and managing Docker containers.
-
Domain: A valid domain managed under
hostkey.in. -
Ports:
-
Port
3000: Internal application port. -
Port
443: External HTTPS traffic.
FQDN of the final panel on hostkey.in domain¶
The access URL for the Rocket.Chat interface is generated based on a specific template:
| Parameter | Value |
|---|---|
| Prefix | rocketchat |
| Domain | hostkey.in |
| Full template | rocketchat{Server_ID}.hostkey.in |
File and Directory Structure¶
The application and its configuration files are organized as follows:
-
Application Data Directory:
/opt/rocketchat(contains the deployment repository,.envfile, and compose files). -
Nginx Configuration Directory:
/root/nginx(contains the Nginx Docker Compose file). -
SSL Certificates: Managed via external volumes used by the proxy container.
-
User Configurations:
/data/nginx/user_conf.d(stores site-specific Nginx configurations).
Application installation process¶
The application is deployed using a combination of package management and Docker Compose:
-
Dependency Installation: The system installs the Docker engine and the
docker-compose-pluginvia the native package manager (apt). -
Repository Setup: The Rocket.Chat compose repository is cloned from GitHub into
/opt/rocketchat. -
Environment Configuration: A
.envfile is generated in the application directory to define versioning and domain settings. -
Stack Deployment: The deployment uses Docker Compose to launch the core services defined in
compose.ymlandcompose.database.yml.
The following versions are utilized:
-
Rocket.Chat Version:
8.1.0 -
MongoDB Version:
8.2
Access Rights and Security¶
-
Firewall: The server must allow traffic on port
443for external HTTPS access. -
File Permissions: Configuration files in
/opt/rocketchat/.envare set to0644with ownership assigned toroot:root. -
Nginx Proxying: An Nginx reverse proxy is configured to route traffic from the public domain to the internal application port (
3000) via127.0.0.1.
Databases¶
The database service is managed as part of the Docker stack:
-
Type: MongoDB.
-
Version:
8.2. -
Deployment Method: Managed via a dedicated
compose.database.ymlfile within the application directory.
Docker Containers and Their Deployment¶
The deployment consists of several containers working in tandem to provide the application and its proxy:
Rocket.Chat Application Stack¶
These services are managed using docker compose from the /opt/rocketchat directory.
| Service | Image | Ports (Internal) | Restart Policy |
|---|---|---|---|
| Rocket.Chat Core | Specified in compose.yml | 3000 | Managed by Compose |
| MongoDB | Specified in compose.database.yml | Standard Mongo Port | Managed by Compose |
Proxy Container¶
A separate stack is used to handle SSL termination and reverse proxying.
| Service | Image | Network Mode | Volumes | Environment Variables | Restart Policy |
|---|---|---|---|---|---|
| Nginx-Certbot | jonasal/nginx-certbot:latest | host | nginx_secrets:/etc/letsencrypt, /data/nginx/user_conf.d:/etc/nginx/user_conf.d | [email protected] | unless-stopped |
Application Update Instructions¶
To update the Rocket.Chat application, navigate to the application data directory and pull the latest images:
Location of configuration files and data¶
-
Main Configuration:
/opt/rocketchat/.env -
Docker Compose Files:
/opt/rocketchat/compose.ymland/opt/rocketchat/compose.database.yml -
Nginx Proxy Configs:
/data/nginx/user_conf.d/
Available ports for connection¶
-
HTTPS (External):
443 -
Application (Internal):
3000
Starting and Stopping the application¶
The application is managed via Docker Compose commands from the /opt/rocketchat directory:
-
Start the application:
-
Stop the application: