Rocket.Chat

Quick Docker Setup

N/ABASH
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 the container IP to /etc/hosts, then access at http://chat.mydomain.local.

Docker Compose

Create a .env file:

.envBASH
ROOT_URL=http://chat.mydomain.local:3000

Use a compose file with Rocket.Chat 7.3.0 and MongoDB 6.0.13, defining separate volumes for app data and database, and isolated proxy/backend networks.

Wizard Bypass

The setup wizard may hang on step 4/4. Fix via MongoDB:

N/ABASH
mongosh
use rocketchat
db.rocketchat_settings.updateOne(
  {"_id":"Show_Setup_Wizard"},
  {$set: {"value": "completed"}}
);

Database Management

N/ABASH
# Reset user password (bcrypt hash)
db.users.updateOne({username: "admin"}, {$set: {bcrypt: "<hash>"}})
 
# Disable 2FA
db.users.updateOne({username: "admin"}, {$unset: {"services.totp": 1}})
 
# Assign role
db.users.updateOne({username: "admin"}, {$addToSet: {roles: "admin"}})
Disclaimer

All content published on exploit.se is intended strictly for educational and informational purposes. Research is conducted responsibly under coordinated disclosure principles.

Techniques, tools, and writeups shared on this site are meant to advance the security community's understanding of vulnerabilities and defences. They are not intended to encourage or enable unauthorised access to any system.

The author bears no responsibility for any misuse of information presented here.

Cookie Settings

This site does not use cookies, analytics, or any third-party tracking technologies.

No personal data is collected. No fingerprinting. No ads. You are not the product.


 ██╗ ██████╗ ███████╗██╗███████╗███╗   ██╗██████╗
 ██║██╔═══██╗██╔════╝██║██╔════╝████╗  ██║██╔══██╗
 ██║██║   ██║█████╗  ██║█████╗  ██╔██╗ ██║██║  ██║
 ██║██║   ██║██╔══╝  ██║██╔══╝  ██║╚██╗██║██║  ██║
 ██║╚██████╔╝██║     ██║███████╗██║ ╚████║██████╔╝
 ╚═╝ ╚═════╝ ╚═╝     ╚═╝╚══════╝╚═╝  ╚═══╝╚═════╝
You found me.
↑↑↓↓←→←→ B A  ·  click to close