Installing RocketChat on Ubuntu 16.10 with Snaps
-
RocketChat has updated significantly and installing it on Ubuntu 16.10, or any platform using the Snaps packages, is literally, a snap. Let's start with a vanilla installation of Ubuntu 16.10.
sudo apt-get update sudo apt-get dist-upgrade sudo apt-get install nginx letsencrypt fail2ban sudo snap install rocketchat-server
If all you want is a basic server on port 3000, that's it, it is up and running already! Seriously, that's it. You don't even need nginx or letsecrypt. This is so simple. But we want more, so we are going to keep going.
sudo letsencrypt certonly --standalone -d my.server.com sudo ufw allow 443 sudo ufw deny 3000 sudo ufw allow 22 sudo ufw enable sudo letsencrypt certonly --standalone -d my.server.com sudo vi /etc/nginx/sites-available/default
Here we configure our RocketChat server. Here is a useful configuration file example:
server { #client_max_body_size 80M; listen 443 ssl default_server; server_name my.server.com; ssl on; ssl_certificate /etc/letsencrypt/live/my.server.com/fullchain.pem; ssl_certificate_key /etc/letsencrypt/live/my.server.com/privkey.pem; location / { proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for; proxy_set_header Host $http_host; proxy_set_header X-NginX-Proxy true; proxy_pass http://127.0.0.1:3000; proxy_redirect off; } }
Once done there (be sure to replace every reference to my.server.com with your URL) we just need to fire up nginx.
sudo systemctl start nginx sudo systemctl enable nginx
Done!
-
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
-
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
-
Many thanks Scott for this.
I have stumbled at this site while deploying osticket and found your centos 7 post. So I made an account and currently stalking your posts for I.T knowledge. You truly make very amazing and detailed posts, again many thanks and appreciation from Amman, Jordan.
-
@msff-amman-Itofficer thanks very much!
-
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
According to the new defaults, it is GridFS. I just did a fresh install here as well.
-
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
The default is GridFS, I changed it to filesystem and tried setting the storage to point to a new lvm volume I added to the vm mounted on /data, but found out snap packages are restricted to where they can write to the filesystem which is /var/snap/rocketchat-server/common/
-
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
The default is GridFS, I changed it to filesystem and tried setting the storage to point to a new lvm volume I added to the vm mounted on /data, but found out snap packages are restricted to where they can write to the filesystem which is /var/snap/rocketchat-server/common/
Yes, I did eventually verify and we are definitely on GridFS.
-
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
The default is GridFS, I changed it to filesystem and tried setting the storage to point to a new lvm volume I added to the vm mounted on /data, but found out snap packages are restricted to where they can write to the filesystem which is /var/snap/rocketchat-server/common/
Yes, I did eventually verify and we are definitely on GridFS.
GridFS makes more sense, IMO. That way if you scale out to more than one RocketChat server, the files are all in the DB.
-
@dafyre said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
The default is GridFS, I changed it to filesystem and tried setting the storage to point to a new lvm volume I added to the vm mounted on /data, but found out snap packages are restricted to where they can write to the filesystem which is /var/snap/rocketchat-server/common/
Yes, I did eventually verify and we are definitely on GridFS.
GridFS makes more sense, IMO. That way if you scale out to more than one RocketChat server, the files are all in the DB.
That's gotta be some massive deployment. I wonder when do you need to start scaling out for that.
-
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@dafyre said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@Romo said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?
Using the default install here that Rocket.Chat designed, should be the local filesystem, not GridFS.
The default is GridFS, I changed it to filesystem and tried setting the storage to point to a new lvm volume I added to the vm mounted on /data, but found out snap packages are restricted to where they can write to the filesystem which is /var/snap/rocketchat-server/common/
Yes, I did eventually verify and we are definitely on GridFS.
GridFS makes more sense, IMO. That way if you scale out to more than one RocketChat server, the files are all in the DB.
That's gotta be some massive deployment. I wonder when do you need to start scaling out for that.
You have a good point.
-
It was more a ponderance than a question. I know that ours ran fine on 768MB with one vCPU. Imagine what 2GB and 2vCPU would do!
-
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
It was more a ponderance than a question. I know that ours ran fine on 768MB with one vCPU. Imagine what 2GB and 2vCPU would do!
That brings up another question in my mind, does it take even a single server to run irc.freenode.net?
-
@travisdh1 said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
It was more a ponderance than a question. I know that ours ran fine on 768MB with one vCPU. Imagine what 2GB and 2vCPU would do!
That brings up another question in my mind, does it take even a single server to run irc.freenode.net?
Not likely. That's a tiny workload.
-
@travisdh1 said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller said in Installing RocketChat on Ubuntu 16.10 with Snaps:
It was more a ponderance than a question. I know that ours ran fine on 768MB with one vCPU. Imagine what 2GB and 2vCPU would do!
That brings up another question in my mind, does it take even a single server to run irc.freenode.net?
It most definitely can be a single server. I helped Pops run MSNBC's news chat, and the Don Imus Radio program chat for a while and during busy news happenings, there could be anywhere from 10k to 20k on a single chat server (unsure of the specs, sadly).
Something as big as FreeNode, I'd imagine would run several servers for redundancy or something.
-
Works yet connection to app.com times out app.com:3000 works.
Something with a keep alive values I guess. Can you update config?
-
@alex69 said in Installing RocketChat on Ubuntu 16.10 with Snaps:
Works yet connection to app.com times out app.com:3000 works.
Something with a keep alive values I guess. Can you update config?
That means that you didn't complete the configuration. Port 3000 should not even be open. There is an Nginx proxy in front of port 3000 that converts it to port 443.
-
@scottalanmiller I had this running when I was testing it out vs. Mattermost but one thing I've discovered with Mattermost is that, when you post a message with an attachment, deleting the message does NOT delete the attachment. The file is forever on your server. Yep, that's true. It never deletes the file. So now I'm back to looking at Rocket.Chat and wonder if it also does the same thing. Does anyone know?
Btw, LOVE this easy install!
-
@nashbrydges said in Installing RocketChat on Ubuntu 16.10 with Snaps:
@scottalanmiller I had this running when I was testing it out vs. Mattermost but one thing I've discovered with Mattermost is that, when you post a message with an attachment, deleting the message does NOT delete the attachment. The file is forever on your server. Yep, that's true. It never deletes the file. So now I'm back to looking at Rocket.Chat and wonder if it also does the same thing. Does anyone know?
Never looked into that behaviour. Interesting question.
-
Just as a heads up on this, to be able to use the mobile app you need to add websocket Support to the Ngnix Reverse Proxy configuration as below:
location /websocket { proxy_pass http://127.0.0.1:3000; proxy_http_version 1.1; proxy_set_header Upgrade websocket; proxy_set_header Connection upgrade; }