{"id":3364,"date":"2014-03-22T15:57:57","date_gmt":"2014-03-22T20:57:57","guid":{"rendered":"https:\/\/secure.rosehosting.com\/blog\/?p=3364"},"modified":"2022-12-16T05:33:58","modified_gmt":"2022-12-16T11:33:58","slug":"install-the-sails-js-framework-on-an-ubuntu-vps","status":"publish","type":"post","link":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/","title":{"rendered":"Install the Sails.js framework on an Ubuntu VPS"},"content":{"rendered":"
<\/div>

\"sails\"Sails.js is a real-time MVC Framework for Node.js, which makes it easy to build custom, enterprise-grade Node.js apps. Sails.js is database agnostic, automatically generates a RESTful JSON API for your app, provides basic security and role-based access control by default, has automatic asset minification and many more.<\/p>\n

In this blog post we will show you how to install the Sails.js framework on a Ubuntu VPS<\/a> with Nginx as a reverse proxy.<\/p>\n

<\/p>\n

The following command will install all necessary packages<\/p>\n

sudo apt-get update\r\nsudo apt-get install -y python-software-properties python g++ make<\/pre>\n

Install the the latest version of Nginx<\/strong><\/p>\n

sudo add-apt-repository ppa:nginx\/stable\r\nsudo apt-get update && sudo apt-get install nginx<\/pre>\n

Install the latest version of Nodejs <\/strong>
\n<\/strong><\/p>\n

sudo add-apt-repository ppa:chris-lea\/node.js\r\nsudo apt-get update && sudo apt-get install nodejs<\/pre>\n

Install the latest stable release of Sails <\/strong>
\n<\/strong><\/p>\n

sudo npm -g install sails<\/pre>\n

Create a new Sails project<\/strong><\/p>\n

cd && sails new projectName<\/pre>\n

To start the server, run:<\/p>\n

cd projectName && sails lift &<\/pre>\n

By default the server is listening on 127.0.0.1:1337<\/p>\n

Create a new nginx virtual host<\/strong><\/p>\n

vim \/etc\/nginx\/sites-available\/your_domain.com<\/pre>\n
server {\r\n listen       80;\r\n server_name  your_domain.com;\r\n   location \/ {\r\n     proxy_pass        http:\/\/localhost:1337\/;\r\n     proxy_set_header  Host $host;\r\n     proxy_buffering   off;\r\n   }\r\n }<\/pre>\n
 \r\nln -s \/etc\/nginx\/sites-available\/your_domain.com \/etc\/nginx\/sites-enabled\/your_domain.com\r\n\/etc\/init.d\/nginx restart<\/pre>\n

That’s it. Now open your browser and navigate to your domain.<\/p>\n

For more info about the Sails.js framework please go to: http:\/\/sailsjs.org\/#!documentation<\/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 install this for you. They are available 24\u00d77 and will take care of your request immediately.<\/p>\n

PS<\/strong><\/span>. 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

 <\/p>\n","protected":false},"excerpt":{"rendered":"

Sails.js is a real-time MVC Framework for Node.js, which makes it easy to build custom, enterprise-grade Node.js apps. Sails.js is … <\/p>\n

Read More<\/a><\/p>\n","protected":false},"author":4,"featured_media":3365,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[13],"tags":[175,177,239,416,415,414],"yoast_head":"\nInstall the Sails.js framework on an Ubuntu VPS - RoseHosting<\/title>\n<meta name=\"description\" content=\"Install the Sails.js framework on an Ubuntu VPS - RoseHosting\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Install the Sails.js framework on an Ubuntu VPS - RoseHosting\" \/>\n<meta property=\"og:description\" content=\"Install the Sails.js framework on an Ubuntu VPS - RoseHosting\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\" \/>\n<meta property=\"og:site_name\" content=\"RoseHosting\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/RoseHosting\" \/>\n<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/rosehosting.helpdesk\" \/>\n<meta property=\"article:published_time\" content=\"2014-03-22T20:57:57+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2022-12-16T11:33:58+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png\" \/>\n\t<meta property=\"og:image:width\" content=\"256\" \/>\n\t<meta property=\"og:image:height\" content=\"256\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/png\" \/>\n<meta name=\"author\" content=\"Jeff Wilson\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:site\" content=\"@rosehosting\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Jeff Wilson\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\"},\"author\":{\"name\":\"Jeff Wilson\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\"},\"headline\":\"Install the Sails.js framework on an Ubuntu VPS\",\"datePublished\":\"2014-03-22T20:57:57+00:00\",\"dateModified\":\"2022-12-16T11:33:58+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\"},\"wordCount\":240,\"commentCount\":0,\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png\",\"keywords\":[\"framework\",\"linux vps\",\"nodejs\",\"npm\",\"sails\",\"sails.js\"],\"articleSection\":[\"Tutorials\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\",\"name\":\"Install the Sails.js framework on an Ubuntu VPS - RoseHosting\",\"isPartOf\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png\",\"datePublished\":\"2014-03-22T20:57:57+00:00\",\"dateModified\":\"2022-12-16T11:33:58+00:00\",\"description\":\"Install the Sails.js framework on an Ubuntu VPS - RoseHosting\",\"breadcrumb\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png\",\"width\":256,\"height\":256},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"https:\/\/www.rosehosting.com\/blog\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Install the Sails.js framework on an Ubuntu VPS\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#website\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"name\":\"RoseHosting\",\"description\":\"Premium Linux Tutorials Since 2001\",\"publisher\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#organization\",\"name\":\"RoseHosting\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"contentUrl\":\"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png\",\"width\":192,\"height\":192,\"caption\":\"RoseHosting\"},\"image\":{\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/RoseHosting\",\"https:\/\/x.com\/rosehosting\",\"https:\/\/www.linkedin.com\/in\/rosehosting\/\"]},{\"@type\":\"Person\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713\",\"name\":\"Jeff Wilson\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g\",\"caption\":\"Jeff Wilson\"},\"description\":\"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.\",\"sameAs\":[\"https:\/\/www.rosehosting.com\",\"https:\/\/www.facebook.com\/rosehosting.helpdesk\"],\"url\":\"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Install the Sails.js framework on an Ubuntu VPS - RoseHosting","description":"Install the Sails.js framework on an Ubuntu VPS - RoseHosting","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/","og_locale":"en_US","og_type":"article","og_title":"Install the Sails.js framework on an Ubuntu VPS - RoseHosting","og_description":"Install the Sails.js framework on an Ubuntu VPS - RoseHosting","og_url":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/","og_site_name":"RoseHosting","article_publisher":"https:\/\/www.facebook.com\/RoseHosting","article_author":"https:\/\/www.facebook.com\/rosehosting.helpdesk","article_published_time":"2014-03-22T20:57:57+00:00","article_modified_time":"2022-12-16T11:33:58+00:00","og_image":[{"width":256,"height":256,"url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png","type":"image\/png"}],"author":"Jeff Wilson","twitter_card":"summary_large_image","twitter_creator":"@rosehosting","twitter_site":"@rosehosting","twitter_misc":{"Written by":"Jeff Wilson","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#article","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/"},"author":{"name":"Jeff Wilson","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713"},"headline":"Install the Sails.js framework on an Ubuntu VPS","datePublished":"2014-03-22T20:57:57+00:00","dateModified":"2022-12-16T11:33:58+00:00","mainEntityOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/"},"wordCount":240,"commentCount":0,"publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png","keywords":["framework","linux vps","nodejs","npm","sails","sails.js"],"articleSection":["Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/","url":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/","name":"Install the Sails.js framework on an Ubuntu VPS - RoseHosting","isPartOf":{"@id":"https:\/\/www.rosehosting.com\/blog\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage"},"thumbnailUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png","datePublished":"2014-03-22T20:57:57+00:00","dateModified":"2022-12-16T11:33:58+00:00","description":"Install the Sails.js framework on an Ubuntu VPS - RoseHosting","breadcrumb":{"@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#primaryimage","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2014\/03\/sails.png","width":256,"height":256},{"@type":"BreadcrumbList","@id":"https:\/\/www.rosehosting.com\/blog\/install-the-sails-js-framework-on-an-ubuntu-vps\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/www.rosehosting.com\/blog\/"},{"@type":"ListItem","position":2,"name":"Install the Sails.js framework on an Ubuntu VPS"}]},{"@type":"WebSite","@id":"https:\/\/www.rosehosting.com\/blog\/#website","url":"https:\/\/www.rosehosting.com\/blog\/","name":"RoseHosting","description":"Premium Linux Tutorials Since 2001","publisher":{"@id":"https:\/\/www.rosehosting.com\/blog\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/www.rosehosting.com\/blog\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/www.rosehosting.com\/blog\/#organization","name":"RoseHosting","url":"https:\/\/www.rosehosting.com\/blog\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/","url":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","contentUrl":"https:\/\/www.rosehosting.com\/blog\/wp-content\/uploads\/2022\/03\/android-chrome-192x192-1.png","width":192,"height":192,"caption":"RoseHosting"},"image":{"@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/RoseHosting","https:\/\/x.com\/rosehosting","https:\/\/www.linkedin.com\/in\/rosehosting\/"]},{"@type":"Person","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/7ce77a842fa6a9a7f8efa186f2353713","name":"Jeff Wilson","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.rosehosting.com\/blog\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/09271207587f897ab46faaed9b355252?s=96&r=g","caption":"Jeff Wilson"},"description":"An experienced Linux veteran with many years of experience. Helping other Linux admins with frequent Linux and business-related blog posts on the RoseHosting blog. Techie by choice. Loving nature and travel. Happily married and father of two lovely children.","sameAs":["https:\/\/www.rosehosting.com","https:\/\/www.facebook.com\/rosehosting.helpdesk"],"url":"https:\/\/www.rosehosting.com\/blog\/author\/jwilson\/"}]}},"_links":{"self":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3364"}],"collection":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/comments?post=3364"}],"version-history":[{"count":2,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3364\/revisions"}],"predecessor-version":[{"id":44365,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/posts\/3364\/revisions\/44365"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media\/3365"}],"wp:attachment":[{"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/media?parent=3364"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/categories?post=3364"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.rosehosting.com\/blog\/wp-json\/wp\/v2\/tags?post=3364"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}