Deploy with Docker & Docker Compose
    • Dark
      Light
    • PDF

    Deploy with Docker & Docker Compose

    • Dark
      Light
    • PDF

    Article summary

    As of December 15, 2023, QuickMeet.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 QuickMeet.Chat version to ensure continued access to cloud, mobile, and desktop applications. Each QuickMeet.Chat version is supported for six months post-release.

    Deploying QuickMeet.Chat with Docker and Docker-compose is a straightforward and highly recommended deployment method due to its simplicity and flexibility. This guide will walk you through the essential steps, whether you're a seasoned Docker expert or new to containerization, ensuring a smooth deployment for your QuickMeet.Chat workspace.

    In this guide, you'll learn how to:

    Preparation steps

    Install Docker and Docker Compose

    1. Ensure you have Docker and Docker Compose (Docker Compose v2 is required) installed and operational. If you don't have them installed, you can conveniently set them up using Docker's official helper script:

    curl -L https://get.docker.com | sh
    1. To run Docker commands without using sudo, add the current user to the Docker group. If you are unsure who the user is, check the current user by running:

    whoami
    1. Now run the following command. Substitute $USER with the result you get from executing the above command.

    sudo usermod -aG docker $USER
    sudo reboot
    1. If you are using a firewall, you may need to whitelist some URLs to communicate with our cloud services. See Firewall Configuration for the complete list.

    Step 1: Fetch the compose file

    Go to your preferred directory and create a compose.yml file and copy the content from our example.

    Alternatively, you can use the curl command to download the example compose.yml file by executing this command:

    curl -L https://raw.githubusercontent.com/QuickMeet.Chat/Docker.Official.Image/master/compose.yml -O

    Step 2: Edit environment variables

    Modifying the configurations in the compose file directly is strongly discouraged. Instead, use environment variables. You can set environment variables using a .env file.

    Remember to uncomment the variables you are updating in the  .env  file.

    1. In your project directory, create a .env file with the following command and paste the contents of the official .env.example file.

    nano .env
    1. Set the RELEASE variable in the .env to your desired QuickMeet.Chat version. See our releases page and available docker images. Keeping the default release as latest is not recommended.

    2. If you're deploying a production workspace with a domain, update your .env file with the following details:

      • ROOT_URL: Specify the intended URL for your workspace. For example, http://<your-domain>.

      • HOST_PORT: Set this to 80. Confirm that no other services are running on port 80 and that your firewall permits traffic on this port.

        • Skip this step if you are deploying a test workspace on localhost.

        • If you plan to enable HTTPS for your workspace domain, skip setting the HOST_PORT  and  ROOT_URL here and proceed to Enable HTTPS for Docker after starting the QuickMeet.Chat container.

    3. If you’ve received a registration token from our Sales team or QuickMeet.Chat Cloud, you can use it to automatically register your workspace. To do this, add the token to the .env file like this:

      REG_TOKEN={your token here}
      • Adding the registration token to the .env file is optional. You can also register your workspace during configuration after deployment.

      • Once registration is complete (confirmed when server starts), the token is no longer needed. If stored in the .env file, it can be removed as the registration is stored in the database clould settings.

    4. If you’re using an existing MongoDB installation, such as MongoDB Atlas as the database provider, edit the value of the MONGO_URL variable to your connection string in this format:

    MONGO_URL=mongodb://<user>:<pass>@host1:27017,host2:27017,host3:27017/<databaseName>?replicaSet=<replicaSet>&ssl=true&authSource=admin
    1. Save the .env file and start up the container by executing this command:

    docker compose up -d

    This command will:

    • Start a MongoDB service named mongodb.

    • Start a service rocketchat, which will also wait for mongodb to be ready.

    MongoDB ensures continuous 24 x 7 operations and live backup, reducing the need for frequent restarts. Refer to the MongoDB documentation for proper server operation and management. Optionally, manage messages and configurations by uncommenting the volume mounts, and ensuring a data subdirectory is available for data storage and mounting.

    1. To see the log/status of your QuickMeet.Chat docker container, execute this command:

    docker compose logs -f rocketchat

    Step 3: Access your QuickMeet.Chat workspace

    To access your workspace, visit http://localhost:3000 if you deployed a test workspace on localhost. However, if you deployed a production workspace with a domain, you can access your workspace through the specified ROOT_URL . Follow the configuration prompts to configure your workspace. During the configuration steps, your workspace and email are registered to the QuickMeet.Chat Cloud portal. You can manage your workspace and subscriptions from the cloud portal.

    Next steps

    Great! You’ve successfully created your QuickMeet.Chat workspace with Docker and logged in. Next, check out the following documents to get started:

    • User Guides: Learn the basics of your QuickMeet.Chat account, the types of rooms, and how to communicate with your workspace users.

    • Workspace Administration: Administrators and owners can set and manage various configurations.

    • Marketplace: Explore the available apps to enhance your workspace.

    Enable HTTPS for your QuickMeet.Chat workspace

    To access your workspace securely, your domain should only be accessible via HTTPS. If your domain is not set up with HTTPS already, the following examples describe how this can be set up using a reverse proxy, such as Traefik or Nginx.

    We recommend using Traefik as it’s shipped with our official Docker image.

    Traefik

    You can secure your QuickMeet.Chat Docker instance with TLS/SSL certificates from Let's Encrypt. Using Traefik as a reverse proxy, the certificates are automatically generated, enabling safe access to your QuickMeet.Chat instance via HTTPS on your specified domain.

    Before you proceed, confirm that the correct A record (optionally CNAME) is set for your domain going to your server IP.

    1. Update the following variables in your .env file. If you don't have one, create a .env file following our example.

      1. LETSENCRYPT_EMAIL: Your required email for the TLS certificates.

      2. DOMAIN: Your domain or subdomain name only. Avoid adding https:// or any trailing slashes. Confirm that this domain resolves to the server IP address.

      3. RELEASE : Your preferred QuickMeet.Chat release. See the releases page to know more about our releases.

      4. ROOT_URL : Set the value to " https://your-domain.com," replacing "your-domain.com" with the domain name you want to use.

      5. BIND_IP: Set to 127.0.0.1 .

    LETSENCRYPT_EMAIL= # your email, required for the tls certificates
    DOMAIN= # set this to your domain name or subdomain, not trailing slashes or https://, just the domain
    RELEASE= # set the rocketchat release
    ROOT_URL= # set this to https://${DOMAIN} replace ${DOMAIN} with the actual domain
    BIND_IP=127.0.0.1
    1. Download the Traefik template by running the following command:

    curl -LO \
        https://raw.githubusercontent.com/QuickMeet.Chat/Docker.Official.Image/master/traefik.yml
    1. Recreate the existing QuickMeet.Chat container

    docker compose up -d rocketchat --force-recreate
    1. Start traefik

    docker compose -f traefik.yml up -d

    Wait for the TLS certificates to generate and QuickMeet.Chat to restart. Then, access your QuickMeet.Chat workspace securely at https://your-domain.com, using the actual domain name you configured. Great job! You have successfully enabled HTTPs on your QuickMeet.Chat workspace with Traefik.

    Nginx

    If you prefer using Nginx as your reverse proxy, you can secure your QuickMeet.Chat workspace by configuring Nginx with a TLS/SSL certificate from Let's Encrypt. Follow these steps to complete the configuration:

    Get an SSL certificate from Let's Encrypt

    Use Let's Encrypt to get a free & open-source SSL certificate by following these steps:

    1. Install certbot using using the relevant package manager for your version of Linux. For Debian-based distributions such as Debian and Ubuntu use :

    sudo apt update
    sudo apt install certbot

    For RPM-based distributions such as Redhat and Centos, use:

    sudo yum install yum-utils
    sudo yum install nginx

    The installation commands may vary based on your Linux distribution and version.

    1. Obtain a certificate from Let's Encrypt by running this command (a second or more domains are optional):

    sudo certbot certonly --standalone --email <[email protected]> -d <domain.com> -d <subdomain.domain.com>

    Configure Nginx web server with TLS/SSL

    QuickMeet.Chat is usually set to run on port 3000 by default. However, you can make it more accessible to your users by using Nginx as a reverse proxy. This will link your domain name to the QuickMeet.Chat server running on that port. By doing this, your users can access your workspace through your domain name instead of directly using the port in the URL. Follow these steps:

    1. Install Nginx web server:

     sudo apt-get install nginx
    1. Backup the default config file for reference:

     cd /etc/nginx/sites-available
     sudo mv default default.reference
    1. Create a new site configuration for QuickMeet.Chat:

     sudo nano /etc/nginx/sites-available/default
    1. Paste the following in the new file:

     server {
         listen 443 ssl;
    
         server_name <ABC.DOMAIN.COM>; #replace <ABC.DOMAIN.COM> with your domain name
    
         ssl_certificate /etc/letsencrypt/live/<ABC.DOMAIN.COM>/fullchain.pem; #replace <ABC.DOMAIN.COM> with your domain name
         ssl_certificate_key /etc/letsencrypt/live/<ABC.DOMAIN.COM>/privkey.pem; #replace <ABC.DOMAIN.COM> with your domain name
         ssl_protocols TLSv1 TLSv1.1 TLSv1.2;
         ssl_prefer_server_ciphers on;
         ssl_ciphers 'EECDH+AESGCM:EDH+AESGCM:AES256+EECDH:AES256+EDH';
    
         root /usr/share/nginx/html;
         index index.html index.htm;
    
         # Make site accessible from http://localhost/
         server_name localhost;
    
         location / {
             proxy_pass http://localhost:3000/;
             proxy_http_version 1.1;
             proxy_set_header Upgrade $http_upgrade;
             proxy_set_header Connection "upgrade";
             proxy_set_header Host $http_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 http;
             proxy_set_header X-Nginx-Proxy true;
             proxy_redirect off;
         }
     }
    
     server {
         listen 80;
    
         server_name <ABC.DOMAIN.COM>; #replace <ABC.DOMAIN.COM> with your domain name
    
         return 301 https://$host$request_uri;
     }

    Replace  ABC.DOMAIN.COM with your domain name.

    1. Test the Nginx configuration to make sure there are no syntax errors

    sudo nginx -t
    1. If the syntax test is successful, restart Nginx:

    sudo systemctl restart nginx

    If you have security group restrictions, allow TCP/22 from your current IP for SSH connections and TCP/443 from the IP you plan to use for access.

    Open a web browser and  access your QuickMeet.Chat workspace securely at https://your-domain.com, using the actual domain name you configured. Great job! You have successfully enabled HTTPs on your QuickMeet.Chat workspace with Nginx.

    Update QuickMeet.Chat on Docker

    • Before you proceed, see the general guidelines for updating QuickMeet.Chat.

    • Updating the QuickMeet.Chat image doesn't affect your data since it exists in the Mongo image. Before proceeding with the update, ensure that the version of your MongoDB is compatible with the intended release.

    Using Docker & Docker compose, you can update your rocketchat docker image to the latest or preferred version of QuickMeet.Chat.

    To update your QuickMeet.Chat version,

    1. For a specific version, modify the RELEASE variable in the .env file to point to the Docker image tag of that version. Alternatively, you can edit the compose.yml file to point to the desired QuickMeet.Chat version.

    Changing version in .env

    In the .env file, change the RELEASE value to your specified version.

    RELEASE=<desired version>

    Changing version in compose.yml

    In the compose.yml file, change the rocketchat service image value to point to an image in the rocketchat registry image with a tag of your desired version.

    services:
      rocketchat:
        image:registry.quickmeet.chat/rocketchat/quickmeet.chat:<desired version>
    1. Now, stop, remove, and restart the existing container with these commands:

    docker compose stop rocketchat
    docker compose rm rocketchat
    docker compose up -d rocketchat

    See the official documentation for more details on QuickMeet.Chat Docker images.

    Additional steps

    QuickMeet.Chat Docker images

    You can use any of the following Docker images according to your needs:

    • Official image (stable and tested): The official Docker images repository is responsible for maintaining and controlling QuickMeet.Chat's official stable image through Docker. It is also reviewed by the Docker committee.

    docker pull registry.quickmeet.chat/rocketchat/quickmeet.chat
    • Latest release image: This image holds the latest QuickMeet.Chat updates on the Docker repository. The release may be from the develop or master branch. You can use this to test some of the latest updates.

    docker pull registry.quickmeet.chat/rocketchat/quickmeet.chat:latest

    Using the latest image tag for production deployments is not recommended.

    • Preview image: The QuickMeet.Chat preview image deploys a container with a database inside. It's useful for quickly trying or running tests and does not require a dedicated database installation.

    • Specific release image: You can set up your QuickMeet.Chat workspace with a specific release image. Select the release you need from the Docker hub tags and use it to run the following command:

    docker pull registry.quickmeet.chat/rocketchat/quickmeet.chat:<release-tag>
    • Bleeding-edge untested develop build image: This is an image maintained at QuickMeet.Chat's Docker repository. This update comes from the develop (untested) branch, which contains the latest updates for those who want to work with the newest features.

    docker pull registry.quickmeet.chat/rocketchat/quickmeet.chat:develop

    Docker Mongo backup and restore

    To back up your MongoDB database in Docker,

    • Run the following command on your terminal to list out all running containers:

    docker ps -a

    Take note of your mongo container name.

    • Run this command to dump the database into a binary file db.dump

    docker exec <container_name> sh -c 'mongodump --archive' > db.dump

    When successful, you should see db.dump file in the current directory.

    To restore the backup, run the following command:

    docker exec -i <container_name> sh -c 'mongorestore --archive' < db.dump

    You can export your database dump directly to MongoDB Atlas by simply running

    mongorestore --uri mongodb+srv://<user>:<password>@cluster0.w2btl.mongodb.net --archive=db.dump

    Congratulations on successfully deploying QuickMeet.Chat using Docker! You can now communicate effortlessly with your team members on your workspace. Visit the accessing your workspace guide to configure your workspace and onboard other team members.


    Was this article helpful?