Skip to content

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, .env file, 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:

  1. Dependency Installation: The system installs the Docker engine and the docker-compose-plugin via the native package manager (apt).

  2. Repository Setup: The Rocket.Chat compose repository is cloned from GitHub into /opt/rocketchat.

  3. Environment Configuration: A .env file is generated in the application directory to define versioning and domain settings.

  4. Stack Deployment: The deployment uses Docker Compose to launch the core services defined in compose.yml and compose.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 443 for external HTTPS access.

  • File Permissions: Configuration files in /opt/rocketchat/.env are set to 0644 with ownership assigned to root:root.

  • Nginx Proxying: An Nginx reverse proxy is configured to route traffic from the public domain to the internal application port (3000) via 127.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.yml file 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:

cd /opt/rocketchat
docker compose pull && docker compose up -d

Location of configuration files and data

  • Main Configuration: /opt/rocketchat/.env

  • Docker Compose Files: /opt/rocketchat/compose.yml and /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:

    docker compose up -d
    

  • Stop the application:

    docker compose down
    

question_mark
Is there anything I can help you with?
question_mark
AI Assistant ×