Newer
Older
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
Third-party RocketChat Package for Debian
=========================================
RocketChat is a web-based chat platform. See https://rocket.chat/ for details.
This is a package for deploying RocketChat on Debian Buster or Bullseye.
**Disclaimer:** This package is provided by a third party. It is **not** an
official package from the RocketChat project or the Debian project. It is
automatically built from upstream releases without any review or testing.
The package does not fully adhere to Debian packaging standards (especially
regarding the vendoring of dependencies).
Prerequisite: Node.js 12
------------------------
**This only applies to Debian Buster.** The Node.js version in Debian
Bullseye is new enough.
RocketChat requires at least version 12 of Node.js. The package in the official
Debian repositories for Debian Buster is too old.
Enable nodesource.com Debian repo:
```sh
wget -q https://deb.nodesource.com/gpgkey/nodesource.gpg.key -O /etc/apt/trusted.gpg.d/nodesource.asc
echo "deb https://deb.nodesource.com/node_12.x buster main" > /etc/apt/sources.list.d/nodesource.list
apt update
```
Installing the RocketChat package later automatically installs Node.js as a
dependency.
Prerequisite: MongoDB
---------------------
MongoDB is not available in the official Debian repositories. However, the
MongoDB project provides a third-party repo for Debian.
MongoDB can be installed on the same system as RocketChat or on a separate
system. The default config in the RocketChat package expects a local
installation of MongoDB.
Enable the mongodb.org Debian repo and install the `mongodb-org` package:
```sh
wget https://www.mongodb.org/static/pgp/server-4.2.asc -O /etc/apt/trusted.gpg.d/mongodb.asc
echo "deb http://repo.mongodb.org/apt/debian buster/mongodb-org/4.2 main" > /etc/apt/sources.list.d/mongodb.list
apt update
apt install mongodb-org
```
Note: At the time of writing there is no repo for Debian Bullseye on
repo.mongodb.org. The Debian Buster repo seems to work fine on Bullseye.
RocketChat requires [setting up a replica set](https://docs.rocket.chat/quick-start/installing-and-updating/manual-installation/mongo-replicas).
Configure the replica set, start MongoDB and initialize the replica set:
```sh
printf 'replication:\n replSetName: "rs01"\n' >> /etc/mongod.conf
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
mongo --eval 'rs.initiate()'
```
If you install MongoDB on the same host as RocketChat, the corresponding
MongoDB URL is `mongodb://localhost:27017/rocketchat?replicaSet=rs01` and
the oplog URL is `mongodb://localhost:27017/local?replicaSet=rs01`. These
are the default values, so you don't need to change the RocketChat config
in `/etc/rocketchat.conf`.
Install and Setup RocketChat
----------------------------
Enable the `infrapackages-rocketchat` repo on https://packages.cccv.de/,
then install the package `rocketchat`:
```sh
wget https://packages.cccv.de/docs/cccv-archive-key.gpg -O /etc/apt/trusted.gpg.d/cccv-archive.asc
echo "deb https://packages.cccv.de/infrapackages-rocketchat bullseye main" > /etc/apt/sources.list.d/cccv-rocketchat.list
apt update
apt install rocketchat
```
Customize the configuration in `/etc/rocketchat.conf` and restart RocketChat
with `systemctl restart rocketchat`.
Per default RocketChat listens on `http://localhost:3000/`. Open
`http://localhost:3000/` in a webbrowser and follow the setup instructions.
Setup Follower Instances
------------------------
Node.js applications are single-threaded. If you have more than a single CPU
core, you will want to run [additional RocketChat instances ("followers") on
the same host](https://docs.rocket.chat/quick-start/installing-and-updating/manual-installation/multiple-instances-to-improve-performance)
to improve performance.
The package includes the systemd service template `rocketchat-follower@`. The
instance name is used as the IP the RocketChat follower instance binds to.
Note that the official guide uses different ports for follower instances
instead of different IPs. We found that with enabled Prometheus metrics,
follower instances fail to start as they attempt to bind the same metrics
port as the main instance.
Follower instances use the same config options as the main instance
(`/etc/rocketchat.conf`). Options can be overwritten for followers in
`/etc/rocketchat-follower.conf`
To enable one follower (e.g. on a system with two CPUs) run:
```sh
systemctl enable rocketchat-follower@127.0.0.2
systemctl restart rocketchat
```
Afterwards the two instances will listen on `http://127.0.0.1:3000/` and
`http://127.0.0.1:3001/`. Setup a load-balancer to use both instances as
upstreams.