iTechGuides 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.
Run Node.js as a non-root service on an internal port, place nginx in front for HTTPS and WebSocket upgrades, and keep Redis on loopback or a private network. Socket.IO does not require Redis for one process; add the Redis adapter when broadcasts must reach clients connected to other workers or hosts. The procedure below installs the components, wires the adapter, secures Redis, keeps the service alive after SSH disconnects, and verifies a production deployment.
Target architecture
A reliable VPS deployment separates public traffic, application execution, and messaging:
Recommended Free Tools
- nginx: the only public HTTP service. It terminates TLS, serves or proxies ordinary HTTP requests, and forwards WebSocket upgrade requests.
- Node.js and Socket.IO: run as an unprivileged deploy user, listening on
127.0.0.1:3000(or another private port). - Redis: a trusted backend for Socket.IO Pub/Sub. On a single VPS, bind it to loopback. On a separate host, place it on a private network and permit only the application host.
- PM2 or systemd: starts the process at boot, restarts it after failure, and keeps it running when your SSH session ends.
For one Socket.IO process, the default in-memory adapter delivers events locally and Redis adds no benefit. Once two processes or hosts accept connections, each process has its own connected clients; the Redis adapter propagates packets between them.
Prepare the VPS and firewall
Create an unprivileged deployment account
Provision a currently supported Linux VPS and log in over SSH as the provider’s initial administrator. Create a dedicated account for deployment and application execution, add it to the administrative group used by your distribution, and install your SSH public key for that account. Disable password authentication and direct root login only after confirming that the new account works in a separate SSH session.
#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: 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.
- Economical &Reusable: Built durable materials with a long-lasting battery,our CAGIWIRU air duster it's a sustainable alternative to disposable air cans.
Apply operating-system security updates before installing application software. Keep the cloud firewall and the host firewall aligned:
- Allow SSH (preferably from your administration addresses).
- Allow TCP 80 and 443 for nginx.
- Do not allow TCP 6379 from the internet.
- Do not expose the Node.js port; nginx should be the public entry point.
If Redis runs on another machine, allow port 6379 only from the application’s private address, or use the private Redis service’s network policy. A public scan should never be able to reach Redis.
Install Node.js
Use a maintained Node.js release. The official Node.js download page lists the current supported release lines and the installation method appropriate to your operating system or provider image. Avoid copying an obsolete version from an old blog post.
- Install the release recommended for your distribution using its supported package source or the provider’s documented Node.js repository.
- Open a new shell as the deploy user so its executable path is refreshed.
- Confirm both runtimes:
node --version
npm --version
The commands should print version numbers without requiring sudo. Keep the package manager and Node.js installation owned by the deploy account where your operating-system method permits it; running application installs as root creates ownership problems later.
Install and restrict Redis
Same-host Redis
Install Redis from the operating system’s supported package source. Configure it to listen on 127.0.0.1 rather than every interface, enable the distribution’s service, and start it. The exact configuration-file location varies by distribution, so use the package’s service status output to identify it.
After changing the bind address or authentication settings, restart Redis and check locally:
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
redis-cli ping
A healthy local instance returns PONG. Keep the firewall rule that blocks external access even when Redis is bound to loopback; defense in depth protects you from an accidental configuration change.
Private or managed Redis
If Redis is separate from the VPS, use a private subnet, VPN, or the provider’s private service network. Permit only the application host’s private address. Put the complete connection URL in a protected environment variable rather than source control. For traffic that crosses a network requiring confidentiality, use Redis TLS and a rediss:// URL with certificate validation configured for your service. Redis supports TLS from version 6; a TLS deployment can set a dedicated tls-port and disable the non-TLS listener with port 0.
Create the Socket.IO application
Install runtime packages
Create an application directory owned by the deploy user, initialize a package manifest, and install the server packages:
mkdir -p /srv/realtime-api
cd /srv/realtime-api
npm init -y
npm install socket.io redis @socket.io/redis-adapter
The Redis adapter is an additional package; installing redis alone does not make Socket.IO broadcasts cross process boundaries. Commit the resulting package manifest and lockfile, but never commit credentials.
Store configuration outside source control
At minimum, define:
PORT, normally3000for the internal listener.REDIS_URL, such asredis://127.0.0.1:6379for same-host Redis or a TLS URL for a private encrypted connection.PUBLIC_ORIGIN, the browser origin allowed by your Socket.IO CORS policy.- Any session keys, cookie secrets, ACL passwords, or bearer-token secrets required by your application.
Store these values in a root-readable or service-readable protected environment file, a systemd environment configuration, or your process manager’s secret facility. Ensure logs never print the Redis URL, ACL password, cookies, or authorization tokens.
Wire Socket.IO to Redis
The adapter uses Redis Pub/Sub. A publisher sends the packet locally and publishes it; peer Socket.IO servers subscribed to the adapter channels receive and deliver it to their own clients.
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.
import { createServer } from "node:http";
import { Server } from "socket.io";
import { createClient } from "redis";
import { createAdapter } from "@socket.io/redis-adapter";
const httpServer = createServer();
const pubClient = createClient({
url: process.env.REDIS_URL ?? "redis://127.0.0.1:6379"
});
const subClient = pubClient.duplicate();
pubClient.on("error", (err) => console.error("Redis pub error", err));
subClient.on("error", (err) => console.error("Redis sub error", err));
await Promise.all([
pubClient.connect(),
subClient.connect()
]);
const io = new Server(httpServer, {
cors: {
origin: process.env.PUBLIC_ORIGIN,
credentials: true
},
adapter: createAdapter(pubClient, subClient)
});
io.on("connection", (socket) => {
socket.on("healthcheck", (ack) => ack({ ok: true }));
});
httpServer.listen(Number(process.env.PORT ?? 3000), "127.0.0.1");
Save the entry point according to your package configuration (for example, server.js with an appropriate ESM setting), then start it as the deploy user. The process should listen only on the loopback address. If your application uses cookies, set PUBLIC_ORIGIN to the exact scheme and hostname used by browsers; a wildcard origin cannot be combined safely with credentialed requests.
Choose the right adapter
- One process: keep Socket.IO’s default in-memory adapter unless you have another reason to use Redis.
- Several workers on one VPS or several hosts: use the Redis adapter so broadcasts cross process boundaries.
- Redis 7 at high Pub/Sub scale: evaluate Socket.IO’s sharded adapter. Its documented minimum is Redis 7.0 with compatible client versions. The ioredis variant requires
shardedSubscribers.
The documented node-redis pattern duplicates the publisher connection for subscriptions. Its reconnect behavior can have subscription-restoration issues in some failure scenarios; if that behavior is unacceptable, evaluate the documented ioredis alternative and test recovery before production.
The Tool Desk
Outbyte PC Repair FREEClear out junk files and repair common Windows errorsFree Scan →Outbyte Driver Updater FREEFix the driver behind crashes, sound loss and screen glitchesFind Drivers →Redis loss is a degraded state, not a silent success condition. The adapter documentation notes that packets continue only to clients connected to the current server while Redis is unavailable. Expose this condition in health checks and alerting.
Put nginx in front of Node.js
Install nginx from your operating system, obtain a certificate through your chosen certificate authority, and configure nginx to listen publicly on 80 and 443. Redirect HTTP to HTTPS after certificate issuance. Proxy both ordinary requests and the Socket.IO path to the internal Node listener.
WebSocket connections require the HTTP upgrade headers. A representative server block is:
map $http_upgrade $connection_upgrade {
default upgrade;
'' close;
}
server {
listen 443 ssl http2;
server_name realtime.example.com;
ssl_certificate /etc/ssl/example/fullchain.pem;
ssl_certificate_key /etc/ssl/example/privkey.pem;
location / {
proxy_pass http://127.0.0.1:3000;
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 $connection_upgrade;
proxy_read_timeout 75s;
}
location /socket.io/ {
proxy_pass http://127.0.0.1:3000/socket.io/;
proxy_http_version 1.1;
proxy_set_header Host $host;
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 $connection_upgrade;
proxy_read_timeout 75s;
}
}
Use a read timeout long enough for your heartbeat and expected idle period; an overly short timeout drops otherwise healthy long-lived connections. Preserve the original host and protocol so URL generation, secure-cookie decisions, CORS checks, and application logging see the public request correctly. Validate the configuration with nginx -t, reload nginx, and inspect its error log if a browser receives HTTP 400, 404, or repeated reconnects.
Free tools Windows power users keep installed
One-click scans. No signup required.
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.
Expose only nginx’s 80/443 listeners and SSH. Never solve a proxy problem by opening port 3000 or 6379 to the internet.
Keep the process alive after SSH disconnects
PM2
PM2 is a production process manager documented for Socket.IO deployments. From the application directory, start the npm script:
pm2 start npm --name realtime-api -- start
pm2 status
pm2 logs realtime-api
pm2 save
pm2 startup
Run the command printed by pm2 startup with the required administrative privilege, then reboot-test the VPS. pm2 save records the process list for restoration. PM2 can reload workers, but multiple workers still need correct session routing and the Redis adapter.
systemd
systemd is an equally valid alternative and often fits distributions that already standardize service ownership and logs. Create a unit such as:
[Unit]
Description=Socket.IO realtime API
After=network-online.target
Wants=network-online.target
[Service]
Type=simple
User=deploy
WorkingDirectory=/srv/realtime-api
EnvironmentFile=/etc/realtime-api/realtime-api.env
ExecStart=/usr/bin/node /srv/realtime-api/server.js
Restart=on-failure
RestartSec=5
[Install]
WantedBy=multi-user.target
Protect the environment file so only root and the service account can read it. Then enable and start the unit:
sudo systemctl daemon-reload
sudo systemctl enable --now realtime-api
sudo systemctl status realtime-api
journalctl -u realtime-api -f
Do not run Node.js as root. Whichever supervisor you select, test an intentional process exit, verify automatic recovery, and confirm that the service starts after a VPS reboot.
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.
Understand scaling before adding workers
Session routing
Socket.IO commonly begins with HTTP long-polling and may upgrade to WebSocket. Long-polling sends multiple requests during one session; those requests must reach the process that owns the session. A load balancer therefore needs sticky sessions when polling is enabled. Without affinity, clients can receive “session ID unknown” errors or reconnect loops even though Redis Pub/Sub is healthy.
Do these 3 things before closing this tab:
1Repair Windows errors before they cause bigger problems2Fix the driver behind crashes, sound loss and screen glitches3Clear out junk files and repair common Windows errorsYou can deliberately restrict clients to WebSocket transport, which removes the polling fallback and therefore the sticky-session requirement. This is less tolerant of networks that block or interfere with WebSockets, so choose it only when that trade-off is acceptable.
Event propagation
Sticky routing does not broadcast events between workers. Every process needs an adapter that propagates packets. Redis solves this cross-process and cross-host problem, but it does not replace session affinity for polling sessions.
Same-host versus private Redis
| Choice | Advantages | Costs and conditions |
|---|---|---|
| Single process, in-memory adapter | Fewest components and no Redis failure mode. | Events reach only clients on that process; no cross-worker delivery. |
| Multiple workers, same-host Redis | Low network latency and simple topology. | Redis and the application share one VPS failure domain; bind Redis to loopback. |
| Private managed or separate Redis | Independent resources and easier horizontal growth. | Requires private networking, access control, monitoring, and TLS when traffic needs confidentiality. |
| Default Redis Pub/Sub adapter | Documented and suitable for ordinary multi-process deployments. | Redis availability becomes part of broadcast reliability. |
| Sharded adapter on Redis 7 | Designed for higher Pub/Sub scale. | Requires Redis 7.0 and compatible clients; ioredis requires sharded subscribers. |
Secure Redis and the adapter channel
Redis is designed for trusted clients in trusted environments. Redis security guidance recommends denying the port to everyone except trusted network clients, binding a public VPS instance to loopback, and using ACLs. Create a dedicated ACL user for this application with only the commands and Pub/Sub channels it needs. Keep a long password out of source control.
AUTH by itself does not encrypt traffic against network eavesdroppers. Use TLS when Redis traffic leaves the VPS or crosses a network where confidentiality matters. Validate the server certificate rather than disabling verification to make a connection succeed.
Quick wins for a faster PC:
Repair Windows errors before they cause bigger problemsFix Now →Scan for outdated or missing drivers - takes under a minuteDriver Scan →Clear out junk files and repair common Windows errorsFree Scan →The Socket.IO adapter does not sign, encrypt, or authenticate Pub/Sub messages. Any principal able to publish to its channels may inject packets or spoof inter-server control messages. Isolate Redis from unrelated applications, enforce ACL channel restrictions, and treat access to the Redis network as equivalent to access to your real-time message bus.
Verify the deployment before launch
- From the application host, run
redis-cli ping(or the equivalent TLS-authenticated command) and confirmPONG. - From an external network, confirm that port 6379 is unreachable while SSH, 80, and 443 behave as intended.
- Request the application health endpoint through the HTTPS hostname and verify the expected status, certificate, host handling, and forwarded protocol.
- Open a browser client and confirm that Socket.IO connects, upgrades as expected, and receives an application event.
- Run two worker processes, or deploy a second host, and send an event from a client attached to each. Verify that Redis-enabled broadcasts arrive on both sides.
- Restart Redis and confirm that monitoring reports degraded health, the Node process remains observable, and recovery follows the client strategy you selected.
- Stop the Node process intentionally. Confirm PM2 or systemd restarts it, then reboot the VPS and verify automatic startup.
- Inspect nginx, application, process-manager, and Redis logs for connection errors, while confirming that URLs, ACL passwords, cookies, and bearer tokens are redacted.
Troubleshoot common failures
Browser reports a WebSocket error or keeps polling
- Check that nginx sends both
UpgradeandConnectionheaders and uses HTTP/1.1 upstream. - Confirm the
/socket.io/path and trailing-slash behavior match the client and server configuration. - Increase
proxy_read_timeoutif idle connections are closed before Socket.IO heartbeats. - Verify that the TLS hostname, CORS origin, and forwarded protocol match the public URL.
Events work on one worker but not another
- Confirm both processes use the same Redis URL and adapter package configuration.
- Check that publisher and duplicated subscriber clients both connect and remain subscribed after reconnects.
- Ensure ACL rules permit the adapter’s Pub/Sub channels and that no network policy blocks Redis.
- Remember that Redis propagation does not fix polling sessions sent to the wrong worker; configure sticky sessions or intentionally use WebSocket-only transport.
Redis is unreachable
- For same-host Redis, test
127.0.0.1and inspect the Redis service status and bind setting. - For private Redis, test the private address, route, firewall rule, TLS mode, certificate validation, username, and password separately.
- Do not open 6379 publicly as a diagnostic shortcut. Correct the private-network or loopback policy instead.
The service stops when SSH closes
Run it under PM2 or systemd rather than in the foreground shell. Check the supervisor’s status and logs, confirm the working directory and environment file, and perform a reboot test. A terminal multiplexer is not a substitute for boot-time supervision or restart policy.
Operational decisions to document
Record the Node.js release line, Redis version and topology, adapter package version, nginx timeout, session-routing policy, selected supervisor, backup and restore procedure, and alert thresholds. Rehearse Redis loss and process replacement instead of discovering the behavior during an outage. Review ACLs whenever the application adds a command or channel, and keep the public firewall limited to the ports the architecture actually uses.
This arrangement gives a single VPS a clear failure boundary: nginx handles public HTTPS and upgrades, Node.js owns application connections, Redis coordinates only when more than one Socket.IO process needs to communicate, and PM2 or systemd provides lifecycle control. Scale the component that is constrained, but keep Redis private and preserve the distinction between session routing and event propagation.
What’s actually slowing this PC down?
Pick the symptom - the matching free tool is one click away.
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.

