{"id":17288,"date":"2015-09-21T11:19:13","date_gmt":"2015-09-21T16:19:13","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=17288"},"modified":"2022-06-03T03:44:10","modified_gmt":"2022-06-03T08:44:10","slug":"how-to-install-lets-chat-on-an-ubuntu-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/how-to-install-lets-chat-on-an-ubuntu-vps\/","title":{"rendered":"How to install Let’s Chat on an Ubuntu VPS"},"content":{"rendered":"
In this blog post we will show you how to install Let’s Chat on an Ubuntu 14.04 VPS with the latest version of Nginx as a reverse proxy. Let’s Chat is a self-hosted chat for small teams which runs on Node.js and MongoDB. This guide should work on other Linux VPS<\/a> systems as well but was tested and written for Ubuntu 14.04 VPS<\/a>.<\/p>\n <\/p>\n We will install the latest nodejs package from Chris Lea’s repo.<\/p>\n We will install the latest nodejs package from the official MongoDB repository.<\/p>\n Create a root directory for your Let’s Chat instance and clone the git repository from github using the following commands:<\/p>\n When the installation is finished, run the following to start the Let’s Chat:<\/p>\n If you see the below message, it means you’ve successfully installed Let’s Chat.<\/p>\n Stop the process with In case you never heard of Forever, it is a tool which ensures that a given script runs forever.<\/p>\n Now you can use forever to start your Let’s Chat instance.<\/p>\n The latest version of Nginx 1.8 is not available via the default Ubuntu repositories, so we will add the “nginx\/stable” PPA, update the system and install the nginx package.<\/p>\n Create a new Nginx server block with the following content<\/p>\n Activate the server block by creating a symbolic link :<\/p>\n Test the Nginx configuration and restart the server<\/p>\n That’s it. You can now open your browser and type the address of your Let’s Chat instance ex: For more information about how manage your Let’s Chat application ,please refer to the Let’s Chat<\/a> website.<\/p>\n Of course you don\u2019t have to do any of this if you use one of our Linux VPS Hosting<\/a> services, in which case you can simply ask our expert Linux admins to setup this for you. They are available 24×7 and will take care of your request immediately.<\/p>\n PS<\/span><\/strong>. If you liked this post please share it with your friends on the social networks using the buttons on the left or simply leave a reply below. Thanks.<\/p>\n","protected":false},"excerpt":{"rendered":" In this blog post we will show you how to install Let’s Chat on an Ubuntu 14.04 VPS with the … <\/p>\nLogin to your VPS via SSH<\/h4>\n
ssh user@vps<\/pre>\n
Update the system and install necessary packages.<\/h4>\n
[user]$ sudo apt-get update && sudo apt-get -y upgrade\r\n[user]$ sudo apt-get install software-properties-common git build-essential<\/pre>\n
Install Node.js<\/h4>\n
[user]$ sudo add-apt-repository ppa:chris-lea\/node.js\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get install nodejs<\/pre>\n
Install MongoDB<\/h4>\n
[user]$ sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB10\r\n[user]$ echo 'deb http:\/\/downloads-distro.mongodb.org\/repo\/ubuntu-upstart dist 10gen' | sudo tee \/etc\/apt\/sources.list.d\/mongodb.list\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get install -y mongodb-org<\/pre>\n
Install Let’s Chat<\/h4>\n
[user]$ git clone https:\/\/github.com\/sdelements\/lets-chat.git ~\/lets_chat\r\n[user]$ cd ~\/lets_chat\r\n[user]$ npm install \r\n<\/pre>\n
[user]$ node start<\/pre>\n
\u2588\u2588\u2557\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2557\u00a0 \u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2557 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\r\n\u2588\u2588\u2551\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u00a0\u00a0\u00a0 \u2588\u2588\u2554\u2550\u2550\u2550\u2550\u255d\u2588\u2588\u2551\u00a0 \u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2557\u255a\u2550\u2550\u2588\u2588\u2554\u2550\u2550\u255d\r\n\u2588\u2588\u2551\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2588\u2588\u2588\u2557\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2551\u00a0\u00a0 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u00a0\u00a0\u00a0 \u2588\u2588\u2551\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u00a0\u00a0 \u2588\u2588\u2551\r\n\u2588\u2588\u2551\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2554\u2550\u2550\u255d\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2551\u00a0\u00a0 \u255a\u2550\u2550\u2550\u2550\u2588\u2588\u2551\u00a0\u00a0\u00a0 \u2588\u2588\u2551\u00a0\u00a0\u00a0\u00a0 \u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u2588\u2588\u2554\u2550\u2550\u2588\u2588\u2551\u00a0\u00a0 \u2588\u2588\u2551\r\n\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u00a0\u00a0 \u2588\u2588\u2551\u00a0\u00a0 \u2588\u2588\u2588\u2588\u2588\u2588\u2588\u2551\u00a0\u00a0\u00a0 \u255a\u2588\u2588\u2588\u2588\u2588\u2588\u2557\u2588\u2588\u2551\u00a0 \u2588\u2588\u2551\u2588\u2588\u2551\u00a0 \u2588\u2588\u2551\u00a0\u00a0 \u2588\u2588\u2551\r\n\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u00a0\u00a0 \u255a\u2550\u255d\u00a0\u00a0 \u255a\u2550\u2550\u2550\u2550\u2550\u2550\u255d\u00a0\u00a0\u00a0\u00a0 \u255a\u2550\u2550\u2550\u2550\u2550\u255d\u255a\u2550\u255d\u00a0 \u255a\u2550\u255d\u255a\u2550\u255d\u00a0 \u255a\u2550\u255d\u00a0\u00a0 \u255a\u2550\u255d\r\nRelease 0.3.12\r\n<\/pre>\n
Control-C<\/code> and continue with the Forever installation.<\/p>\n
[user]$ sudo npm install forever -g<\/pre>\n
[user]$ cd ~\/lets_chat\r\n[user]$ forever start app.js<\/pre>\n
Install and Configure Nginx<\/h4>\n
[user]$ sudo add-apt-repository ppa:nginx\/stable\r\n[user]$ sudo apt-get update\r\n[user]$ sudo apt-get install nginx<\/pre>\n
[user]$ sudo nano \/etc\/nginx\/sites-available\/lets_chat<\/pre>\n
server {\r\n server_name lets_chat;\r\n listen 80;\r\n\r\n access_log \/var\/log\/nginx\/lets_chat-access.log;\r\n error_log \/var\/log\/nginx\/lets_chat-error.log;\r\n\r\n location \/ {\r\n proxy_set_header X-Real-IP $remote_addr;\r\n proxy_set_header Host $host;\r\n proxy_http_version 1.1;\r\n proxy_set_header Upgrade $http_upgrade;\r\n proxy_set_header Connection 'upgrade';\r\n proxy_cache_bypass $http_upgrade;\r\n proxy_pass http:\/\/127.0.0.1:5000;\r\n }\r\n \r\n}\r\n<\/pre>\n
[user]$ sudo ln -s \/etc\/nginx\/sites-available\/lets_chat \/etc\/nginx\/sites-enabled\/lets_chat<\/pre>\n
[user]$ sudo nginx -t\r\n[user]$ sudo service nginx restart<\/pre>\n
http:\/\/lets_chat<\/code>.<\/p>\n
\n