Introducing rocketchatctl

Introducing Rocketchatctl

Note: This is still early days. Let us know if you run into any issues

We would like to introduce a new way to install and manage Rocket.Chat. We call it rocketchatctl. Installing it and Rocket.Chat is as easy as:

bash -c "$(curl https://rocket.chat/install.sh)"

This will download the rocketchatctl command and begin a guided install for installing Rocket.Chat on your server.

It will install:

  • Mongodb
  • Node.js
  • Rocket.Chat
  • Traefik or Caddy as load balancer
  • Systemd init files for Rocket.Chat and your loadbalancer

Demo

More info

You can provide options to make the install unattended. In the demo above, iā€™m actually providing the email for letsencrypt via the command:

bash -c "$(curl https://rocket.chat/install.sh)" -s --letsencrypt-email=value

If you want to update Rocket.Chat you can now just run:

rocketchatctl update

The output of the help option:

# rocketchatctl -h
rocketchatctl command line tool to install and update RocketChat server

Usage: rocketchatctl [options] [--root-url=ROOT_URL --port=PORT letsencrypt-email=EMAIL --webserver=WEBSERVER  --version=VERSION --install-node --use-mongo]
Installs node, mongo, RocketChat server and optionally a webserver (Caddy or Traefik), sets up directories and permissions to use Let's Encrypt certificates.
In case node or mongo already installed, it uses already installed versions though confirmation is required.
For node it set v8.11.4 as default in your system, for mongo mmapv1 storage engine and no authentication enabled is required during installation.
If you wish this script to run unattended, provide extra flags to the install option, server URL is required (--root-url).

OPTIONS
  -h help               Display this message
  install               Install latest RocketChat server version
  update                Update RocketChat server from current version to latest version
  check-updates         Check for updates of RocketChat server
  upgrade-rocketchatctl     Upgrade the rocketchatctl command line tool

FOR UNATTENDED INSTALLATION
  --root-url=ROOT_URL       the public URL where RocketChat server will be accessible on the Internet (REQUIRED)
  --port=PORT               port for the RocketChat server, default value 3000
  --webserver=WEBSERVER     webserver to install as reverse proxy for RocketChat server, options are caddy/traefik/none (REQUIRED)
  --letsencrypt-email=EMAIL e-mail address to use for SSL certificates (REQUIRED if webserver is not none)
  --version=VERSION         RocketChat server version to install, default latest
  --install-node            in case node installed, sets node to RocketChat server recommended version, default behavoir cancel RocketChat server installation
  --use-mongo               in case mongo installed, and storage engine configured is mmapv1, skip mongo installation but uses systems mongo for RocketChat server database,
                            default database name rocketchat

Let us know what you think!

2 Likes

Is it single mongodb deploy or mongodb replset deploy?

Rocket.Chat requires it. So if installed via the script it does setup in replicaset mode