ML
    • Recent
    • Categories
    • Tags
    • Popular
    • Users
    • Groups
    • Register
    • Login

    Installing RocketChat on Ubuntu 16.10 with Snaps

    IT Discussion
    ubuntu ubuntu 16.10 nginx rocketchat snaps
    9
    21
    7.7k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • scottalanmillerS
      scottalanmiller
      last edited by

      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!

      RomoR 1 Reply Last reply Reply Quote 4
      • RomoR
        Romo @scottalanmiller
        last edited by

        @scottalanmiller Are you using GRIDFS as default storage type or the filesystem? Any advantage of using one or the other?

        scottalanmillerS 1 Reply Last reply Reply Quote 0
        • scottalanmillerS
          scottalanmiller @Romo
          last edited by

          @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.

          dafyreD RomoR 2 Replies Last reply Reply Quote 0
          • Emad RE
            Emad R
            last edited by

            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.

            scottalanmillerS 1 Reply Last reply Reply Quote 1
            • scottalanmillerS
              scottalanmiller @Emad R
              last edited by

              @msff-amman-Itofficer thanks very much!

              1 Reply Last reply Reply Quote 0
              • dafyreD
                dafyre @scottalanmiller
                last edited by

                @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.

                1 Reply Last reply Reply Quote 0
                • RomoR
                  Romo @scottalanmiller
                  last edited by Romo

                  @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/

                  scottalanmillerS 1 Reply Last reply Reply Quote 0
                  • scottalanmillerS
                    scottalanmiller @Romo
                    last edited by

                    @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.

                    dafyreD 1 Reply Last reply Reply Quote 0
                    • dafyreD
                      dafyre @scottalanmiller
                      last edited by

                      @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. 😄

                      scottalanmillerS 1 Reply Last reply Reply Quote 0
                      • scottalanmillerS
                        scottalanmiller @dafyre
                        last edited by

                        @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.

                        dafyreD 1 Reply Last reply Reply Quote 2
                        • dafyreD
                          dafyre @scottalanmiller
                          last edited by

                          @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.

                          1 Reply Last reply Reply Quote 0
                          • scottalanmillerS
                            scottalanmiller
                            last edited by

                            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!

                            travisdh1T 1 Reply Last reply Reply Quote 1
                            • travisdh1T
                              travisdh1 @scottalanmiller
                              last edited by

                              @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?

                              mlnewsM dafyreD 2 Replies Last reply Reply Quote 0
                              • mlnewsM
                                mlnews @travisdh1
                                last edited by

                                @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.

                                1 Reply Last reply Reply Quote 1
                                • dafyreD
                                  dafyre @travisdh1
                                  last edited by

                                  @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.

                                  1 Reply Last reply Reply Quote 1
                                  • A
                                    alex69
                                    last edited by

                                    Works yet connection to app.com times out app.com:3000 works.

                                    Something with a keep alive values I guess. Can you update config?

                                    scottalanmillerS 1 Reply Last reply Reply Quote 0
                                    • scottalanmillerS
                                      scottalanmiller @alex69
                                      last edited by

                                      @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.

                                      NashBrydgesN 1 Reply Last reply Reply Quote 1
                                      • NashBrydgesN
                                        NashBrydges @scottalanmiller
                                        last edited by

                                        @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!

                                        scottalanmillerS 1 Reply Last reply Reply Quote 0
                                        • scottalanmillerS
                                          scottalanmiller @NashBrydges
                                          last edited by

                                          @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.

                                          1 Reply Last reply Reply Quote 0
                                          • dbeatoD
                                            dbeato
                                            last edited by

                                            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;
                                                }
                                            
                                            1 Reply Last reply Reply Quote 2
                                            • 1
                                            • 2
                                            • 1 / 2
                                            • First post
                                              Last post