When it comes to business messaging platforms, you want to find a good balance between cost, features and security. Slack is great, but it’s a little pricey since it uses a pay-per-user model. Fortunately, there are messaging platforms that are feature-rich and won’t clean out your company piggy bank as your team grows.

Rocket.Chat is a free, self-hosted, open-source alternative to pricier messaging programs like Slack. Not only does it not impact the bottom line, it’s a secure platform that lets you control your chat history.

If you’d like to make the platform more secure, while also understanding what the application and all of its pieces are doing, you can try this method to deploy Rocket.Chat without using Docker on CentOS 7.


Install Requirements

1. Add MongoDB Repository:

2. Rocket.Chat used Meteor, which requires Node.js version 0.10.40 or greater. Currently, the most recent version of Node.js available via the package manager is 0.10.36, so it will instead need to be installed manually.

3. Install Additional Requirements

4. Make SELinux permissive (if you want to, otherwise go through the difficulty of opening ports for MongoDB):

change

to

5. Restart for the SELinux changes to take effect:


Configure MongoDB

1. Ensure that MongoDB is set to run on system restart:

Optional: Configure the MongoDB replica set for Meteor.
This step will make the MongoDB oplog available to Meteor. By default Meteor continuously polls MongoDB looking for changes. The oplog allows Meteor to track receive relevant changes as they happen instead of polling. In most situations enabling the oplog will result in increased performance.

2. Add the replica to the MongoDB configuration file:

3. Update the replication section to read:

4. Start the replica:


New Call-to-action


Install Rocket Chat

1. Download the latest version of Rocket.Chat:

2. Untar and move it to its base directory:

3. Install:

4. Run the app:

The login page should now be available at http://localhost:3000/.


Get Rocket.Chat Running with a Process Manager

1. Install the process manager (pm2):

2. Start Rocket.Chat manager using the process manager:

Rocket.Chat requires three environment variables to be set: ROOT_URL, MONGO_URL, and PORT. If you chose to enable the MongoDB replica set MONGO_OPLOG_URL is also required. The easiest way to set these variables is to include them in the command. This will ensure they carried over on restart.

3. Add init scripts for pm2 to allow app to start on startup:

Should output text that will tell you to run:


Put Nginx in Front of Rocket.Chat

While putting Nginx in front of the application is not necessary, it will allow you to easily make your site secure in the future. Until you’re ready to add ssl to your application, it’s easy to setup nginx to forward requests to your application.

The login page should now be available at http://localhost/.


Add Your First Admin User

1. Create a new user via the UI. Add admin role to newly created user in MongoDB:

 

Finally, you should see the Rocket.Chat login page. Now you’re all set to get chatting for free!

rocket_chat_base

New Call-to-action

Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on RedditBuffer this pagePrint this pageEmail this to someone

Related Posts

Related Topics & Tags: General Information Help Quick Tips

About Ashley Mathew

Ashley is an operations engineer at SmartFile.

Leave a Reply

Your email address will not be published. Required fields are marked *