Edit Page

Hosting

Here is a non-comprehensive list of Node/Sails hosting providers and available community tutorials.

Deploying to Modulus?
  • http://blog.modulus.io/sails-js
Deploying to OpenShift?

To deploy to OpenShift, you'll need to make some minor modifications to your configuration: Open up config/local.js in your app folder. In here, you'll need to add the following lines.

port: process.env.OPENSHIFT_NODEJS_PORT,
    host: process.env.OPENSHIFT_NODEJS_IP,

You will also need to install grunt-cli with npm i --save grunt-cli.

After doing that, create the file .openshift/action_hooks/pre_start_nodejs with the following contents. (source) This action_hook tells OpenShift's supervisor to run all 'prod' grunt tasks, before Sails lifted.

#!/bin/bash
export NODE_ENV=production

if [ -f "${OPENSHIFT_REPO_DIR}"/Gruntfile.js ]; then
    (cd "${OPENSHIFT_REPO_DIR}"; node_modules/grunt-cli/bin/grunt prod)
fi

Then disable Sails Grunt integration hook. To do this set the grunt property to false in .sailsrc hooks like this:

{
    "hooks": {
        "grunt": false
    }
}

NOTE:

Do not remove Gruntfile.js to disable Grunt hook, this file still using by OpenShift's supervisor.

Then create the file /supervisor_opts with the following contents. This tells OpenShift's supervisor to ignore Sails' .tmp directory for the hot reload functionality. (source)

-i .tmp

NOTE:

This deployment guide works only on Openshift's "SCALABLE" gears, nodejs v0.10. If you're using non-scalable gear, the /supervisor_opts file will be ignored and Sails will not lift on it.

You can now git add . && git commit -a -m "your message" && git push to deploy to OpenShift.

Deploying to Heroku?
  • Platzi: Develop Apps with Sails.js: Pt 2 (see part 2)
  • SailsCasts: Deploying a Sails App to Heroku
  • Sails.js on Heroku
  • https://groups.google.com/forum/#!topic/sailsjs/vgqJFr7maSY
  • https://github.com/chadn/heroku-sails
  • http://dennisrongo.com/deploying-sails-js-to-heroku
  • http://stackoverflow.com/a/20184907/486547
Using DigitalOcean?
  • https://www.digitalocean.com/community/articles/how-to-create-an-node-js-app-using-sails-js-on-an-ubuntu-vps
  • https://www.digitalocean.com/community/articles/how-to-use-pm2-to-setup-a-node-js-production-environment-on-an-ubuntu-vps
  • https://www.digitalocean.com/community/articles/how-to-host-multiple-node-js-applications-on-a-single-vps-with-nginx-forever-and-crontab
Deploying to AWS?
  • http://blog.grio.com/2014/01/your-own-mini-heroku-on-aws.html
  • http://serverfault.com/questions/531560/creating-an-sails-js-application-on-aws-ami-instance
  • http://bussing-dharaharsh.blogspot.com/2013/08/creating-sailsjs-application-on-aws-ami.html
  • http://cloud.dzone.com/articles/how-deploy-nodejs-apps-aws-mac
Using Nanobox?
  • Getting Started: A Simple Sails.js App
  • Quickstart: nanobox-sails
  • Official Sails.js Guides
  • Official Nanobox Docs
  • Join Us on Slack for Help
Using PM2?
  • http://devo.ps/blog/goodbye-node-forever-hello-pm2/
Deploying to CloudControl?
  • https://www.cloudcontrol.com/dev-center/Guides/NodeJS/Sailsjs
Deploying to RoseHosting?
  • Install Sails.js with Apache as a reverse proxy on CentOS 7
  • Install Sails.js on Ubuntu
  • All hosting plans from RoseHosting are fully-managed with free 24/7 support, so you can contact their support team and they will install and configure Sails.js for you for free
Using Linode?

The instructions and setup are pretty much the same with Linode as they are with Vultr, DigitalOcean and other cloud server providers.

  • Intro to Sails.js: Creating your first app and hosting it on a Linode server

Is something missing?

If you notice something we've missed or could be improved on, please follow this link and submit a pull request to the sails-docs repo. Once we merge it, the changes will be reflected on the website the next time it is deployed.

Sails logo
  • Home
  • Get started
  • Support
  • Documentation
  • Documentation

For a better experience on sailsjs.com, update your browser.

Documentation

Reference Concepts App structure | Upgrading Contribution guide | Tutorials More

Concepts

  • Assets
    • Default Tasks
    • Disabling Grunt
    • Task Automation
  • Blueprints
    • Blueprint Actions
    • Blueprint Routes
  • Configuration
    • The local.js file
    • Using `.sailsrc` Files
  • Controllers
    • Generating Controllers
    • Routing to Controllers
  • Custom Responses
    • Adding a Custom Response
    • Default Responses
  • Deployment
    • FAQ
    • Hosting
    • Scaling
  • Extending Sails
    • Adapters
      • Available Adapters
      • Custom Adapters
    • Generators
      • Available Generators
      • Custom Generators
    • Hooks
      • Hook Specification
        • .configure()
        • .defaults
        • .initialize()
        • .routes
      • Installable Hooks
      • Project Hooks
      • Using Hooks
  • File Uploads
    • Uploading to GridFS
    • Uploading to S3
  • Globals
    • Disabling Globals
  • Internationalization
    • Locales
    • Translating Dynamic Content
  • Logging
    • Custom log messages
  • Middleware
    • Conventional Defaults
  • Models and ORM
    • Associations
      • Dominance
      • Many-to-Many
      • One Way Association
      • One-to-Many
      • One-to-One
      • Through Associations
    • Attributes
    • Lifecycle callbacks
    • Model Settings
    • Models
    • Query Language
    • Validations
  • Policies
    • Sails + Passport
  • Programmatic Usage
    • Tips and Tricks
  • Realtime
    • Multi-server environments
    • On the client
    • On the server
  • Routes
    • Custom Routes
    • URL Slugs
  • Security
    • Clickjacking
    • Content Security Policy
    • CORS
    • CSRF
    • DDOS
    • P3P
    • Socket Hijacking
    • Strict Transport Security
    • XSS
  • Services
    • Creating a Service
  • Sessions
  • Testing
  • Views
    • Layouts
    • Locals
    • Partials
    • View Engines

Built with Love

The Sails framework is maintained by a web & mobile studio in Austin, TX, with the help of our contributors. We created Sails in 2012 to assist us on Node.js projects. Naturally we open-sourced it. We hope it makes your life a little bit easier!

Sails:
  • What is Sails?
  • Treeline IDE
  • Contribute
  • Logos/artwork
About:
  • The Sails Company
  • Security
  • News
  • Legal
Help:
  • Get started
  • Documentation
  • Docs
  • Enterprise
  • Hire us

© 2012-2018 The Sails Company. 
The Sails framework is free and open-source under the MIT License.