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.