RocketChat New Installation

After researching all over the net, I found that all the guides for setting up RocketChat are no longer applicable.

It is hard to say what is responsible, but a new install following the online guides result in a system that does not work or does not work properly. My first several attempts were installing all components on Ubuntu 20.04 from scratch. This fails because “node v12” which is what all the guides use is deprecated and results in an installation where the RocketChat service won’t start. The version of “node” causes a cascading set of errors with NPM. If you instead use node v14, which some guides indicate, it appears that RocketChat 4.4.2 is not yet compatible.

So, my next couple dozen attempts were to use the Docker version. There is a lot of conflicting information with how to install RocketChat using Docker. These differences involve differing docker-compose files and different environment variables and even different mounted volumes.

If you use the mainstream installation procedure on the RocketChat site, the installation will complete and you can connect to the system. However, new users cannot create accounts either from the web interface or from the mobile interface. So effectively, you end up with a system and the only user is the admin.

After much testing, I have discovered how to create a new RocketChat installation. The procedure involves installing RocketChat v3.18 and updating to v4.4.2 after you have a running system. Even with a brand new install, once you upgrade to 4.4.2, you will get a message saying that MongoDB 4.0.21 is deprecated. RocketChat development has decided to change from MongoDB mmap database configuration to wiredTiger. Sadly, this procedure is elusive and also not simply documented.

Regardless, it is possible to run RocketChat 4.4.2 with its MongoDB 4.0.21 until RocketChat V5 when the new database is needed. Hopefully by then, a from scratch new installation will use the new database structure from the start. So, my end goal was to have a RocketChat v4.4.2 configuration installed with Docker.

So, here is how I got to a functional Docker 4.4.2 installation.

  1. git clone

  2. mv Rocket.Chat/docker-compose.yml $HOME/.

  3. rm -rf Rocket.Chat

  4. Edit docker-compose.yml:

    a) Change the image line for the rocketchat service:

     From:      image:
         to:       image: rocketchat/

    b) Comment out the REG_TOKEN directive

    c) delete the labels for secton for traefic (since we use NPM for now)

  5. docker-compose up -d

  6. Run the web based installation wizard.

  7. Once the wizard is complete:

    a) docker-compose down

    b) Edit docker-compose.yml:

     Change the rocketchat service image line back to: image:
  8. docker-compose up -d

RocketChat development is moving away from docker hub and towards the scarf gateway which is a central access point to containers and packages no matter where they are hosted as a replacement for docker hub. So, it is just another repository for containers. The “3.18” version is not on the new repository, so I used the older docker hub with “image: rocketchat/”.

After you run the installation and the Wizard, change your rocketchat image back to “image:” and the product will upgrade to the latest version. This will result in a usable installation with a proper database where users can create new accounts and log on.

It would be nice to be able to sort out the conversion of the database, but everything I tried just erred out.

Read more about the Scarf Gateway here: We're changing the way we host our Docker Images