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 glitchesiTechGuides is reader-supported. When you buy through links on our site, we may earn an affiliate commission. As an Amazon Associate I earn from qualifying purchases. Learn more
Antihost offers Linux VPS plans with full root access, unlimited traffic on a 1 Gbps port and a 14-day free trial.
The reliable production pattern is to run your Sails.js application with a current Node.js LTS release, keep its dependencies and secrets on the VPS, launch it in production mode under PM2, and put Nginx in front of it as a reverse proxy. Nginx handles the public HTTP(S) connection while Sails listens on a private local port. Add HTTPS, a restrictive firewall, startup recovery, and a tested update procedure before calling the deployment complete.
What the finished deployment looks like
A browser should never need to connect directly to the Sails process. The normal request path is:
- Internet: the domain resolves to the VPS address.
- Nginx: listens on ports 80 and 443, terminates TLS, and forwards requests to Sails.
- Sails.js: runs on a local port such as 1337 and serves the application.
- PM2: keeps the Node.js process alive, restarts it after a crash, and can start it after a reboot.
- Ubuntu and UFW: provide the operating system, user accounts, updates, and network access rules.
This separation gives you one public entry point, lets Nginx handle certificates and connection details, and prevents the application port from being exposed unnecessarily.
Before you start
Required access and information
- An Ubuntu VPS with a public IPv4 address (and IPv6 if your DNS will publish an AAAA record).
- SSH access through a non-root administrative account with
sudo. - Your Sails project in a Git repository or an archive that can be copied to the server.
- The production database, object storage, mail service, and other external services your app requires.
- A domain name whose DNS records can be pointed at the VPS.
Choose the application port
Sails commonly listens on port 1337, but any unused local port works. Use one value consistently in the Sails configuration, PM2 environment, and Nginx proxy_pass. Bind the app to localhost unless another private service must reach it over the VPS network.
#1 Best Overall
- Powerful Turbo Fan:CAGIWIRU Electric Air Duster have reached speed up to 130000RPM,Can efficient remove dust and debris.With LED light and Three Adjustable Speed to meet with different cleaning tasks.
- With Attached USB C Fasting Charging cable.Charing 3 hours,Enjoy up to 240 minutes of use on the lowest setting, For third speed can use for 25mins.with four charging options to meet with your needs.
- Wide Application:Upgraded attached 5 different nozzles,making it suitable for a variety of scenes, such as car,pet, pc, keyboards, and other electronic devices. It also serves for office and home clean duster.
- Handy Design & Portable:Cordless air duster electric nozzle is Light weight and small size, design and comfortable to hold and space saving, convenient to carry around. You can put it in your room or inside the car without taking up space.
- Warranty & Support: Our Electric air duster comes with 5 years warranty and 24/7 customer service. During this period, if you have any questions,pls kindly feel free to contact us.
Plan your secrets
Do not commit database passwords, session secrets, API keys, or private certificates to the repository. Decide which environment variables the application expects and how PM2 will receive them. A deployment is incomplete if the code is present but its production configuration is missing.
Prepare Ubuntu and install Node.js
Update the operating system
Log in over SSH and apply available security updates before installing the runtime:
sudo apt update
sudo apt upgrade -y
sudo apt install -y build-essential git curl nginx ufw
Reboot if Ubuntu installs a kernel or other update that requests one. Reconnect over SSH after the reboot and confirm that your administrative account still has sudo access.
Install a current Node.js LTS release
Sails applications should use a Node.js LTS release supported by the Sails version in the project. The exact LTS major version changes over time, so check your application’s support range rather than hard-coding an old version. Using nvm keeps the runtime tied to the deployment user and makes upgrades reversible:
nvm install --lts
nvm alias default node
node --version
npm --version
If nvm is not installed, install it from its current official instructions, open a new login shell, and run the commands above. A system-wide Node.js package from a maintained distribution repository is another option; do not mix a system package and nvm unintentionally, because PM2 may then run with a different Node binary than your interactive shell.
Use a dedicated service account
Run the application as an unprivileged user rather than as root. Create a user if your VPS does not already provide one, give it ownership of the application directory, and reserve sudo for administration. The application should not need permission to modify system configuration or listen on privileged ports.
Copy the Sails project to the VPS
Clone or transfer the release
Choose a stable directory such as /var/www/sails-app. Clone the repository as the service user, or copy a release archive and extract it there. Keep the directory owned by that user:
Rank #2
- Screen Cleaner is Your Screen’s New Bestfriend! - EVEO is proud to present a screen cleaner that’s perfectly suited for your TV. Meet your new screen cleaner, computer screen cleaner, laptop cleaner, iPad cleaner, Macbook,tv cleaner or any other electronic device. Our screen cleaner spray and wipe along with the included plush microfiber cloth, easily removes dust, fingerprints & other smudges on the screen’s surface. Clean effectively for a streak-free screen
- Gentle on your Screens - Our screen cleaner spray and wipes is compatible to be used even for the most sensitive LCD, LED, CRT, and OLED screens in proper use. Be at ease knowing that this product is compatible with all the major brands: LG, SONY, Samsung, Sharp, iPad, iPhone, Android screens, Kindle, PC monitors - we’ve got you covered! Can be used as LCD screen cleaner, tv cleaner, smart tv screen cleaner, and more
- Premium Super Soft Plush Microfiber Cloth - Included in this efficient screen cleaning kit. This screen cleaner spray and wipe has our signature plush microfiber cloth specially designed to comply with screens and monitors and leave them streak-free. Has been shown to effectively absorbs stubborn stains, zero streaks, and no fiber shedding. Always use this together with our screen cleaner for the best results
- Easy-to-Use Screen Cleaner Kit + microfiber cleaning cloth - The EVEO Screen Cleaning Kit will easily be your new favorite tool when it comes to taking care of the things you love most, quick and easy solution for a streak-free screen. Simply screw on the sprayer gun on the screen cleaner bottle. Spray the cleaning liquid onto the microfiber cloth, then wipe the screen until desired cleanliness & shine is achieved.
- Quality Screen Care Kit Worth Purchasing - Enjoy a convenient Screen Cleaner anytime, anywhere you need it. Your satisfaction is our top priority. We stand behind the quality of our products and that’s why, you shouldn’t be worrying at all. We manufacture the Best Screen Cleaner. and can be used for laptop cleaning kit, laptop screen cleaner, tv screen cleaner for smart tv. MacBook screen cleaner, monitor cleaner or screen cleaner spray for electronic devices with microfiber cleaning cloth
sudo mkdir -p /var/www/sails-app
sudo chown -R deploy:deploy /var/www/sails-app
cd /var/www/sails-app
git clone <your-repository> .
Replace the repository placeholder with your real source location; it is shown in escaped HTML so it cannot be mistaken for a literal command. For a controlled release, check out a tag or commit instead of deploying an unreviewed branch.
Install production dependencies
Use the lockfile committed by the project. With npm, a standard production install is:
npm ci --omit=dev
Older projects may use a different npm flag or package manager. Follow the lockfile and scripts already defined in the project. Do not remove a package that Sails needs at runtime merely because it is listed under development dependencies; correct the package classification in the project and redeploy if that happens.
Compile or generate required assets
Inspect package.json for a build script, database preparation step, or other release task. Run those tasks as the service user and record their expected output. Sails runs its production task when launched in production mode, which includes minifying assets, but application-specific build steps may still be required.
Provide environment variables
Set production values through PM2’s environment configuration, a protected environment file loaded by your deployment process, or the service manager you use. Restrict permissions on any file containing secrets:
chmod 600 /path/to/production.env
At minimum, verify the database connection, session or cookie secret, host name, port, external service credentials, and any setting that changes behavior between development and production. Never print the complete environment to logs while troubleshooting.
Start Sails in production mode
Set NODE_ENV deliberately
The standard production approach is to set NODE_ENV=production. Sails also supports sails lift --prod; that flag sets production mode when NODE_ENV has not already been set. If the environment says development while the command requests --prod, Sails treats the conflict as an error and does not start. Check both values before diagnosing a failed launch.
Rank #3
- 【Large size】:Measuring 800 x 300 mm/ 31. 5×12 inches, which is wider and taller than others. Large mouse pad can perfectly fit your keyboard and mouse of any size, and there is also ample space for peripherals such as phones, tablets, etc.
- 【LED backlight mouse pad】:Blade Hawks RGB mouse pad provides 7 static modes and 7 dynamic modes will give you the options you are looking for. Power-off memory function remembers the last lighting mode you selected. The super glow fiber Chroma will give you a colorful gaming setup that you want.
- 【Anti-slip rubber base】:Made from Natural rubber, this gaming mousepad will firmly grip your desktop, allowing you to enjoy the ultimate precision in the games you are most passionate about. It also comes with a texture that enhances this ability even further.
- 【Smooth and waterproof surface】: Micro-textured cloth surface, for extremely precise mouse control and a smooth movement. When liquid splashes on the gaming mouse pad, it forms water droplets and slides down. Will not delay your work or gameplay.
- 【Plug and play】: This mouse and keyboard pad is powered by USB, plug and play, no driver required. One button control light modes. Press one time to change the lighting mode, press twice to change the brightness, press and hold about 3 seconds turn ON/OFF.
NODE_ENV=production node app.js
When using the Sails CLI directly, the equivalent is:
NODE_ENV=production sails lift
or, when no conflicting NODE_ENV is present:
sails lift --prod
Understand the production changes
Production mode is not just a performance label. Sails forces model migrations to the safer safe behavior, so deploying new model definitions does not automatically alter existing data. It also logs server errors without sending stack traces to clients and runs the production asset task that minifies assets. Plan schema changes as explicit, reviewed database migrations rather than relying on an automatic development migration.
Test locally on the VPS
Start the application temporarily in a shell and test it through its local port before adding Nginx:
NODE_ENV=production node app.js
From another SSH session, request a health endpoint or the home page with curl http://127.0.0.1:1337 (change the port if yours differs). Confirm that the process reaches the listening state, can connect to its database, serves static assets, and does not expose a development error page. Stop the foreground process after the test.
Free tools Windows power users keep installed
One-click scans. No signup required.
Keep the process alive with PM2
Install and launch the app
Install PM2 for the same Node.js installation that will run the service, then launch the Sails entry point. A common command is:
npm install --global pm2
pm2 start app.js --name sails-app -- --prod
The final -- separates PM2 options from arguments passed to app.js. If your project uses a different entry script or relies on an npm start script, use that project’s documented command. Confirm the command against the PM2 version installed on the VPS, because CLI options and startup integration can change.
Pass environment values and inspect logs
Define the production environment in the PM2 ecosystem configuration or in the shell that starts the process. Then inspect status and logs:
Rank #4
- 【Softer and More Comfortable】Vaydeer wrist rest has unique diamond pattern, which is the combination of softness and aesthetics. The materials of wrist rest are improved into higher quality memory foam and covered with silky smooth lycra. The computer wrist rest makes you as comfortable and cushiony as like rest your wrists on clouds.
- 【Ergonomic Wrist Saver】The wrist rests for keyboard and mouse comes with a 17.32×3.15×0.83 inch keyboard wrist pad and a 5.94×3.15×0.83 inch mouse wrist support. Based on ergonomic design, the unique concave shape is the perfect fit for your wrist joints. The wrist rest pad fits most computer keyboards and laptops, improve hand and wrist posture, release your wrist and arm stress.
- 【Non-Slip Rubber Bottom】Featuring an anti-skid silicone base on the bottom, this wrist keyboard support stays firmly in place on your desk, preventing the padding from sliding around, ensuring stable and consistent wrist support during extended computer sessions.
- 【Better Experience & Pain Relief】Our keyboard arm rest is beneficial to alleviate the soreness caused by direct contact and friction between your arm and a hard desk surface, reducing the risk of wrist fatigue or carpal tunnel. The soft texture of memory foam can evenly distribute the pressure around your wrists and provide good support with just enough give.
- 【Helpful in Multiple Scenarios】Whether you're working, studying, writing, typing, gaming, this keyboard and mouse rest combo is an essential accessory to add comfort and support to your hands and wrists. It’s also a great gift for men, women, family, friend, coworker, gamer, teacher, etc.
pm2 status
pm2 logs sails-app
pm2 describe sails-app
Look for a single online process, the expected Node.js interpreter, the production environment, and a stable restart count. A process that repeatedly restarts usually indicates a missing secret, an unreachable database, a port collision, or a startup exception; solve that error before placing Nginx in front of it.
Persist the process list and enable boot startup
Save the known-good process list and configure PM2’s startup integration for Ubuntu:
pm2 save
pm2 startup
PM2 prints a follow-up command tailored to the current user and system. Run that printed command with the requested privileges, then reboot during a maintenance window and verify with pm2 status. Repeat pm2 save after adding, removing, or renaming a process; otherwise the next reboot can restore an outdated list.
Configure Nginx as the reverse proxy
Create a server block
Create a site configuration under Ubuntu’s Nginx configuration directory. The example below forwards a Sails app on localhost port 1337 and preserves the headers applications commonly need:
Windows 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 reinstallCrashes, 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 minuteserver {
listen 80;
listen [::]:80;
server_name example.com www.example.com;
location / {
proxy_pass http://127.0.0.1:1337;
proxy_http_version 1.1;
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;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_read_timeout 60s;
}
}
Replace both host names and the upstream port. The Upgrade and Connection headers support WebSocket-style connections; if the application never uses sockets they are harmless in this location, but long-lived requests may require a larger read timeout chosen for your workload.
Enable and validate the site
sudo ln -s /etc/nginx/sites-available/sails-app /etc/nginx/sites-enabled/sails-app
sudo nginx -t
sudo systemctl reload nginx
Do not reload after a failed nginx -t. Fix syntax errors, duplicate server names, and incorrect upstream ports first. Test the domain from a client and compare the result with a direct local request. If Nginx returns 502, inspect the PM2 log and verify that Sails is listening on the address and port in proxy_pass.
Set Sails trustProxy only when appropriate
Sails exposes Express’s proxy-trust behavior through sails.config.http. It controls whether forwarded headers such as X-Forwarded-Proto and X-Forwarded-For are trusted when determining the original request scheme and client address.
Best Value
- 【No Drill Mounted】Cable management tray can be assembled in as little as 3 minutes or less-simply. Side clips easily clampe the edge of desk, pass through the holes on the sides, and secure excess cables with baskets. Desk cable management supports inward or outward installation to meet your needs in different scenarios, and provides you with great convenience when collecting and organizing wires.
- 【Rubber Pad Protects Desk】Wire organizer under desk built-in soft rubber pads on the clamp protect your desk from scratches, so you will not damage your furniture or office.
- 【Sturdy and Beautiful】Cord management under desk is made of high-quality carbon steel and holds about 15 lbs. The wire basket has 2 holes on each side of the tray to enable your cables to pass freely. Cable baskets are suitable for desk thickness use from 0.4" to 2.4".
- 【Space Saving & Keep Organized】Desk cable management tray holds all your power cords, outlet strips, USB hubs and computer transformers hidden from your feet, and the data cables will not enter the vacuum cleaner to keep your desk clean and tidy. Desk wire organizer is also suitable for use in the kitchen and outdoors.
- 【Reduce Safety Risks】Cable tray under desk keeps all plugs away from your kids, no more worry about tripping. Using 2 holes wire tray saves extra space, helps you easily cabling and wire protection. The mesh design is not easy to accumulate dust, but avoids safety accidents caused by messy wires.
When Sails is behind an HTTPS reverse proxy, configure the setting in config/http.js:
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
module.exports.http = {
trustProxy: true
};
Start with true only when every request reaching Sails comes through a proxy you control. If the VPS also accepts direct connections to the Sails port, a client could forge forwarded headers; block that port with the firewall or bind Sails to localhost. If your topology contains multiple proxies or untrusted networks, use a narrower trust configuration supported by your Sails and Express versions instead of trusting every hop.
Leave trustProxy undefined when Sails is directly exposed without a proxy. Version-specific defaults and accepted values can change, so check the documentation for the Sails release installed by the project.
Add HTTPS and a firewall
Obtain and renew a certificate
Use a current Let’s Encrypt and Certbot procedure for your Ubuntu release. The certificate request normally requires DNS to point at the VPS and port 80 to be reachable for validation. Configure the Nginx HTTPS server block, redirect plain HTTP to HTTPS, and verify renewal with the renewal tool’s dry-run option. Treat certificate renewal as an automated service, not a one-time manual task.
Allow only required ports
Before enabling UFW, make sure your SSH rule matches the port and source address you actually use. A typical allow-list contains SSH, HTTP, and HTTPS:
Recommended Free Tools
sudo ufw allow OpenSSH
sudo ufw allow 80/tcp
sudo ufw allow 443/tcp
sudo ufw enable
sudo ufw status verbose
Do not open the Sails port to the Internet when Nginx is the only public entry point. If you need temporary diagnostic access, restrict it to your own source address and remove the rule immediately afterward.
Deploy updates without losing control
A repeatable release sequence
- Back up the database and confirm that the backup can be restored.
- Fetch the intended commit or tag into a separate release directory, or create a clearly identified deployment point.
- Install dependencies from the lockfile with the production-only option used by your project.
- Apply reviewed database migrations separately; production mode’s safe model migration behavior is not a substitute for schema migration tooling.
- Run the application’s build or asset commands.
- Start the new code in a test shell or staging environment and check its health endpoint.
- Switch the live directory or restart the PM2 process only after the checks pass.
- Run smoke tests through the HTTPS domain, then inspect PM2 and Nginx logs.
Use PM2 for a controlled restart
For a code-only release, restart the named process after the new files and environment values are in place:
pm2 restart sails-app --update-env
pm2 save
--update-env asks PM2 to refresh environment values on restart. If the process fails, use pm2 logs sails-app, restore the previous release, and restart the known-good version. Keep at least one previous release until the new deployment has passed its first production checks.
Troubleshoot by symptom
The app exits immediately
- Check
pm2 logs sails-appfor a syntax error, missing module, invalid environment variable, or database authentication failure. - Run the same production command in the foreground so the complete startup error is visible.
- Confirm that PM2 and your shell use the same Node.js version and nvm profile.
- Verify that the configured port is free and that the process user can read the project and its secret files.
Nginx shows 502 Bad Gateway
- Check
pm2 statusand confirm Sails is online. - Use
ss -ltnpto verify that the expected local port is listening. - Compare the Sails bind address and port with
proxy_pass. - Read the Nginx error log for connection-refused, timeout, or permission details.
HTTPS redirects loop or secure cookies do not work
- Ensure Nginx sends
X-Forwarded-Protowith the client-facing scheme. - Configure
trustProxyonly for the controlled HTTPS proxy path. - Check that the HTTPS server block, certificate, and HTTP-to-HTTPS redirect do not point at each other.
WebSockets or live updates fail
- Keep HTTP/1.1 and the upgrade headers in the Nginx location.
- Confirm that the socket endpoint is covered by the location block and that any long-lived connection timeout is suitable.
- Test through the public HTTPS hostname rather than only against localhost.
Static assets or database data look wrong after deployment
- Check that the production asset task ran and that Nginx is forwarding the request to the intended release.
- Confirm that the application is using the production database variables, not a development fallback.
- Remember that production model migration safety prevents automatic destructive changes; apply an explicit migration when the schema must change.
Do not assume cluster mode is safe
An older Sails forum discussion reported conflicts over the shared .tmp directory when starting multiple PM2 instances with a command such as pm2 start app.js -i max -- --prod. That report is dated, and its behavior may differ across current Sails releases, adapters, and build tasks. Treat multi-process cluster mode as unverified until you reproduce it with your exact Sails version and workload. Begin with one PM2 instance, add horizontal capacity only after testing shared temporary files, sessions, sockets, scheduled jobs, and database connection limits.
Quick wins for a faster PC:
Clear out junk files and repair common Windows errorsFree Scan →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Production readiness checklist
- Ubuntu security updates are installed and a non-root deployment account is used.
- The Node.js LTS version matches the Sails project’s support range.
- Dependencies are installed from the lockfile with development packages omitted where appropriate.
- Secrets are outside source control and readable only by the service account.
NODE_ENV=productionand the Sails launch mode agree.- PM2 reports the process online, its logs are monitored, and startup persistence has been tested after a reboot.
- Nginx passes configuration testing and proxies only to the intended local port.
- WebSocket headers are present if the application uses sockets.
trustProxyis configured only for a controlled HTTPS proxy path.- HTTPS certificates renew automatically and HTTP redirects to HTTPS.
- UFW permits only required public services and SSH administration.
- Backups, rollback files, health checks, and a documented update sequence have been tested.
The Bottom Line
For an Ubuntu VPS, deploy the Sails code and locked production dependencies, run it with an explicit production environment, supervise it with PM2, and expose it through an HTTPS-enabled Nginx reverse proxy. Keep Sails bound to a private port, configure trustProxy only for that trusted proxy path, and verify startup, rollback, backups, and firewall rules before sending real traffic.
Quick Recap
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.

