Deployment guide

Host Rocket.Chat on your own VPS

Deploy on a VPS Cloud →

Self-hosting8 min read

Host Rocket.Chat on your own VPS

Rocket.Chat is a very complete open source communication platform: chat, audio/video calls, omnichannel and federation. Self-hosted on a VPS, it becomes a communication hub entirely under your control. Here is how to deploy it with Docker, MongoDB and an SSL certificate, and how it positions itself against Mattermost.

Why self-host Rocket.Chat on a VPS

Rocket.Chat goes further than a simple team messaging tool: it offers an omnichannel module (integration of WhatsApp, email, website chat widgets), audio and video calls, and federation via the Matrix protocol allowing communication with other servers. For an agency that wants to centralize both internal communication and customer support, self-hosting on a VPS avoids multiplying subscriptions and keeps all exchanges — including customer conversations — on an infrastructure you control. Rocket.Chat relies on MongoDB, which makes it a bit more resource-hungry than Mattermost, but opens the way to rich integrations and an extension marketplace.

Concrete benefits of a self-hosted Rocket.Chat

  • Built-in omnichannel module to handle web support, email and messaging from a single interface.
  • Audio/video calls and screen sharing without depending on a third-party service.
  • Matrix federation to interconnect your server with other organizations.
  • App marketplace and a broad catalog of integrations (webhooks, bots).
  • Extensive customization of the instance's theme and branding.
  • Conversation data and files kept on your own VPS.

Hardware and software prerequisites

Rocket.Chat and MongoDB are relatively memory-demanding. For a team of up to 50 users, plan for a VPS with 2 to 4 vCPU and at least 4 GB of RAM; aim for 8 GB for an active instance with omnichannel and video calls. MongoDB must absolutely run in replica set mode (even with a single node) because Rocket.Chat uses the oplog for real time. Count on 30 to 50 GB of SSD. You need Docker and Compose, a chat.yourdomain.com subdomain with an A record, and a reverse proxy that handles WebSockets.

Deploy Rocket.Chat with Docker and SSL

01

Provision the VPS

Install Docker and the Compose plugin, create /opt/rocketchat. Check that available RAM is sufficient: MongoDB and Rocket.Chat can saturate a 2 GB VPS under load.

02

Configure MongoDB in a replica set

Declare a mongodb service (image bitnami/mongodb or mongo) enabling the replica set: it is mandatory for the oplog. Without this step, Rocket.Chat starts but real time and some functions fail. Persist the data in a dedicated volume.

03

Define the Rocket.Chat service

Add the rocketchat service (image registry.rocket.chat/rocketchat/rocket.chat) with the MONGO_URL, MONGO_OPLOG_URL and ROOT_URL variables in HTTPS. Make it depend on MongoDB and expose port 3000 internally only.

04

Start and verify

Run docker compose up -d then docker compose logs -f rocketchat. The first startup migrates the MongoDB schema and can take one to two minutes. Wait for the message indicating that the server is ready on port 3000.

05

Set up reverse proxy and SSL

With Caddy: chat.yourdomain.com { reverse_proxy localhost:3000 }. With Nginx, proxy to 127.0.0.1:3000 forwarding the Upgrade/Connection headers for the WebSocket, then generate the certificate via certbot.

06

Finalize the admin setup

Open https://chat.yourdomain.com, complete the wizard (admin account, organization name, SMTP configuration). Disable public registration if the instance is private and configure the omnichannel module only if you need it.

The most common mistake when deploying Rocket.Chat is forgetting to initialize the MongoDB replica set: without rs.initiate(), the oplog is unavailable and real-time chat does not work. If you use the Bitnami image, pass MONGODB_REPLICA_SET_MODE=primary and MONGODB_REPLICA_SET_KEY. Also monitor the RAM consumed by MongoDB via docker stats: on a constrained VPS, cap the WiredTiger cache with --wiredTigerCacheSizeGB to prevent the database from suffocating the rest of the stack.

Rocket.Chat versus Mattermost

CriterionRocket.ChatMattermost
DatabaseMongoDB (replica set required)PostgreSQL
Memory footprintMore resource-hungry (MongoDB)Leaner at equal load
Omnichannel / customer supportBuilt-in native moduleVia third-party integrations
Audio/video callsBuilt inVia plugins / Calls (paid edition)
FederationMatrixLimited
App marketplaceRich and nativePlugins, a more restricted catalog
Target audienceUnified communication + customer supportTechnical teams and ChatOps
SetupMore configuration (replica set)More straightforward with PostgreSQL

Deploy Rocket.Chat on a ServOrbit Cloud VPS

With a Cloud VPS with dedicated resources and Docker ready to use, set up Rocket.Chat and MongoDB in a replica set without the headache. Internal communication and customer support brought together at home.

Need help?

Browse our help center and FAQ, or write to our team — support in French, English and Arabic.