Sails is the most popular MVC framework for Node.js. It is used for building production-ready enterprise Node.js applications. Sails is a lightweight server-side technology that uses Express for handling HTTP requests and wraps socket.io for managing WebSockets.

It is used to develop chat applications, real-time dashboards, and multiplayer games. Sails provide a simple data access layer that works with any database, including MySQL, MongoDB, PostgreSQL, Redis, and local disk.

In this post, we will show you how to install the Salis.js framework with Nginx as a reverse proxy on Oracle Linux 10.

Step 1 – Install Nodejs

Before starting, you will need to install some required dependencies on your server. You can install all of them by running the following command:

dnf install curl gcc-c++ make -y

Next, install the Node.js by running the following command:

dnf install nodejs -y

Once Node.js is installed, you can verify the Node.js version using the following command:

node --version

You will get the following output:

v22.19.0

Step 2 – Install Sailsjs

You can use the Node Package Manager (NPM) to install Sails.js easily on your server.

npm -g install sails

Once installed, create a directory for the Sails.js application.

mkdir sails

Next, change the directory to the sails and create a new application using the following command:

cd sails
sails new project

You will be asked to select the template for your application:

 Choose a template for your new Sails app:
 1. Web App  ·  Extensible project with auth, login, & password recovery
 2. Empty    ·  An empty Sails app, yours to configure
 (type "?" for help, or <CTRL+C> to cancel)
? 1

Type 1 and press the Enter key to create your application:

 info: Installing dependencies...
Press CTRL+C to cancel.
(to skip this step in the future, use --fast)
 info: Created a new Sails app `project`!

Step 3 – Start Sailsjs Application

After creating the Sails.js application, change the directory to your application and start the application using the command below:

cd project
sails lift

You will get the following output:

 info: Starting app...

 info: Initializing project hook... (`api/hooks/custom/`)
 info: Initializing `apianalytics` hook...  (requests to monitored routes will be logged!)
 info: ·• Auto-migrating...  (alter)
 info:    Hold tight, this could take a moment.
 info:  ✓ Auto-migration complete.

debug: Running v0 bootstrap script...  (looks like this is the first time the bootstrap has run on this computer)
 info: 
 info:                .-..-.
 info: 
 info:    Sails              <|    .-..-.
 info:    v1.5.3              |\
 info:                       /|.\
 info:                      / || \
 info:                    ,'  |'  \
 info:                 .-'.-==|/_--'
 info:                 `--'-------' 
 info:    __---___--___---___--___---___--___
 info:  ____---___--___---___--___---___--___-__
 info: 
 info: Server lifted in `/root/sails/project`
 info: To shut down Sails, press  + C at any time.
 info: Read more at https://sailsjs.com/support.

debug: -------------------------------------------------------
debug: :: Tue Dec 12 2025 03:54:53 GMT-0400 (Eastern Daylight Time)

debug: Environment : development
debug: Port        : 1337
debug: -------------------------------------------------------

Press CTRL+C to stop the application.

Step 4 – Create a Systemd Service File for Salisjs

It is recommended to create a systemd service file to manage the Sails.js application. You can create it using the following command:

nano /lib/systemd/system/sails.service

Add the following lines:

[Unit]
After=network.target

[Service]
Type=simple
User=root
WorkingDirectory=/root/sails/project
ExecStart=/usr/local/bin/sails lift
Restart=on-failure

[Install]
WantedBy=multi-user.target

Save and close the file, then reload the systemd daemon to apply the changes:

systemctl daemon-reload

Now, start the Sails.js service and enable it to start at system reboot:

systemctl start sails
systemctl enable sails

You can also verify the status of the Sails.js service using the following command:

systemctl status sails

You will get the following output:

 sails.service
     Loaded: loaded (/usr/lib/systemd/system/sails.service; disabled; preset: disabled)
     Active: active (running) since Wed 2025-12-10 22:33:23 EST; 5s ago
 Invocation: 0be9415c6dd14c2f90af2fae48541939
   Main PID: 236625 (node)
      Tasks: 22 (limit: 24812)
     Memory: 165.4M (peak: 165.6M)
        CPU: 3.230s
     CGroup: /system.slice/sails.service
             ├─236625 node /usr/local/bin/sails lift
             └─236638 grunt

Dec 10 22:33:25 oracle sails[236625]:  info:
Dec 10 22:33:25 oracle sails[236625]:  info: Server lifted in `/root/sails/project`
Dec 10 22:33:25 oracle sails[236625]:  info: To shut down Sails, press  + C at any time.
Dec 10 22:33:25 oracle sails[236625]:  info: Read more at https://sailsjs.com/support.
Dec 10 22:33:25 oracle sails[236625]: debug: -------------------------------------------------------
Dec 10 22:33:25 oracle sails[236625]: debug: :: Wed Dec 10 2025 22:33:25 GMT-0500 (Eastern Standard Time)
Dec 10 22:33:25 oracle sails[236625]: debug: Environment : development
Dec 10 22:33:25 oracle sails[236625]: debug: Port        : 1337
Dec 10 22:33:25 oracle sails[236625]: debug: Local       : http://localhost:1337
Dec 10 22:33:25 oracle sails[236625]: debug: -----------------------------------------------------

At this point, the Sails.js application is started and listens on port 1337. You can check it using the following command:

ss -antpl | grep 1337

You will get the following output:

LISTEN 0      128                *:1337            *:*    users:(("node",pid=12432,fd=19))                                                                                               

Step 5 – Configure Nginx as a Reverse Proxy for Sailsjs

Nginx reverse proxy allows you to access the Sails application via port 80. First, install the Nginx with the following command:

dnf install nginx

Next, create an Nginx virtual host configuration file using the following command:

nano /etc/nginx/conf.d/sails.conf

Add the following lines:

server {
 listen       80;
 server_name  sails.example.com;
   location / {
     proxy_pass        http://localhost:1337/;
     proxy_set_header  Host $host;
     proxy_buffering   off;
   }
 }

Save and close the file, then edit the Nginx main configuration file:

nano /etc/nginx/nginx.conf

Add the following line below http {:

server_names_hash_bucket_size 64;

Save and close the file, then verify the Nginx configuration:

nginx -t

You will get the following output:

nginx: the configuration file /etc/nginx/nginx.conf syntax is ok
nginx: configuration file /etc/nginx/nginx.conf test is successful

Finally, restart Nginx to apply the changes:

systemctl restart nginx

Step 6 – Access Sailsjs

Now, open your web browser and access the Sails.js web interface using the URL http://salis.example.com. You should see the Sails.js application on the following screen:
Sails.js dashboard page

Conclusion

In this post, you learned how to install Sails.js with Nginx on Oracle Linux 10. You can now start developing your first real-time application using the Sails.js framework. Get started with Sails.js on VPS hosting from Atlantic.Net!