How to Install Rocket Chat on Ubuntu 16.04 with Docker

Rocket.Chat is a Web Chat Server, developed in JavaScript. It is an open source messaging APP built with Meteor fullstack framework. It is a great solution for communities and companies who need to host their own private chat service or for developers who're planning to build and evolve their own chat platforms. There are several features for this Chat APP. Some of the major features includes video conferencing, file sharing, voice messages, helpdesk chat, link preview, fully-featured API, extendablility, native applications, mobile applications and lot more.

In this article, I'm providing you with the step by step instructions on how to install our Rocket.Chat on a Docker container.

 Step 1 - Installing Git

We can install Git packages from their repositories by just running this command. Git packages are used to clone the project repository.

[email protected]:~# apt-get update
[email protected]:~# apt-get install -y git
Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.7.4-0ubuntu1).
0 upgraded, 0 newly installed, 0 to remove and 105 not upgraded.
[email protected]:~# git clone
Cloning into 'Rocket.Chat'...
remote: Counting objects: 55385, done.
remote: Compressing objects: 100% (177/177), done.
remote: Total 55385 (delta 69), reused 0 (delta 0), pack-reused 55207
Receiving objects: 100% (55385/55385), 37.48 MiB | 10.80 MiB/s, done.
Resolving deltas: 100% (38031/38031), done.
Checking connectivity... done.

Step 2 - Installing Docker

Docker simplifies this installation process. Docker is an open-source project that automates the deployment of applications inside software containers. You can either install docker by apt-get install docker-engine command or you can use this below command to get the latest Docker package.

curl -sSL | sh

Step 3  - Installing Docker-Compose

Compose is a docker tool for defining and running multi-container applications with Docker. Using this tool, you define a multi-container application in a single file, and run that file using a single compose command to spin your application up and running. You can install the docker compose either using apt-get install docker-compose or using this below command to download the latest docker compose version:

curl -L`uname -s`-`uname -m` > /usr/local/bin/docker-compose
chmod +x /usr/local/bin/docker-compose

You can get the latest docker compose releases and download those instead.

Step 4 - Cloning

Before installing, we need to clone our repository using git to a folder named Rocker.Chat.

[email protected]:~# git clone
Cloning into 'Rocket.Chat'...
remote: Counting objects: 55385, done.
remote: Compressing objects: 100% (177/177), done.
remote: Total 55385 (delta 69), reused 0 (delta 0), pack-reused 55207
Receiving objects: 100% (55385/55385), 37.48 MiB | 10.80 MiB/s, done.
Resolving deltas: 100% (38031/38031), done.
Checking connectivity... done.

Step 5 - Installing

Now move to the Rocker.Chat folder  and run our docker-compose file.

[email protected]:~# cd Rocket.Chat
[email protected]:~/Rocket.Chat# docker-compose up


[email protected]:~/Rocket.Chat# docker-compose up
Pulling mongo (mongo:latest)...
latest: Pulling from library/mongo
5c68a10e9f3f: Pull complete
0110f95fa9c8: Pull complete
0cba4a42bc41: Pull complete
a6eafd7fba3f: Pull complete
703d9d7e0e21: Pull complete
6c18d5bc22c9: Pull complete
fd3fcba178e3: Pull complete
c8b9b5488049: Pull complete
41f37d58ab4c: Pull complete
Digest: sha256:beff97308c36f7af664a1d04eb6ed09be1d14c17427065b2ec4b0de90967bb3f
Status: Downloaded newer image for mongo:latest
Creating rocketchat_mongo_1
Pulling hubot (rocketchat/hubot-rocketchat:v0.1.4)...
v0.1.4: Pulling from rocketchat/hubot-rocketchat

ddf65d6bb23c: Pull complete
Digest: sha256:e4c7dccc4ec00f24dd7e25febc9cf0b653df085ea42eb605fcd8409736d52559
Status: Downloaded newer image for rocketchat/hubot-rocketchat:v0.1.4
Creating rocketchat_hubot_1
Attaching to rocketchat_mongo_1, rocketchat_rocketchat_1, rocketchat_hubot_1

Running this composer file, will start downloading all the required images as specified in the docker compose file and create all three instances required for our Rocket.Chat as highlighted.

[email protected]:~/Rocket.Chat# docker ps
db701321e7a2 rocketchat/hubot-rocketchat:v0.1.4 "/bin/sh -c 'node -e " 4 hours ago Up 4 hours>8080/tcp rocketchat_hubot_1
f1f2c9476121 rocketchat/ "node main.js" 4 hours ago Up 4 hours>3000/tcp rocketchat_rocketchat_1
082f45829ae5 mongo "/ mongo" 4 hours ago Up 4 hours 27017/tcp rocketchat_mongo_1

We can view the Rocket.Chat version and configuration information during the installation phase.


That's all!! We've completed with the Rocket.Chat installation. You can access you chat application using the URL >>http://DockerIP:3000


You can register your new email account and start creating our own private group chats.

Step 6 - Managing the users and Groups

Probably, the first user registered and logged in, will be the admin user and all other user logins will be secondary ones.


You can create your own Channels/groups and set the privacy as needed. You can use the '+' icon near the Channels section to add any number of groups.


Click on the Members list options present on the right hand side to add required users to your new channel. In addition, you can use the individual user tabs below to set the user privileges.



Refer this document for more details on managing this. I hope this article is useful for you. I would recommend your valuable comments and suggestions on this. Happy Chatting!!

Saheetha Shameer 3:00 am

About Saheetha Shameer

Self-motivated and dedicated Linux Administrator having 10 years of working experience on various web-hosting control panels and Unix distributions. I'm a quick learner and have a slight inclination towards following the current and emerging trends in the industry. I'm passionate about testing/reviewing new Linux applications and open source tools.

Author's All Posts
Like to become part of Linoxide Team and contribute tips? Contact us here.


Your email address will not be published. Required fields are marked *

All comments are subject to moderation.


  1. Hello,

    thanks for this manual,
    the installation works well!
    but I have a problem, after a restart, Docker comes not up again, witch command do i need for?
    May it´s possible to let Rocket Chat start automatically after a reboot?


  2. Need help.

    I followed the instructions and everything worked great. After I turned on the computer at a later date, I got the following messages and was not able to run RocketChat. Since I am new to this stuff, I do not know how to interpret the messages and would greatly appreciate some help:

    mongo_1 | 2016-12-20T20:26:18.867+0000 W - [initandlisten] Detected unclean shutdown - /data/db/mongod.lock is not empty.
    mongo_1 | 2016-12-20T20:26:18.867+0000 W STORAGE [initandlisten] Recovering data from the last clean checkpoint.

    mongo_1 | 2016-12-20T20:26:20.345+0000 W STORAGE [initandlisten] Detected configuration for non-active storage engine mmapv1 when current storage engine is wiredTiger
    mongo_1 | 2016-12-20T20:26:20.345+0000 I CONTROL [initandlisten]
    mongo_1 | 2016-12-20T20:26:20.345+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/enabled is 'always'.
    mongo_1 | 2016-12-20T20:26:20.345+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
    mongo_1 | 2016-12-20T20:26:20.345+0000 I CONTROL [initandlisten]
    mongo_1 | 2016-12-20T20:26:20.345+0000 I CONTROL [initandlisten] ** WARNING: /sys/kernel/mm/transparent_hugepage/defrag is 'always'.
    mongo_1 | 2016-12-20T20:26:20.346+0000 I CONTROL [initandlisten] ** We suggest setting it to 'never'
    mongo_1 | 2016-12-20T20:26:20.346+0000 I CONTROL [initandlisten]
    mongo_1 | 2016-12-20T20:26:20.417+0000 I FTDC [initandlisten] Initializing full-time diagnostic data capture with directory '/data/db/'
    mongo_1 | 2016-12-20T20:26:20.417+0000 I NETWORK [HostnameCanonicalizationWorker] Starting hostname canonicalization worker
    mongo_1 | 2016-12-20T20:26:20.417+0000 I NETWORK [initandlisten] waiting for connections on port 27017
    mongo-init-replica_1 | connecting to: mongo/rocketchat
    mongo-init-replica_1 | 2016-12-20T20:26:20.311+0000 W NETWORK [thread1] Failed to connect to, reason: errno:111 Connection refused
    mongo-init-replica_1 | 2016-12-20T20:26:20.311+0000 E QUERY [thread1] Error: couldn't connect to server mongo:27017, connection attempt failed :
    mongo-init-replica_1 | [email protected]/mongo/shell/mongo.js:231:14
    mongo-init-replica_1 | @(connect):1:6
    mongo-init-replica_1 |
    mongo-init-replica_1 | exception: connect failed
    rocketchat_mongo-init-replica_1 exited with code 1
    mongo_1 | 2016-12-20T20:26:21.420+0000 I REPL [rsSync] transition to primary complete; database writes are now permitted
    rocketchat_rocketchat_1 exited with code 1