Recommended Free Tools
Deploying a Sails.js application on an Ubuntu VPS means installing a current Node.js LTS runtime, transferring the application and its production dependencies, starting Sails in production mode, supervising it with PM2, and placing Nginx in front as a reverse proxy. Add HTTPS and a restricted firewall, then configure trustProxy only when TLS terminates at that proxy. The sequence below separates verified Sails behavior from infrastructure settings you must adapt to your app and server.
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
What the finished deployment looks like
A browser or API client connects to Nginx on the public address. Nginx accepts HTTP or HTTPS traffic and forwards requests to the Sails process on a local port that is not exposed directly to the internet. PM2 keeps the Node.js process running and can restore it after a reboot once its startup integration has been configured. Sails runs with production settings, reads secrets from environment variables, and serves the production asset build.
As an Amazon Associate I earn from qualifying purchases.
Free tools Windows power users keep installed
One-click scans. No signup required.
The VPS is responsible for the operating system, Node.js runtime, PM2, Nginx, certificates and firewall. Your repository remains the source of application code, while the server holds the deployed checkout, installed dependencies and environment-specific configuration. Keeping those responsibilities separate makes it easier to replace the VPS or roll back a release.
Prerequisites and decisions before you connect
- An Ubuntu VPS with SSH access and enough CPU, memory and disk for your application, its dependencies, logs and any build steps.
- A Sails.js project that runs locally and has a known command for starting the app and a known listening port.
- Access to the project repository or an archive of the release you intend to deploy.
- Production values for database credentials, session secrets, API keys and other configuration. Do not commit those values to the repository.
- A hostname if you intend to use Nginx and HTTPS. The DNS record and certificate procedure depend on your DNS provider and certificate authority.
- A decision about whether the app uses WebSockets or Socket.IO. Those connections need additional proxy headers in Nginx.
Use the Node.js LTS line supported by the Sails release you are deploying. LTS is a moving target, so check the compatibility information for the specific Sails version rather than assuming that the newest Node release is appropriate.
#1 Best Overall
- BLUE LIGHT BLOCKING GLASSES: Our blue light glasses for women boast UV400 protection, blocking harmful blue rays from computer screens. With these bluelight glasses women, you can enjoy gaming, reading, or watching TV with no worries of eye strain.
- EYE RELIEF: Our blue light glasses are engineered to reduce blurry vision or strain caused by prolonged screen time. These womens blue light glasses aid in better sleep by preventing blue light from disrupting your natural sleep cycle, helping you fall asleep faster and enjoy a more restful night's sleep, making them the perfect christmas present.
- COMFORTABLE: Crafted from durable material, our trendy blue light glasses for woman or blue light glasses men ensure long-lasting comfort. The high-transmittance lenses accessories, gamer gifts for men, help keep your eyes relaxed. Perfect stocking stuffers, gifts for gamers men, christmas gifts for men, halloween costumes.
- LIGHTWEIGHT: These clear blue light glasses feature a lightweight frame, meaning they’ll stay comfy for long-term wear. Perfect as blue blockers glasses for women or mens blue light glasses, these non-prescription fake glasses for men can be worn throughout the day. The blue light blocking glasses women feature polycarbonate HD lenses, which are anti-reflective and restore true color.
- WORRY-FREE PURCHASE: If you experience any issues, our support team is ready to assist you quickly. These are the perfect costume glasses for cosplay dressing up.
Install Node.js LTS on Ubuntu
The Sails installation guidance describes using a version manager such as nvm or a NodeSource package. A version manager is useful when more than one application on the VPS needs a different Node release; a system package is simpler when the machine has one controlled runtime.
Install with nvm
- Install nvm using the current instructions from the nvm project, then open a new shell or reload the shell profile so the
nvmcommand is available. - Install the current LTS release with
nvm install --lts. - Make that release the default for new login shells with
nvm alias default node. - Confirm the shell resolves the expected executables with
node --versionandnpm --version. Record the versions with the deployment notes for this release.
Run the install as the same Unix account that will run the application. If you install Node under one account and later launch PM2 under another, PM2 may not see the nvm-managed runtime or its global packages.
Crashes, No Sound, or Screen Glitches?
Random freezes, missing sound and display glitches usually trace back to one bad driver. Find and replace yours safely.Free scan · under a minuteWindows Errors? Fix Them Before They Spread
Repair common Windows errors and clear accumulated junk for a smoother, more stable PC - no reinstall needed.Free scan · no reinstallUse NodeSource or another system package
A system package is an alternative to nvm. Follow the package provider’s instructions for the Ubuntu release on your VPS, then verify node --version and npm --version. Do not mix an nvm installation and a system installation casually: check command -v node and command -v npm so the path used by your login shell is the path PM2 will use.
Transfer the Sails application
Pull the tagged release from your repository or copy the release archive to the VPS. Put it in a directory owned by the account that will run the app. Keep the deployment directory distinct from temporary build files and from any Nginx configuration.
Install only what production needs
From the application directory, use the package manager and lockfile strategy defined by your project to perform a reproducible production install. A production install must include every runtime dependency but should not rely on development-only packages at runtime. If your build process needs development dependencies to compile assets, build first in a controlled environment and deploy the resulting release, or install, build and then remove development packages according to your team’s release procedure.
Do not copy a developer’s node_modules directory from another operating system. Native modules can be compiled for the wrong platform. Install dependencies on Ubuntu, or use a build artifact produced for the same Ubuntu architecture and Node.js ABI.
Keep secrets outside the repository
Provide database URLs, credentials, cookie keys, third-party tokens and other secrets through environment variables or a protected environment-file mechanism. Restrict permissions on any file that contains them, and ensure the file is excluded from version control and backups that are accessible to untrusted users. The exact variable names are application-specific; Sails will only receive values that your configuration reads.
Before starting, check that the production database is reachable from the VPS and that outbound network policy permits the required connection. A successful dependency install does not prove that the app can authenticate to its database or external APIs.
Rank #2
- WINDEX GAMING WIPES: effortlessly clean all your gaming gear and gaming electronics in one easy step with our new Windex Gaming Wipes
- AMMONIA FREE: our ammonia-free formula is safe to use on all of your favorite gaming equipment like consoles, headsets, controllers, screens, keyboards, and more
- PRE-MOISTENED WIPES: each wipe instantly removes dust, dirt, and stubborn smudges and fingerprints leaving a streak-free shine
- ANTI-STATIC: great for cleaning and wiping down your gaming gear and electronics leaving behind no visible residue
- COMPACT RESEALABLE PACKAGE: store your pack of Windex Gaming Wipes anywhere in your home for whenever a quick and easy wipedown is needed
Start Sails in production mode
Sails’ standard production switch is NODE_ENV=production. You can also run sails lift --prod; the --prod flag sets NODE_ENV to production when it has not already been set.
Choose one unambiguous setting
Do not supply contradictory settings. For example, an environment of NODE_ENV=development combined with --prod causes the application to fail to start. Set the environment explicitly in the process manager or invoke the production flag without a conflicting environment.
Do these 3 things before closing this tab:
1Scan for outdated or missing drivers - takes under a minute2Repair Windows errors before they cause bigger problems3Fix the driver behind crashes, sound loss and screen glitchesUse the Sails CLI available to the project rather than assuming a globally installed CLI matches the app’s version. A package script in package.json can provide a consistent entry point; otherwise the project may start through its generated app.js file.
What production mode changes
In production, Sails forces model migrations to the safe strategy. That prevents an automatic destructive schema change during a lift, but it also means a schema change that worked automatically in development will require an explicit migration plan. Review migration behavior before deploying a release that changes models.
Production error handling still logs server errors, but responses generated by res.serverError() do not send stack traces to clients. This reduces information disclosure while preserving server-side diagnostics. Make sure your log collection captures the relevant process output because the browser will no longer contain the debugging detail you saw in development.
The production task also minifies assets. If static files appear unminified, first verify that the process really received the production setting and that the production asset task completed successfully during the release.
Keep the process alive with PM2
PM2 is the process manager used in common Node.js and Nginx deployment patterns. It starts the Sails entry point, restarts it when it exits and provides a process list that can be restored after a reboot.
Start a single Sails process
From the application directory, an example invocation is:
Rank #3
- Ergonomic & Adjustable Design: Fight "text neck" and improve your posture. Designed for comfort, it offers an adjustable height (7.1in-8.5in) (1.4in adjustable range) and angle (5°-85°) Please note: cell phone stand is only 9 inches tall—the length of a standard pencil
- Without blocking subtitles Perfect for office desk Tiktok Face Time Zoom video—this is the ultimate kitchen desk essential for phones! Perfect viewing experience while reducing neck back strain, A must-have for gamers streamers desk, and anyone who values both style and support!
- Sleek & Stable Design fits Otterbox Case: Say goodbye to bent cables, tangles, and tip-overs! LISEN’s stylish adjustable desk phone holder features a built-in charging hole and smart cable management, keeping your phone secure and your workspace clutter-free cool gadgets for men
- ANTI-SLIP DESIGN free hands: The under 10.00 items easy gadgets back and the bottom of this kitchen essentials for women are fully covered by anti-skid silicone, which LISEN stand up desk decor can provide maximum protection device from any scratches and slides
- Your Perfect Viewing Companion:If your product arrives damaged or breaks within 365 days, reach out to LISEN for a quick and hassle-free solution. Struggling with assembly, like tightening the screw? We’ve got your back! Your experience matters to us. (Product including: phone Holder stand*1, screw*1, hexagon screwdriver*1, specification*1)
pm2 start app.js --name sails-app -- --prod
The double hyphen separates PM2 options from arguments passed to the application. In this example, --prod is delivered to app.js. If your project starts through a different file or package script, use that entry point while preserving the production setting.
Immediately inspect the process status and logs with the PM2 commands documented for your installed PM2 version. Confirm that the process remains online, that it is listening on the port your Nginx configuration will use and that startup logs show production mode rather than development mode.
The Tool Desk
Outbyte PC Repair FREERepair Windows errors before they cause bigger problemsFix Now →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Persist the process across reboots
Save the intended process list and configure PM2’s boot-time integration for the Unix account that owns the app. The exact commands vary with PM2 and the Linux init system, so use the current PM2 documentation for the generated startup command instead of copying an old command from a tutorial. Reboot only after testing the generated service; then verify that the process returns automatically and that it still has the required environment variables.
Do not run the first deployment in PM2 cluster mode merely to gain capacity. An older Sails forum report describes multiple processes conflicting over the shared .tmp directory. That report is dated, and the behavior may differ in current Sails releases, so treat multi-instance mode as unverified until you test your exact Sails version and application. Begin with one process and add instances only after confirming filesystem, sessions, WebSockets and database behavior.
Put Nginx in front of Sails
The Sails installation guidance recommends a reverse proxy such as Nginx or Apache for production. Nginx should listen on the public interface and forward requests to the local address and port where Sails is listening.
Create the server block
Create a site configuration containing a server block for your hostname. In its location / block, set proxy_pass to the Sails listener and forward the original host and client information. A template of the relevant directives is:
location / {
proxy_pass http://127.0.0.1:{{sails_port}};
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
{{sails_port}} is a template variable: replace it with the port configured by your Sails app. Keep that port bound to the local interface when possible so clients cannot bypass Nginx and reach the app without the proxy’s TLS and access controls.
Validate the Nginx configuration with the configuration-test command appropriate to your Ubuntu package, then reload Nginx rather than stopping it. Test the hostname from a client and inspect both Nginx’s error log and PM2’s application log if the request fails.
Rank #4
- Easy Installation: Our gaming lights have been designed to enhance your entertainment experience. Simply position the led light bar next to your TV or game console to create a game room environment with ease. They come with USB power and a 60 inch cord for direct mounting and mobility
- Audio Syncing & Extensive Mode: The built-in high-sensitivity music sensor allows you to sync the TV led lights to your favorite music. Lights react and move to the beat of music, film and game audio, creating an incredible immersive sound and light experience – and all without the need for an additional hub. You can choose from 64+ patterns, including strobe, illusion, jump, energy, gradient, running, chasing, fluttering mode etc. Each mode can be applied to different scenes
- 64+ Chasing IC+RGB & W Effect: The independent control design of IC+RGB and white all-in-one multifunctional rgbw led bar lights monitor backlight allows you to easily switch the led lights for desk between IC+RGB and white to enjoy a variety of lighting effects, you can choose white lighting mode with high brightness for better illumination when working, etc. Choose IC+RGB lighting mode when you need to create an entertaining atmosphere for the light show, 16 million colours of Color changing rgb light bar let you dance to the beat and create a dynamic party atmosphere
- Dynamic and Dimmable Lights: 1%-full brightness free brightness adjustment gives you the flexibility to adjust dimmable led light bar for room decorations or a variety of occasions
- USB Powered: USB light bars for room can be powered by powernank, usb charger, TV, Monitor, laptop PC mainframe, making behind TV led lighting bar easy to install in any location.TV led lights are powered by the TV usb interface / PC mainframe, can be turned on/off synchronously with TV / PC
Proxy WebSockets when the app uses them
Socket connections require Nginx to pass the HTTP upgrade negotiation. Add the WebSocket upgrade and connection forwarding directives recommended by the Nginx documentation and your Socket.IO version. This is conditional: a JSON API or server-rendered app that never upgrades a connection does not need those headers.
Configure Sails trustProxy correctly
In sails.config.http, trustProxy controls how the underlying Express layer interprets X-Forwarded-* headers. It matters when Sails is behind an HTTPS reverse proxy such as Nginx.
When to enable it
Set trustProxy only when the application is actually behind a proxy that you control and that supplies the forwarding headers. The Sails documentation suggests starting with true behind such a proxy and consulting the additional options if that does not match your network topology.
When the app is exposed directly without a proxy, leave trustProxy undefined. Trusting arbitrary client-supplied forwarding headers on a direct connection can make the application misidentify the protocol or client address.
Check the effects
After enabling the setting, test URL generation, secure-cookie behavior, redirects and request IP logging through Nginx. Confirm that HTTPS requests are recognized as secure and that an HTTP request cannot spoof the forwarded protocol by connecting directly to the Sails port.
Add HTTPS and a narrow firewall policy
For a public deployment, terminate HTTPS at Nginx and obtain a certificate through a current Let’s Encrypt and Certbot procedure or another certificate provider. Certificate issuance, renewal hooks and DNS validation vary by Ubuntu release and provider, so follow the current instructions for the exact environment rather than relying on a copied command.
At the network layer, allow SSH for administration and the web ports required by your Nginx listener, normally HTTP and HTTPS when you need certificate redirects or renewal. Keep the Sails application port private. The 2026 deployment guides reviewed for this topic treat a UFW allow-list for SSH, HTTP and HTTPS as standard practice, but the exact rules must match your SSH port and certificate workflow.
Independent reader supportYour contribution helps us test, update, and keep practical guides available for everyone.Verify the deployment from the inside out
- Check the runtime:
node --versionreports the intended LTS release for the Sails version. - Check the release directory: the expected application files and production dependencies are present, and no secret has been committed to the repository.
- Check Sails directly on its local listener from the VPS. This isolates application startup from Nginx and DNS.
- Check PM2: the process is online, stays online after a deliberate restart and logs no configuration or database errors.
- Check Nginx’s configuration test and reload result.
- Check the public hostname over HTTPS, including a normal page, an API route, static assets and any authenticated flow.
- If sockets are enabled, establish a real socket connection and observe the upgrade request in the logs.
- Reboot during a maintenance window and verify that PM2, Nginx and the application return in the expected order.
Record the deployed commit, Node.js version, Sails version, environment-variable set, listening port and migration status. Those details let you distinguish an application regression from a runtime or proxy change during the next release.
Best Value
- Compatible with Wide Screens - To ensure compatibility with the dual monitor mount, your each monitor must meet three conditions at the same time: First, computer screens size range: 13 to 32 inches. Second, screen weight range: 4.4 to 19.8 lbs. Third, the back of the monitor screen must have VESA mounting holes with a pitch of 75x75mm or 100x100mm.
- Regarding the compatibility with desks - Your desk must meet three conditions at the same time: First, desk material: Only wooden desks are recommended, plastic or glass desks cannot be used. Second, desk thickness range: 0.59" - 3.54". Third, the bottom of the desk should not have any cross beams or panels, as this will interfere with installation. We recommend carefully checking that your desk and monitors meets all above conditions before purchasing.
- Dual C-Clamp Hold - Worried your dual monitors might wobble or slip? Our upgraded base uses a larger platform plus a dual C-clamp structure to lock the dual monitor arm firmly to your desk. Each arm safely keeps your screens steady while you type, click and game—no shaking, no sliding, just a clean and secure setup you can trust every day. It also provides Grommet Mounting installation choice, both options ensure stable and secure fixation for your 0.59" - 3.54" desk.
- Full-Motion Adjustment For Comfortable View - Pull the screen closer when you’re deep in a spreadsheet, push it back to watch videos, or rotate to portrait for coding — moving everything smoothly with just one hand. The monitor stand offers +85°/-50° tilt, ±90° swivel and 360° rotation. Raise your monitor up to 15.75″ to support a healthy sitting posture. Whether you’re working from home, gaming through the night, or switching between video calls and documents, getting the screens to your natural line of sight helps relieve neck, shoulder and back strain so you can stay focused longer with less fatigue.
- Keep Your Desk Organized: By lifting both screens off the desktop, this dual monitor stand opens up valuable space for your keyboard, notebook, docking station or a simple, clutter-free work area. Built-in cable management guides wires along the arms, keeping cords out of sight and out of the way. Enjoy a tidy, modern workstation that looks as good as it feels to use.
Troubleshoot common failures
The process exits immediately
Read the PM2 log first. A conflict between NODE_ENV and --prod is a documented startup failure; remove the conflicting value and start again. Other common causes are missing environment variables, an unreachable database, a dependency installed for another platform or a port already in use.
Nginx returns 502 Bad Gateway
A 502 usually means Nginx cannot connect to the configured upstream. Confirm that PM2 reports the app online, that Sails is listening on the same port used in proxy_pass and that the listener is reachable from the VPS. If the app binds only to a different interface or the process stopped after launch, correct that before changing Nginx.
HTTPS redirects or secure cookies behave incorrectly
Confirm that Nginx forwards X-Forwarded-Proto and that trustProxy is enabled only for this controlled proxy path. Test a direct connection to the Sails port if it is reachable; it should not be publicly exposed.
Assets are stale or unminified
Verify that the process started in production and that the production asset task ran for this release. Clear only the appropriate generated files after checking the deployment procedure; do not delete the shared application directory blindly, especially if more than one process is running.
Model changes did not apply
Production mode forces migrations to safe. Plan and execute schema changes explicitly instead of expecting a development-style automatic alteration during sails lift.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
The app works locally but not after reboot
Check that PM2 startup integration was configured for the same Unix account, that the nvm environment is available to the boot service and that all required environment variables are present at boot. A process that works in an interactive shell can fail under a service with a different home directory or PATH.
Release and rollback practices
Deploy a new release into a separate, identifiable directory or commit-based checkout, install its production dependencies on Ubuntu, and start it only after validating configuration. Keep the previous known-good release available until health checks pass. If the new process fails, point PM2 back to the previous entry point and restore the matching environment values, then investigate logs before retrying.
Handle database changes separately from application restarts. Because production migrations are safe by default, an application release may require a manually coordinated schema migration. Document whether a change is backward-compatible with the previous release before switching traffic.
When updating Node.js, Sails or PM2, change one major variable at a time where possible. Record the old runtime and process-manager versions so a rollback does not accidentally combine a new runtime with an old native dependency tree.
Version-specific cautions
Sails behavior, including NODE_ENV handling and proxy defaults, can change between releases. Read the documentation for the exact Sails version in your project before changing production settings. Node.js LTS versions also move over time, and PM2’s startup integration depends on the installed release and init system.
The older report about PM2 cluster mode and a shared .tmp directory is not confirmation that every current Sails release has that defect. Treat it as a reason to test concurrency, not as a universal prohibition or a guarantee of safety.
Quick Recap
Deployment checklist
- Ubuntu access, hostname and release source are ready.
- Node.js LTS is installed and the selected runtime is the one PM2 will use.
- Production dependencies are installed on Ubuntu from the project’s lockfile strategy.
- Secrets are supplied through protected environment configuration.
- The app starts with one consistent production setting:
NODE_ENV=productionor--prod. - PM2 keeps the process online, and its boot-time startup has been tested.
- Nginx forwards the correct local port and required headers.
- WebSocket upgrade handling is present if the app uses sockets.
trustProxyis configured only for the controlled HTTPS proxy path.- HTTPS renewal and firewall rules have been verified for this Ubuntu release.
- Direct local, proxied HTTPS and reboot tests have passed.
Product prices and availability are accurate as of the date/time indicated and are subject to change. Any price and availability information displayed on Amazon at the time of purchase will apply.




