Rocket.Chat is a self-hosted open-source team communication platform that provides real-time messaging, video conferencing, file sharing, and live chat support for websites. It serves as a privacy-focused alternative to Slack and Microsoft Teams, giving organizations full control over their data and communication infrastructure.

This guide walks through installing Rocket.Chat on Debian 13 and Ubuntu 24.04 using both the Snap package method and manual installation with MongoDB 7 and Node.js. We also cover Nginx reverse proxy setup, SSL certificates with Let’s Encrypt, Livechat widget configuration for visitor support, LDAP/OAuth integration, mobile app setup, and backup strategies.

Prerequisites

Before starting the Rocket.Chat installation, confirm you have the following ready:

  • A server running Debian 13 (Trixie) or Ubuntu 24.04 LTS with at least 2 CPU cores and 4GB RAM
  • Root or sudo access to the server
  • A registered domain name pointed to your server IP (e.g., chat.example.com)
  • Ports 80, 443, and 3000 (TCP) open in your firewall
  • MongoDB 7.x (required by Rocket.Chat 7.x)
  • Node.js 20.x LTS

Step 1: Update the System

Start by updating package lists and applying any pending security patches.

sudo apt update && sudo apt upgrade -y

Install basic utilities needed throughout the setup process.

sudo apt install -y curl wget gnupg2 software-properties-common apt-transport-https ca-certificates

Method 1: Install Rocket.Chat Using Snap (Quick Setup)

The fastest way to deploy Rocket.Chat on Debian 13 or Ubuntu 24.04 is through Snap packages. Snap bundles Rocket.Chat with MongoDB and Node.js, handling all dependencies automatically.

Install Snapd

On Ubuntu 24.04, snapd is pre-installed. On Debian 13, install it manually.

sudo apt install -y snapd
sudo systemctl enable --now snapd.socket

Log out and back in, or restart the shell, to ensure the snap binary path is available.

sudo snap install core

Install the Rocket.Chat Snap

Install Rocket.Chat with a single command.

sudo snap install rocketchat-server

Snap will pull the latest stable release along with the bundled MongoDB instance. The service starts automatically on port 3000 after installation completes.

Verify Rocket.Chat is running.

$ sudo snap services rocketchat-server
Service                              Startup  Current   Notes
rocketchat-server.rocketchat-caddy   enabled  active    -
rocketchat-server.rocketchat-mongo   enabled  active    -
rocketchat-server.rocketchat-server  enabled  active    -

Check the version installed.

sudo snap info rocketchat-server | grep installed

Access the web interface at http://your-server-ip:3000. If you only need the Snap method, skip ahead to the Nginx reverse proxy section. The manual method below gives more control over each component.

Method 2: Install Rocket.Chat Manually on Debian 13 / Ubuntu 24.04

Manual installation is better for production environments where you need fine-grained control over MongoDB, Node.js versions, and system resources.

Step 2: Install MongoDB 7 on Debian / Ubuntu

Rocket.Chat 7.x requires MongoDB 7 as its database engine. Add the official MongoDB repository to get the latest packages.

Import the MongoDB GPG key.

curl -fsSL https://www.mongodb.org/static/pgp/server-7.0.asc | sudo gpg --dearmor -o /usr/share/keyrings/mongodb-server-7.0.gpg

Add the MongoDB 7.0 repository. For Ubuntu 24.04, run the following.

echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/ubuntu noble/mongodb-org/7.0 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

For Debian 13 (Trixie), use the Debian bookworm repository since it is binary-compatible.

echo "deb [ signed-by=/usr/share/keyrings/mongodb-server-7.0.gpg ] https://repo.mongodb.org/apt/debian bookworm/mongodb-org/7.0 main" | sudo tee /etc/apt/sources.list.d/mongodb-org-7.0.list

Update the package index and install MongoDB.

sudo apt update
sudo apt install -y mongodb-org

Configure MongoDB Replica Set

Rocket.Chat requires MongoDB to run as a replica set, even on a single-node deployment. Edit the MongoDB configuration file.

sudo vim /etc/mongod.conf

Add or modify the replication section at the bottom of the file.

# Network interfaces
net:
  port: 27017
  bindIp: 127.0.0.1

# Replica set configuration (required by Rocket.Chat)
replication:
  replSetName: rs0

Start and enable MongoDB.

sudo systemctl enable --now mongod

Verify MongoDB is running.

$ sudo systemctl status mongod
● mongod.service - MongoDB Database Server
     Loaded: loaded (/lib/systemd/system/mongod.service; enabled; preset: enabled)
     Active: active (running) since Thu 2026-03-19 10:15:32 UTC; 5s ago
       Docs: https://docs.mongodb.org/manual
   Main PID: 4521 (mongod)
     Memory: 168.0M
        CPU: 1.125s
     CGroup: /system.slice/mongod.service
             └─4521 /usr/bin/mongod --config /etc/mongod.conf

Initialize the replica set by connecting to the MongoDB shell.

mongosh --eval "rs.initiate({_id: 'rs0', members: [{_id: 0, host: 'localhost:27017'}]})"

Confirm the replica set is operational.

$ mongosh --eval "rs.status().ok"
1

Step 3: Install Node.js 20 LTS

Rocket.Chat 7.x runs on Node.js 20 LTS. Install it from the NodeSource repository.

curl -fsSL https://deb.nodesource.com/setup_20.x | sudo -E bash -
sudo apt install -y nodejs

Verify the installed versions.

$ node -v
v20.18.1

$ npm -v
10.8.2

Install the inherits and n npm packages globally, which Rocket.Chat depends on.

sudo npm install -g inherits n

Step 4: Download and Install Rocket.Chat

Download the latest stable Rocket.Chat release.

curl -L https://releases.rocket.chat/latest/download -o /tmp/rocket.chat.tgz

Extract the archive and install Node.js dependencies.

tar -xzf /tmp/rocket.chat.tgz -C /tmp

Install the server-side npm packages.

cd /tmp/bundle/programs/server
npm install

Move the application to its permanent location.

sudo mv /tmp/bundle /opt/Rocket.Chat

Create a dedicated system user for running the Rocket.Chat service.

sudo useradd -M -r -s /bin/false rocketchat
sudo chown -R rocketchat:rocketchat /opt/Rocket.Chat

Step 5: Create a Systemd Service for Rocket.Chat

Create a systemd unit file so Rocket.Chat starts automatically on boot and can be managed with standard service commands.

sudo vim /etc/systemd/system/rocketchat.service

Add the following service configuration. Replace chat.example.com with your actual domain name.

[Unit]
Description=Rocket.Chat Server
After=network.target mongod.service
Requires=mongod.service

[Service]
Type=simple
User=rocketchat
Group=rocketchat
Restart=on-failure
RestartSec=10
StartLimitInterval=60
StartLimitBurst=3

Environment=ROOT_URL=https://chat.example.com
Environment=PORT=3000
Environment=MONGO_URL=mongodb://localhost:27017/rocketchat?replicaSet=rs0
Environment=MONGO_OPLOG_URL=mongodb://localhost:27017/local?replicaSet=rs0
Environment=DEPLOY_METHOD=tar
Environment=DEPLOY_PLATFORM=selfinstall
Environment=NODE_ENV=production

WorkingDirectory=/opt/Rocket.Chat
ExecStart=/usr/bin/node main.js

[Install]
WantedBy=multi-user.target

Reload systemd, then start and enable the Rocket.Chat service.

sudo systemctl daemon-reload
sudo systemctl enable --now rocketchat

Check the service status to confirm it started without errors.

$ sudo systemctl status rocketchat
● rocketchat.service - Rocket.Chat Server
     Loaded: loaded (/etc/systemd/system/rocketchat.service; enabled; preset: enabled)
     Active: active (running) since Thu 2026-03-19 10:25:00 UTC; 8s ago
   Main PID: 5102 (node)
     Memory: 512.0M
        CPU: 12.450s
     CGroup: /system.slice/rocketchat.service
             └─5102 /usr/bin/node main.js

Rocket.Chat takes 30 to 60 seconds to fully initialize on first launch. Verify it is listening on port 3000.

$ sudo ss -tlnp | grep 3000
LISTEN  0  511  *:3000  *:*  users:(("node",pid=5102,fd=22))

Step 6: Configure Nginx as a Reverse Proxy for Rocket.Chat

Running Rocket.Chat behind Nginx as a reverse proxy allows proper SSL termination and standard HTTP/HTTPS port access. Install Nginx if it is not already present.

sudo apt install -y nginx

Create a new virtual host configuration for Rocket.Chat.

sudo vim /etc/nginx/sites-available/rocketchat.conf

Add the following configuration. Replace chat.example.com with your domain name.

upstream rocketchat_backend {
    server 127.0.0.1:3000;
}

server {
    listen 80;
    server_name chat.example.com;

    # Redirect all HTTP to HTTPS
    return 301 https://$server_name$request_uri;
}

server {
    listen 443 ssl http2;
    server_name chat.example.com;

    # SSL certificates (Let's Encrypt paths after certbot runs)
    ssl_certificate /etc/letsencrypt/live/chat.example.com/fullchain.pem;
    ssl_certificate_key /etc/letsencrypt/live/chat.example.com/privkey.pem;
    ssl_protocols TLSv1.2 TLSv1.3;
    ssl_ciphers HIGH:!aNULL:!MD5;
    ssl_prefer_server_ciphers on;

    client_max_body_size 200M;

    location / {
        proxy_pass http://rocketchat_backend;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade;
        proxy_set_header Connection "upgrade";
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_read_timeout 86400;
    }
}

Enable the site and test the Nginx configuration.

sudo ln -s /etc/nginx/sites-available/rocketchat.conf /etc/nginx/sites-enabled/
sudo nginx -t

If the test passes, restart Nginx.

sudo systemctl restart nginx

Step 7: Obtain SSL Certificate with Let’s Encrypt

Install Certbot and the Nginx plugin to get a free SSL certificate from Let’s Encrypt.

sudo apt install -y certbot python3-certbot-nginx

Before requesting the certificate, temporarily comment out the SSL server block in the Nginx config (the one listening on port 443) since the certificate files do not exist yet. Then reload Nginx.

sudo systemctl reload nginx

Run Certbot to obtain and install the certificate.

sudo certbot --nginx -d chat.example.com --non-interactive --agree-tos -m [email protected]

Certbot will automatically modify your Nginx configuration to include the SSL certificate paths and redirect HTTP to HTTPS. Verify the certificate is valid.

$ sudo certbot certificates
Certificate Name: chat.example.com
  Domains: chat.example.com
  Expiry Date: 2026-06-17 (VALID: 89 days)
  Certificate Path: /etc/letsencrypt/live/chat.example.com/fullchain.pem
  Private Key Path: /etc/letsencrypt/live/chat.example.com/privkey.pem

Certbot sets up automatic renewal via a systemd timer. Test the renewal process to make sure it works.

sudo certbot renew --dry-run

Now uncomment the full SSL server block in the Nginx config and restart Nginx. Your Rocket.Chat instance is now accessible at https://chat.example.com.

Step 8: Complete the Rocket.Chat Admin Setup

Open your browser and navigate to https://chat.example.com. The setup wizard will guide you through creating the first administrator account.

On the first screen, fill in the admin details:

  • Full Name – Your display name
  • Username – Admin username (e.g., admin)
  • Email – Your email address
  • Password – A strong password for the admin account

The next screen asks for organization information including Organization Name, Organization Type, Industry, and Server Size. Fill these in according to your setup.

On the third screen, you can choose to register the server with Rocket.Chat Cloud for push notifications and marketplace access, or select “Keep standalone” to run fully self-hosted without cloud services.

After completing the wizard, you land on the main Rocket.Chat dashboard where you can start creating channels and inviting team members.

Step 9: Create Channels and Manage Users

Rocket.Chat supports several channel types to organize team communication.

Channel Types

Channels are the core of Rocket.Chat collaboration. Here are the available types:

  • Public Channels – Visible to all users on the server. Good for company-wide announcements and open discussions
  • Private Groups – Only visible to invited members. Use these for team-specific or project-specific conversations
  • Direct Messages – One-on-one or small group private conversations
  • Discussions – Threaded conversations branched from a channel message
  • Teams – Collections of channels grouped under a shared structure

Creating a Channel

To create a new channel, click the Create New button (plus icon) in the left sidebar. Select Channel, provide a name, set the visibility (public or private), optionally add members, and click Create.

You can also create channels through the Rocket.Chat REST API.

curl -H "X-Auth-Token: your-auth-token" \
     -H "X-User-Id: your-user-id" \
     -H "Content-Type: application/json" \
     -d '{"name": "project-alpha", "members": ["user1", "user2"]}' \
     https://chat.example.com/api/v1/channels.create

Adding Users

Navigate to Administration > Users to add new team members. You can create users manually, send email invitations, or configure LDAP/OAuth for automatic provisioning (covered later in this guide).

For bulk user creation, use the admin panel CSV import feature at Administration > Import > CSV.

Step 10: Configure the Livechat Widget for Website Support

Rocket.Chat includes a built-in Livechat module that adds a real-time chat widget to your website, allowing visitors to communicate directly with support agents.

Enable Livechat

Go to Administration > Settings > Omnichannel and toggle Omnichannel enabled to ON. This activates the Livechat subsystem.

Create Departments

Navigate to Administration > Omnichannel > Departments and create departments such as “Sales” and “Technical Support”. Assign agents to each department so incoming chats get routed to the right team.

Add Livechat Agents

Under Administration > Omnichannel > Agents, add users who will handle visitor chats. Each agent must have the livechat-agent role assigned.

Embed the Widget on Your Website

Go to Administration > Omnichannel > Livechat Installation to get the embed code. Copy the JavaScript snippet and paste it before the closing </body> tag on your website pages.

<script type="text/javascript">
(function(w, d, s, u) {
    w.RocketChat = function(c) { w.RocketChat._.push(c) };
    w.RocketChat._ = [];
    w.RocketChat.url = u;
    var h = d.getElementsByTagName(s)[0],
        j = d.createElement(s);
    j.async = true;
    j.src = 'https://chat.example.com/livechat/rocketchat-livechat.min.js?_=201903270000';
    h.parentNode.insertBefore(j, h);
})(window, document, 'script', 'https://chat.example.com/livechat');
</script>

After adding the script, a chat icon appears in the bottom-right corner of your website. Visitors can start a conversation, which routes to the assigned department and available agents.

Customize the Widget

Under Administration > Omnichannel > Livechat Appearance, customize the widget title, color theme, offline messages form, and pre-chat registration form fields. You can also configure automated welcome messages and canned responses for common questions.

Step 11: Configure LDAP and OAuth Authentication

For organizations using centralized identity management, Rocket.Chat supports LDAP and OAuth2/OIDC login integration.

LDAP Configuration

If you run an OpenLDAP or Active Directory server, connect it to Rocket.Chat for single sign-on. Navigate to Administration > Settings > LDAP and configure the following settings.

Enable: True
Server Type: Active Directory / OpenLDAP
Host: 192.168.1.10
Port: 389 (or 636 for LDAPS)
Base DN: dc=example,dc=com
Authentication: True
User DN: cn=admin,dc=example,dc=com
Password: your-ldap-bind-password

Under the User Search tab, set the search filter to find users.

Search Field: uid,mail
Search Object Class: inetOrgPerson
Search Filter: (objectclass=inetOrgPerson)

Map LDAP attributes to Rocket.Chat fields under the Attribute Map section. Common mappings include cn to Name, mail to Email, and uid to Username.

Click Test Connection to verify LDAP connectivity before saving. After saving, users can log in with their LDAP credentials.

OAuth2 / OpenID Connect

Navigate to Administration > Settings > OAuth to configure external authentication providers like Google, GitHub, GitLab, or Keycloak. Click Add Custom OAuth and fill in the following.

  • URL – The OAuth provider authorization endpoint
  • Token Path – Token exchange endpoint path
  • Identity Path – User info endpoint path
  • Client ID – From your OAuth provider application
  • Client Secret – From your OAuth provider application
  • Authorize Path – /oauth/authorize or provider-specific path

Save the configuration. A new login button for the OAuth provider appears on the Rocket.Chat login page.

Step 12: Set Up the Rocket.Chat Mobile App

Rocket.Chat provides mobile apps for both iOS and Android. Download the official Rocket.Chat app from the Apple App Store or Google Play Store.

Open the app and enter your server URL (e.g., https://chat.example.com). Log in with your credentials or use the configured LDAP/OAuth provider.

Push Notifications

For push notifications to work on mobile devices, you need to either register your server with Rocket.Chat Cloud (free tier available) or set up your own push notification gateway.

To use the Rocket.Chat Cloud gateway, go to Administration > Connectivity Services and register your workspace. This enables push notifications through Rocket.Chat’s infrastructure without exposing your server directly.

Configure notification preferences per user at Profile > Notifications. You can set desktop, mobile, and email notification rules for each channel or globally.

Step 13: Configure File Upload Storage

By default, Rocket.Chat stores uploaded files in MongoDB GridFS. For production deployments handling large volumes of file uploads, consider switching to filesystem storage or an S3-compatible object store.

Filesystem Storage

Navigate to Administration > Settings > File Upload and set the storage type to FileSystem. Set the upload path.

Storage Type: FileSystem
File System - Path: /opt/Rocket.Chat/uploads

Create the uploads directory and set proper ownership.

sudo mkdir -p /opt/Rocket.Chat/uploads
sudo chown rocketchat:rocketchat /opt/Rocket.Chat/uploads

S3-Compatible Object Storage

For S3 storage (AWS S3, MinIO, or any S3-compatible provider), set the following under File Upload > AmazonS3.

Storage Type: AmazonS3
AmazonS3 - Bucket Name: rocketchat-uploads
AmazonS3 - Access Key: your-access-key
AmazonS3 - Secret Key: your-secret-key
AmazonS3 - Region: us-east-1
AmazonS3 - Bucket URL: https://s3.amazonaws.com

Set maximum file upload size and allowed file types under the same section. The default limit is 200MB, which you can adjust based on your storage capacity.

Step 14: Rocket.Chat Backup Strategy

Regular backups protect your Rocket.Chat data including messages, user accounts, channel configurations, and uploaded files. A solid backup plan covers both the MongoDB database and any filesystem-stored uploads.

Backup MongoDB

Use mongodump to create a full database backup.

sudo mongodump --archive=/backup/rocketchat-$(date +%Y%m%d).gz --gzip --db rocketchat

Create the backup directory first if it does not exist.

sudo mkdir -p /backup
sudo chown root:root /backup

Backup Uploaded Files

If using filesystem storage, archive the uploads directory.

sudo tar -czf /backup/rocketchat-uploads-$(date +%Y%m%d).tar.gz /opt/Rocket.Chat/uploads

Automated Backup with Cron

Schedule daily backups with a cron job. Open the root crontab.

sudo crontab -e

Add the following entries for daily backups at 2:00 AM with 7-day retention.

# Rocket.Chat MongoDB backup - daily at 2:00 AM
0 2 * * * /usr/bin/mongodump --archive=/backup/rocketchat-$(date +\%Y\%m\%d).gz --gzip --db rocketchat

# Rocket.Chat uploads backup - daily at 2:30 AM
30 2 * * * /usr/bin/tar -czf /backup/rocketchat-uploads-$(date +\%Y\%m\%d).tar.gz /opt/Rocket.Chat/uploads

# Remove backups older than 7 days
0 3 * * * /usr/bin/find /backup -name "rocketchat-*" -mtime +7 -delete

Restore from Backup

To restore the MongoDB database from a backup.

sudo systemctl stop rocketchat
sudo mongorestore --archive=/backup/rocketchat-20260319.gz --gzip --db rocketchat --drop
sudo systemctl start rocketchat

For a complete disaster recovery, restore both the database and the uploads directory to their original locations.

Configure Firewall Rules

Allow HTTP, HTTPS, and the Rocket.Chat port through the firewall. On Ubuntu 24.04 with UFW:

sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw allow 3000/tcp
sudo ufw enable
sudo ufw status

On Debian 13, if you use nftables or iptables instead of UFW, add equivalent rules. Port 3000 is only needed for direct access during setup – you can remove it after confirming the Nginx reverse proxy works.

sudo ufw delete allow 3000/tcp

Conclusion

Rocket.Chat is now running on your Debian 13 or Ubuntu 24.04 server with Nginx reverse proxy, SSL encryption, and the Livechat widget ready for visitor support. The platform supports team channels, LDAP/OAuth authentication, mobile access, and configurable file storage.

For production hardening, monitor MongoDB performance using tools like Prometheus and Grafana with PMM, keep Rocket.Chat updated to the latest stable release, and test your backup restore procedure regularly to ensure data recoverability.

Related Guides

LEAVE A REPLY

Please enter your comment!
Please enter your name here