RocketChat.Server
Rocket.Chat
Deploy Rocket.Chat, the best free web chat platform, using Ansible!
Notes
- The
master
branch now has the latest code based onv2.0
. To get the most current version, do not specify a version, or useversion: master
. - If you're using
v1.9
, you can still use version tags likev1.9
orv1.9.0
, but there won't be many updates for those.
Features
Full Stack Deployment (optional): Fully install Rocket.Chat along with MongoDB and Nginx for SSL. Or, connect Rocket.Chat with your existing MongoDB or Nginx.
Automatic SSL Certificate Generation (optional): Automatically create SSL certificates for secure connections using Nginx. Or, you can use your own SSL certificates!
Automatic Upgrades (optional, requires Ansible 2.0): Automatically update Rocket.Chat to the latest version. Change the
rocket_chat_version
to your desired version, setrocket_chat_automatic_upgrades
totrue
, and this role will handle everything else. If any updates are available for your Rocket.Chat version, this role will upgrade it while preserving your data. Note: This feature requires Ansible 2.0.
Supported Platforms
Debian
- Stretch (9)
- Buster (10)
Ubuntu
- Bionic Beaver: 18.04 LTS
- Xenial: 16.04 LTS
- Trusty: 14.04 LTS
EL (RHEL/CentOS)
- 7
If you want your operating system to be supported, please let us know by raising an issue!
Having Issues?
Make sure to check the FAQ and all the documentation before asking for help.
Role Variables
All variables have reasonable defaults in defaults/main.yml
.
Defaults
Name | Default Value | Description |
---|---|---|
rocket_chat_automatic_upgrades |
false | Whether to upgrade Rocket.Chat automatically when source code changes |
rocket_chat_upgrade_backup |
true | Whether to back up the current Rocket.Chat version while upgrading |
rocket_chat_upgrade_backup_path |
"{{ rocket_chat_application_path }}" |
Where to store the backup of Rocket.Chat |
rocket_chat_application_path |
/var/lib/rocket.chat |
The place on the file system to install Rocket.Chat |
rocket_chat_version |
latest |
The version of Rocket.Chat to install |
rocket_chat_service_user |
rocketchat |
The user that will run the Rocket.Chat server |
rocket_chat_service_host |
"{{ ansible_fqdn }}" |
The hostname of the Rocket.Chat server |
rocket_chat_service_port |
3000 | The port Rocket.Chat listens on |
More variables exist under different operating systems. Refer to the vars/
directory for specifics.
Install this Role from Ansible Galaxy
You can download this role from Ansible Galaxy. Include it in your requirements.yml
:
- src: RocketChat.Server
version: v1.9.0
path: roles/external/
Make sure to use version: v1.9.0
if you're on Ansible 1.9.4.
Installing the Ansible 2.0 Version
For Ansible 2.0, you can install this role easily and enjoy extra features like automatic upgrades. Here’s how to specify it in your requirements.yml
:
- src: RocketChat.Server
path: roles/external/
Example Playbook
Here’s a simple playbook for deploying this role on all chat_servers
:
- hosts: chat_servers
roles:
- RocketChat.Server
If you want to exclude MongoDB from the installation and allow automatic upgrades, your playbook will look like this:
- hosts: chat_servers
vars:
rocket_chat_automatic_upgrades: true
rocket_chat_include_mongodb: false
rocket_chat_mongodb_server: 10.19.3.24
roles:
- RocketChat.Server
FAQ
- Why does deployment fail on
Fetch the Rocket.Chat binary tarball
? This error happens when the role is not updated with the latest Rocket.Chat release. You can manually set the correct SHA256 hash sum for the download.
Available Tags
Use the --tags
flag to run specific plays. Available tags include:
vars
build
mongodb
repo
nginx
upgrade
service
Managing the Rocket.Chat Service
This role creates a service named rocketchat
. You can control it using your system's service management commands.
Testing with Vagrant
For testing, there's a Vagrantfile
and provision.yml
playbook in the tests/
directory. To test deployments, navigate to tests/
and run vagrant up
(ensure you have Vagrant & VirtualBox installed). You can see the Rocket.Chat server at http://localhost:4000
.
TODO
- Use Let's Encrypt for SSL
License
MIT
Issues/Contributions
Feel free to: Raise an issue Contribute
Deploy Rocket.Chat
ansible-galaxy install RocketChat.Server