Deploy RocketChat on Debian with Docker
- 1 GB RAM
sudo apt-get install -y git
Clone the RocketChat repository and navigate to within the source code.
git clone https://github.com/RocketChat/Rocket.Chat.git
Clone the docker-compose file up to your home and remove all the other content (we dont actually wan the code and this simplifies the volumes later).
mv Rocket.Chat/docker-compose.yml $HOME/. rm -rf Rocket.Chat
Now open the file in your editor. It should look similar to below (although it keeps changing).
version: '2' services: rocketchat: image: rocketchat/rocket.chat:latest restart: unless-stopped volumes: - ./uploads:/app/uploads environment: - PORT=3000 - ROOT_URL=http://localhost:3000 - MONGO_URL=mongodb://mongo:27017/rocketchat - MONGO_OPLOG_URL=mongodb://mongo:27017/local - MAIL_URL=smtp://smtp.email # - HTTP_PROXY=http://proxy.domain.com # - HTTPS_PROXY=http://proxy.domain.com depends_on: - mongo ....
Go through it and change all instances of
http://localhost:3000 to your server's IP or hostname.
Start rocket chat (both the mongo database container and the application container) by running the command below:
Navigate to the server in your web browser.
https://[server ip or hostname]:3000
There is no default admin account at the time of writing this tutorial. Register yourself as the first user, which does not require email authentication and will default you to being an administrator.
The first time you register, you will be stuck on this screen for a looooong time.
You may also see messages in the CLI from when you ran docker-compose with error messages from hubot_1. Just ignore these and wait.
If you wait patiently enough, eventually you will see this screen and you're good to go.
One of the first things you may need to do is look through the settings and configure SMTP and email confirmation for registration.
A Note About State
After having run the docker-compose up command, rocket chat will create the following folders from wherever you ran the command (which should be in
$HOME if you used my instructions).
The folders are volumes for your containers and hold the state so that your server will persist across reboots/containers.
At this point, the only way to enable SSL is to configure a reverse proxy that points to this container. I will provide better instructions for how to do this, at a later date.
Once you have installed the server. You may wish to install the client rather than connecting through your web browser.