Skip to content

Ansible Role linuxfabrik.lfops.rocketchat

This role installs and configures Rocket.Chat, an Open-Source Chat system, as a Podman container.

Mandatory Requirements

If you use the "Setup Rocket.Chat" Playbook, this is automatically done for you (you still have to take care of providing the required versions).

  • Make sure the container can access the MongoDB instance:
mongodb__conf_net_bind_ip:
  - 'localhost'
  - 'fqdn.example.com' # allow access from container. make sure the DNS entry (or /etc/hosts) points to the correct ip (not 127.)
mongodb__repl_set_members:
  - 'fqdn.example.com' # else the client gets redirected to localhost, which does not work from inside the container

Optional Requirements

  • It is recommended to set Storage=presistent in /etc/systemd/journald.conf to allow the user to use journalctl --user. This can be done using the linuxfabrik.lfops.systemd_journald role.
  • If the host should act as a Postfix MTA, make sure it is listening on the IP address so that the container can reach it. This can be done using the linuxfabrik.lfops.systemd_journald role.

Tags

rocketchat

  • Installs and configure Rocket.Chat.
  • Triggers: systemctl --user restart rocketchat-container.service.

Mandatory Role Variables

rocketchat__mongodb_login

  • The user account for accessing the MongoDB database. Mandatory when authentication in MongoDB is enabled.
  • Type: Dictionary.

rocketchat__root_url

  • The URL on which the Rocket.Chat server will be available.
  • Type: String.

Example:

# mandatory
rocketchat__mongodb_login:
  username: 'rocketchat'
  password: 'linuxfabrik'
rocketchat__root_url: 'https://rocketchat.example.com'

Optional Role Variables

rocketchat__container_enabled

  • Enables or disables the service, analogous to systemctl enable/disable.
  • Type: Bool.
  • Default: true

rocketchat__container_state

  • Changes the state of the service, analogous to systemctl start/stop/restart/reload. Possible options: started, stopped, restarted, reloaded.
  • Type: String.
  • Default: 'started'

rocketchat__mongodb_host

  • The host on which MongoDB is reachable.
  • Type: String.
  • Default: 'host.containers.internal'

rocketchat__mongodb_port

  • The port on which MongoDB is reachable.
  • Type: Number.
  • Default: 27017

rocketchat__mongodb_repl_set_name

  • The name of the MongoDB replica set for Rocket.Chat.
  • Type: String.
  • Default: 'rs01'

rocketchat__port

  • The port on which Rocket.Chat server will be available.
  • Type: Number.
  • Default: 3000

rocketchat__user_home_directory

  • The home directory of the user running Rocket.Chat.
  • Type: String.
  • Default: '/opt/rocketchat'

rocketchat__version

  • Which Rocket.Chat version to install. Have a at the available releases.
  • Type: String.
  • Default: 'latest'

Example:

# optional
rocketchat__container_enabled: true
rocketchat__container_state: 'started'
rocketchat__mongodb_host: 'localhost'
rocketchat__mongodb_port: 27017
rocketchat__mongodb_repl_set_name: 'rs01'
rocketchat__port: 3000
rocketchat__user_home_directory: /opt/Rocket.Chat
rocketchat__version: 'latest'

License

The Unlicense

Author Information

Linuxfabrik GmbH, Zurich