Rocket.Chat is a messaging system for team communication, like Slack. It has various features, including:
- Video conferences
- Help desk chat
- File sharing
- Voice messages
- Link previews
this my first post if it can save time to someone i put step by step.
i try without succes snaps and dpaltform procedure precision i am newbie.
I use armbian 5.25
Ip adress of OPI is 192.168.1.153
hostname will be https://mydomain.com
I will use external Mongo database
copy flash to emmc
install ngnix
- sudo systemctl stop log2ram.service
- sudo apt-get -y install nginx
- sudo systemctl start nginx.service
- sudo systemctl start log2ram.service
Copy code install all dependencies required by Rocket.Chat
- sudo apt install graphicsmagick build-essentialy
Copy code Install Node.js and npm and change version of Node.js to 4.5
- sudo apt install nodejs
- sudo apt install npm
- sudo npm install -g n
- sudo n 4.5
- node --version
Copy code A MongoDB database is required to store our chat data. MongoDB could be installed on the Pi, but because of the high write volume it’s probably not too good for your SD card and there is a high risk of data corruption. mLab.com (previously known as Mongo Lab) provides a cloud database service. Their free sandbox package provides a single database with 500 megabytes and no credit card is required.
Install of rocket.chat
- cd /var/www
- sudo curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz
- sudo tar xzf rocket.chat.tgz
- sudo mv bundle Rocket.Chat
- cd Rocket.Chat/programs/server
- sudo npm install
- cd ../..
Copy code Back to nginx configuration for ssl access
- sudo mkdir -p /etc/nginx/ssl/
- cd /etc/nginx/ssl
- sudo openssl req -new -x509 -days 365 -nodes -out /etc/nginx/ssl/rocketchat.crt -keyout /etc/nginx/ssl/rocketchat.key
- sudo chmod 400 rocketchat.key
Copy code create a Virtual Host configuration
- sudo nano /etc/nginx/sites-available/rocketchat
Copy code paste the following configuration:
- # Upstreams
- upstream backend {
- server 127.0.0.1:3000;
- }
- # HTTPS Server
- server {
- listen 443;
- server_name mydomain.com;
- error_log /var/log/nginx/rocketchat.access.log;
- ssl on;
- <pre><font face="Tahoma">ssl_certificate /etc/nginx/ssl/rocketchat.crt;
- ssl_certificate_key /etc/nginx/ssl/rocketchat.key;</font></pre>ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE
- location / {
- proxy_pass http://backend/;
- proxy_http_version 1.1;
- proxy_set_header Upgrade $http_upgrade;
- proxy_set_header Connection "upgrade";
- proxy_set_header Host $http_host;
- proxy_set_header X-Real-IP $remote_addr;
- proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
- proxy_set_header X-Forward-Proto http;
- proxy_set_header X-Nginx-Proxy true;
- proxy_redirect off;
- }
- }
Copy code Save, exit and activate this configuration- sudo ln -s /etc/nginx/sites-available/rocketchat /etc/nginx/sites-enabled/rocketchat
Copy code test and restart NGINX
- sudo nginx -t
- sudo systemctl restart nginx
Copy code Now we make a script to start rocket.chat
- cd /var/www/Rocket.Chat/
- nano rocket
Copy code paste following line with your url from mongoDB save
- export ROOT_URL=https://mydomain.com
- export <b>export MONGO_URL=mongodb://user:password@xxxxx.mlab.com:111111/xxxxx</b>
- export PORT=3000
- node main.js
Copy code give right to execute
to start the script wait 2 min to be ready
- ./rocket http://localhost:3000
Copy code forward port on your routeur 80 443
can also acces in local https:192.168.1.162 or http//:192.168.1.162:3000
enjoy!!
fisrt user is the admin
|