Rocket.Chat

Setup Rocket.Chat locally with Docker

For a minimal effort local Rocket.Chat installation follow the steps below.

$ docker pull rocket.chat
$ docker run --name db -d mongo:latest --replSet rs0 --oplogSize 128
$ docker exec -ti db mongosh --eval "printjson(rs.initiate())"
$ docker run --name rocketchat -p 80:3000 --link db --env ROOT_URL=http://chat.mydomain.local --env MONGO_OPLOG_URL=mongodb://db:27017/local -d rocket.chat

## Add 'chat.mydomain.local' to /etc/hosts
$ docker inspect -f '{{range.NetworkSettings.Networks}}{{.IPAddress}}{{end}}' rocketchat
$ vim /etc/hosts 

Open your browser and go to http://chat.mydomain.local, follow the Wizard to create your first Administrator account. One step 4/4 you'll get stuck pending verification, we can bypass this by manually setting Show_Setup_Wizard to complete in the database.

$ docker exec -it db /bin/bash
root@44f612268905:/# mongosh
test> show databases
test> use meteor
meteor> db.rocketchat_settings.update({"_id":"Show_Setup_Wizard"}, {$set: {"value" : "completed"} });

Everything is now complete and you should be able to use your Rocket.Chat application.


Setup Rocket.Chat using docker compose

In this example we'll setup Rocket.Chat version 7.3.0 with MongoDB 6.0.13.

Download / copy the latest docker compose file from Rocket.Chat gitarrow-up-right, edit the compose file to your likings. My file:

Create a .envfile:

Create the stack using portainer and we should be presented with rocket.chat's setup wizard (if npm and firewall configuration is correct).

Bypass installation wizard

On first install going through the installation wizard we'll get stuck on "Awaiting confirmation (Step 4/4)".

We can bypass this by modifying the database that the wizard has been completed.

From portainer open the console to rocket_mongodb.

Other nice-to-have database commands:

Last updated