{"id":626,"date":"2018-10-17T23:41:02","date_gmt":"2018-10-17T23:41:02","guid":{"rendered":"https:\/\/www.appservgrid.com\/paw92\/?p=626"},"modified":"2018-10-18T14:57:52","modified_gmt":"2018-10-18T14:57:52","slug":"howtoinstallrocketchatondebian9","status":"publish","type":"post","link":"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/howtoinstallrocketchatondebian9\/","title":{"rendered":"How to Install Rocket.Chat on Debian 9 &#8211; LinuxCloudVPS Blog"},"content":{"rendered":"<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/08\/how-to-install-rocket-chat-on-debian-9.jpg\" alt=\"How to install rocket.chat on Debian 9\" width=\"600\" height=\"300\" \/><\/p>\n<p>Rocket.chat is an open source application that can be used as a team communication solution and can be deployed on your own server. There are many options for this application, such as chatting with team members and friends, using audio and video chat, interacting with website visitors in real time, sharing files and more. In this tutorial, we will install and deploy Rocket.Chat on <a href=\"https:\/\/www.linuxcloudvps.com\/debian-cloud-vps.html\">Debian 9 server<\/a>. Let\u2019s get started!<\/p>\n<h2>1. Update the system<\/h2>\n<p>Once you are logged in to your server, you need to update and upgrade RPM packages. You can upgrade and upgrade your server with the following commands:<\/p>\n<p>sudo apt update<br \/>\nsudo apt upgrade -y<\/p>\n<h2>2. Install Dependencies<\/h2>\n<p>Before starting the Rocket.Chat installation, you need to install the following required dependencies so that the application can work:<\/p>\n<p>Node.js \u2013 an open source cross-platform JavaScript run-time environment.<br \/>\nMongoDB \u2013 is an open-source leading NoSQL database program written in C++.<br \/>\ncURL- know as \u201cClient URL\u201d is the command-line tool for transferring data.<br \/>\nGraphicsMagick \u2013 is a collection of tools and image processing libraries. GraphicsMagick is an ImageMagick fork.<\/p>\n<p>First, we are going to install cURL , MongoDB and GraphicsMagick with this command:<\/p>\n<p>sudo apt install -y curl mongodb graphicsmagick<\/p>\n<p>Run the next command to install the Node.js:<\/p>\n<p>sudo curl -sL https:\/\/deb.nodesource.com\/setup | sudo bash &#8211;<\/p>\n<p>sudo apt install -y nodejs<\/p>\n<p>also you need to install the npm package<\/p>\n<p>sudo npm install -g n<\/p>\n<p>Use n to download and install Node.js version 8.9.3 which is required by Rocket.Chat<\/p>\n<p>sudo n 8.9.3<\/p>\n<p>You can check the Node.js current version with the following command:<\/p>\n<p>node &#8211;version<br \/>\nv8.9.3<\/p>\n<p>In order for some npm packages which require building from source, you will need to install the build-essentials and python-dev packages:<\/p>\n<p>sudo apt install build-essential python-dev<\/p>\n<p>Now when you set all the necessary dependencies we can continue with installing the Rocket.Chat.<\/p>\n<h2>3. Installing Rocket.Chat<\/h2>\n<p>We will use the curl command to download the Rocket.Chat latest version and we will extract into the \/opt directory:<\/p>\n<p>cd \/opt<br \/>\ncurl -L https:\/\/releases.rocket.chat\/latest\/download -o rocket.chat.tgz<br \/>\ntar zxvf rocket.chat.tgz<br \/>\nmv bundle Rocket.Chat<br \/>\ncd Rocket.Chat\/programs\/server<br \/>\nnpm install<br \/>\ncd ..\/..<\/p>\n<p>There are two ways to populate and start the Rocket.Chat. First one is manually to set the necessary environment variables and start the Rocket.Chat:<\/p>\n<p>export ROOT_URL=http:\/\/your_domain-or-IP_addres:3000\/<br \/>\nexport MONGO_URL=mongodb:\/\/localhost:27017\/rocketchat<br \/>\nexport PORT=3000<\/p>\n<p>Replace \u2018your_domain-or-IP_addres\u2019 with your actual domain name or server\u2019s IP address.<\/p>\n<p>Run the Rocket.Chat server<\/p>\n<p>node main.js<\/p>\n<p>The second one is to create the Rocket.Chat systemd service unit:<\/p>\n<p>nano \/etc\/systemd\/system\/rocketchat.service<br \/>\n[Unit]<br \/>\nDescription=RocketChat Server<br \/>\nAfter=network.target remote-fs.target nss-lookup.target mongod.target nginx.target # Remove or Replace nginx with your proxy<\/p>\n<p>[Service]<br \/>\nExecStart=\/usr\/local\/bin\/node \/opt\/Rocket.Chat\/main.js # The location of node and location of main.js<br \/>\nRestart=always # When is set to always, the service will be restarted in any case (hit a timeout, got terminated)<br \/>\nRestartSec=15 # If node service crashes, restart the service after 15 seconds<br \/>\nStandardOutput=syslog # Output to syslog<br \/>\nStandardError=syslog # Output to syslog<br \/>\nSyslogIdentifier=nodejs-example<br \/>\n#User=&lt;alternate user&gt;<br \/>\n#Group=&lt;alternate group&gt;<br \/>\nEnvironment=NODE_ENV=production PORT=3000 ROOT_URL=https:\/\/your_domain.com MONGO_URL=mongodb:\/\/localhost:27017\/rocketchat<\/p>\n<p>[Install]<br \/>\nWantedBy=multi-user.target<\/p>\n<p>You can change ROOT_URL and replace the domain you want to use. If you do not have an available domain, you can instead enter your IP address on your server. You can also change the port number that is currently set to 3000 to a port number of your choice.<\/p>\n<p>In order to notify the systemd that you just created a new unit file you need to execute the following command:<\/p>\n<p>sudo systemctl daemon-reload<\/p>\n<p>Start the MongoDB and Rocket.Chat services:<\/p>\n<p>sudo systemctl start mongodb<br \/>\nsudo systemctl start rocketchat<\/p>\n<p>You can check the status of the service by running the command:<\/p>\n<p>sudo systemctl status rocketchat<br \/>\nOutput:<\/p>\n<p>\u25cf rocketchat.service &#8211; RocketChat Server<br \/>\nLoaded: loaded (\/etc\/systemd\/system\/rocketchat.service; enabled; vendor preset: disabled)<br \/>\nActive: active (running) since Sat 2018-08-25 08:35:50 CDT; 4s ago<br \/>\nMain PID: 894 (node)<br \/>\nCGroup: \/system.slice\/rocketchat.service<br \/>\n\u2514\u2500894 \/usr\/local\/bin\/node \/opt\/Rocket.Chat\/main.js<\/p>\n<p>If the rocketchat.service is enabled and there are no errors, you can enable it also the automatically to start at boot time:<\/p>\n<p>sudo systemctl enable rocketchat<\/p>\n<h2>4. Access Rocket.Chat in the web browser<\/h2>\n<p>Now, open http:\/\/your_domain-or-IP_addres:3000 in your favorite web browser and you should see the RocketChat login\/register screen. The first user created will get administrative privileges by default.<\/p>\n<p>That\u2019s it. You have successfully installed Rocket.Chat on your Debian 9 VPS. For more information about how to manage your Rocket.Chat installation, please refer to the <a href=\"https:\/\/rocket.chat\/docs\/\">official Rocket.Chat documentation<\/a>.<\/p>\n<p><img loading=\"lazy\" decoding=\"async\" src=\"https:\/\/www.linuxcloudvps.com\/blog\/wp-content\/uploads\/2018\/08\/installing-Rocket.Chat-on-Debian-9.jpg\" alt=\"installing rocket.chat on debian 9\" width=\"200\" height=\"36\" \/><\/p>\n<p>Of course, you don\u2019t have to do any of this if you use one of our <a href=\"https:\/\/www.linuxcloudvps.com\/debian-cloud-vps.html\">Debian Cloud VPS<\/a> plans, in which case you can simply ask our expert Linux admins to set Rocket.Chat web communication and collaboration software for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n<p>Be the first to write a comment.<\/p>\n<p><a href=\"https:\/\/www.linuxcloudvps.com\/blog\/how-to-install-rocket-chat-on-debian-9\/\" target=\"_blank\" rel=\"noopener\">Source<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Rocket.chat is an open source application that can be used as a team communication solution and can be deployed on your own server. There are many options for this application, such as chatting with team members and friends, using audio and video chat, interacting with website visitors in real time, sharing files and more. In &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/www.appservgrid.com\/paw92\/index.php\/2018\/10\/17\/howtoinstallrocketchatondebian9\/\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;How to Install Rocket.Chat on Debian 9 &#8211; LinuxCloudVPS Blog&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1],"tags":[],"class_list":["post-626","post","type-post","status-publish","format-standard","hentry","category-linux"],"_links":{"self":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/626","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/comments?post=626"}],"version-history":[{"count":1,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/626\/revisions"}],"predecessor-version":[{"id":753,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/posts\/626\/revisions\/753"}],"wp:attachment":[{"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/media?parent=626"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/categories?post=626"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.appservgrid.com\/paw92\/index.php\/wp-json\/wp\/v2\/tags?post=626"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}