View: 6652|Reply: 0

Rocket.Chat on Orange PI pc+

[Copy link]

1

threads

1

posts

9

credits

Novice

Rank: 1

credits
9
Published in 2017-4-17 22:29:02 | Show all floors |Read mode
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
  1. sudo nand-sata-install
Copy code
install ngnix
  1. sudo systemctl stop log2ram.service
  2. sudo apt-get -y install nginx
  3. sudo systemctl start nginx.service
  4. sudo systemctl start log2ram.service
Copy code
install all dependencies required by Rocket.Chat
  1. sudo apt install graphicsmagick build-essentialy
Copy code
Install Node.js and npm and change version of Node.js to 4.5
  1. sudo apt install nodejs
  2. sudo apt install npm
  3. sudo npm install -g n
  4. sudo n 4.5
  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
  1. cd /var/www
  2. sudo curl -L https://rocket.chat/releases/latest/download -o rocket.chat.tgz
  3. sudo tar xzf rocket.chat.tgz
  4. sudo mv bundle Rocket.Chat
  5. cd Rocket.Chat/programs/server
  6. sudo npm install
  7. cd ../..
Copy code
Back to nginx configuration for ssl access
  1. sudo mkdir -p /etc/nginx/ssl/
  2. cd /etc/nginx/ssl
  3. sudo openssl req -new -x509 -days 365 -nodes -out /etc/nginx/ssl/rocketchat.crt -keyout /etc/nginx/ssl/rocketchat.key
  4. sudo chmod 400 rocketchat.key
Copy code
create a Virtual Host configuration
  1. sudo nano /etc/nginx/sites-available/rocketchat
Copy code
paste the following configuration:
  1. # Upstreams
  2. upstream backend {
  3.     server 127.0.0.1:3000;
  4. }

  5. # HTTPS Server
  6. server {
  7.     listen 443;
  8.     server_name mydomain.com;

  9.     error_log /var/log/nginx/rocketchat.access.log;

  10.     ssl on;
  11. <pre><font face="Tahoma">ssl_certificate /etc/nginx/ssl/rocketchat.crt;
  12. ssl_certificate_key /etc/nginx/ssl/rocketchat.key;</font></pre>ssl_protocols TLSv1 TLSv1.1 TLSv1.2; # don’t use SSLv3 ref: POODLE

  13.     location / {
  14.         proxy_pass http://backend/;
  15.         proxy_http_version 1.1;
  16.         proxy_set_header Upgrade $http_upgrade;
  17.         proxy_set_header Connection "upgrade";
  18.         proxy_set_header Host $http_host;

  19.         proxy_set_header X-Real-IP $remote_addr;
  20.         proxy_set_header X-Forward-For $proxy_add_x_forwarded_for;
  21.         proxy_set_header X-Forward-Proto http;
  22.         proxy_set_header X-Nginx-Proxy true;

  23.         proxy_redirect off;
  24.     }
  25. }
Copy code
Save, exit and activate this configuration
  1. sudo ln -s /etc/nginx/sites-available/rocketchat /etc/nginx/sites-enabled/rocketchat
Copy code
test and restart NGINX
  1. sudo nginx -t
  2. sudo systemctl restart nginx
Copy code
Now we make a script to start rocket.chat
  1. cd /var/www/Rocket.Chat/
  2. nano rocket
Copy code
paste following line with your url from mongoDB save
  1. export ROOT_URL=https://mydomain.com
  2. export <b>export MONGO_URL=mongodb://user:password@xxxxx.mlab.com:111111/xxxxx</b>
  3. export PORT=3000
  4. node main.js
Copy code
give right  to execute
  1. sudo chmod +x rocket
Copy code
to start the script wait 2 min to be ready
  1. ./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

This thread contains more resources

You need to Log in to download or view,No account?    Register

x
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list