Edit Page

Hosting

Here is a non-comprehensive list of Node/Sails hosting providers and a few available community tutorials. Keep in mind that, most of the time, the process for deploying your Sails app is exactly the same as it would be for any other Node.js app. Just be sure to take a look at the other pages in this section of the docs (as well as your app's config/env/production.js file) and make any necessary adjustments before you actually deploy to production.

Heroku

Heroku logo

Heroku offers easy, free deployment for any Sails project generated using the Web App template:

  1. Create a GitHub repo and push your code up to the master branch.
  2. Create a Heroku pipeline and a staging app within that pipeline (e.g. my-cool-site-staging).
  3. Using the point-and-click interface, set up that staging app to auto-deploy from the deploy branch of your GitHub repo.
  4. Under "Add-ons", set up Papertrail for logging, Redis2Go as your production session store (and for delivering socket messages, if relevant), Heroku Scheduler for scheduled jobs (if relevant), and a database host of your choosing (e.g. MySQL, PostgreSQL, MongoDB).
  5. Run through config/production.js and config/staging.js in your project and set it up. Any information you feel is too sensitive to hard-code into those files (like database credentials) can be stored in Heroku's config vars (see bundled config files for examples).
  6. In the terminal, make sure you've got everything pulled/pushed and are fully in sync with the remote master branch on GitHub.
  7. Deploy by typing sails run deploy.

You can see a demonstration of this in action here.

More resources for using Heroku with Node.js/Sails.js:
  • Platzi: Full Stack JavaScript: Pt 5 (2018)
  • Hello Sails.js: Hosting your Sails.js application on Heroku (2016-2017)
  • Platzi: Develop Apps with Sails.js: Pt 2 (2015) (see part 2)
  • Sails.js on Heroku (2015)
  • SailsCasts: Deploying a Sails App to Heroku (2013)

Microsoft Azure

Azure logo

  • Deploy a Sails.js web app to Azure App Service (2017)

Google Cloud Platform

Google Cloud Platform logo

Using Google Cloud Platform means that your apps run on the same infrastructure that powers all of Google's products, so you can be confident that they'll scale seamlessly—no matter how many users you have.

  • Run Sails.js on Google Cloud Platform (2016) <!--
  • Deploying Sails.js to Google Cloud (2016) PAGE NOT FOUND -->
  • A couple of Googlers demonstrate and deploy their app built on Sails.js and GO in a talk called runtime:yours at Google Cloud Platform Live (2014)

DigitalOcean

DigitalOcean logo

  • Troubleshooting: Can't install Sails.js on DigitalOcean (2017)
  • How to use PM2 to set up a Node.js production environment on an Ubuntu VPS (2014)
  • How to create a Node.js app using Sails.js on an Ubuntu VBS (2013)

Amazon Web Services (AWS)

AWS logo

  • Creating a Sails.js application on AWS (2017) (see also this question on ServerFault)
  • Your own mini-Heroku on AWS (2014)

PM2 (KeyMetrics)

PM2 logo

  • Deploying with PM2

Note: PM2 isn't really a hosting platform, but it's worth mentioning in this section just so you're aware of it.

OpenShift (Red Hat)

Red Hat™ OpenShift logo

  • Deploying a Sails / Node.js application to OpenShift (2017)
  • Listening to a different IP address on OpenShift (2017-2018) (courtesy @otupman)
  • Get Sails/Node.js running on OpenShift (2017) (Warning: quite out of date, but still useful for context. Courtesy @mdunisch.)

Nanobox

  • Getting Started: A Simple Sails.js App (2017) on Nanobox
  • Quickstart: nanobox-sails
  • Official Sails.js Guides
  • Official Nanobox Docs
  • Nanobox Slack

exoscale / CloudControl

  • Deploying a Sails.js application to exoscale / CloudControl (rendered version of tutorial)

RoseHosting

  • Install Sails.js with Apache as a reverse proxy on CentOS 7 (2016)
  • Install Sails.js on Ubuntu (2014)

More options

  • Like Heroku, there are many other Platform as a Service (PaaS) solutions that support Node.js/Sails.js.
  • Like Microsoft Azure and EC2, there are many other Node.js/Sails.js-compatible "bare-metal"/IaaS cloud servers.
  • Like Cloudflare, there are other great CDNs for optimized hosting of your static assets.

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 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.

Check out the full Sailsconf 2022 playlist on Youtube

Tweet Follow @sailsjs

Documentation

Reference Concepts App structure | Upgrading Contribution guide | Tutorials More

Concepts

  • Actions and controllers
    • Generating actions and controllers
    • Routing to actions
  • Assets
    • Default tasks
    • Disabling Grunt
    • Task automation
  • Blueprints
    • Blueprint actions
    • Blueprint routes
  • Configuration
    • The local.js file
    • Using `.sailsrc` files
  • Deployment
    • FAQ
    • Hosting
    • Scaling
  • E-commerce
  • Extending Sails
    • Adapters
      • Available adapters
      • Custom adapters
    • Custom responses
      • Adding a custom response
    • Generators
      • Available generators
      • Custom generators
    • Hooks
      • Available hooks
      • Events
      • Hook specification
        • .configure
        • .defaults
        • .initialize()
        • .registerActions()
        • .routes
      • Installable hooks
      • Project hooks
      • Using hooks
  • File uploads
    • Uploading to GridFS
    • Uploading to S3
  • Globals
    • Disabling globals
  • Helpers
    • Example helper
  • Internationalization
    • Locales
    • Translating dynamic content
  • Logging
    • Custom log messages
  • Middleware
    • Conventional defaults
  • Models and ORM
    • Associations
      • Many-to-many
      • One way association
      • One-to-many
      • One-to-one
      • Reflexive associations
      • Through associations
    • Attributes
    • Errors
    • Lifecycle callbacks
    • Model settings
    • Models
    • Query language
    • Records
    • Standalone Waterline usage
    • Validations
  • Policies
    • Access Control and Permissions
  • 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
  • Sessions
  • Shell scripts
  • Testing
  • Views
    • Layouts
    • Locals
    • Partials
    • View engines

Built with Love

The Sails framework is built by a web & mobile shop 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?
  • Community
  • News
  • For business
About:
  • Our company
  • Security
  • Legal
  • Logos/artwork
Help:
  • Get started
  • Documentation
  • Docs
  • Contribute
  • Take a class

© 2012-2022 The Sails Company. 
The Sails framework is free and open-source under the MIT License. 
Illustrations by Edamame.