How to Run a Node.js App Behind OpenLiteSpeed on Webuzo
On Webuzo, your Node.js app runs on a local port while OpenLiteSpeed (the web server Webuzo uses) sits in front as a reverse proxy — forwarding requests from your domain to your app. This is the key piece that makes a Node app reachable on your live domain over standard web ports.
Why a reverse proxy?
Your Node app listens on a port like 3000, which is not the public web port. OpenLiteSpeed listens on 80/443 and forwards incoming requests to your app's local port. It also handles SSL and serving static files efficiently, leaving Node to do the dynamic work.
How the setup works
- Your Node app runs on a local port under PM2 (say
localhost:3000). - You define a proxy target in OpenLiteSpeed that points to that local address.
- You route your domain's traffic to that proxy, so requests to your site reach your app.
In OpenLiteSpeed this is done by creating an external app of the web-server (proxy) type pointing at localhost:3000, then adding a context or rewrite that sends requests to it. Webuzo's panel and the OpenLiteSpeed admin console expose these settings.
WebSockets
If your app uses WebSockets, make sure the proxy is configured to allow the connection upgrade so real-time features work — relevant for Socket.IO and WebSockets.
SSL
Terminate HTTPS at OpenLiteSpeed with a free certificate — see enabling SSL on Webuzo — so the public connection is encrypted while your app speaks local HTTP.
OpenLiteSpeed's admin layout can vary by version; treat these as the general steps rather than exact labels.
Frequently asked questions
Why can't I just run Node on port 80?
Letting the web server own ports 80/443 and proxy to your app is more robust — it handles SSL, static files and multiple sites cleanly, and keeps your app on a safe local port. It is the standard, resilient pattern.
My proxy returns an error or 502.
Usually the app is not running on the expected port, or the proxy points at the wrong address. Confirm the app is up under PM2 and that the proxy target matches its exact local port.
Can I proxy several apps?
Yes — run each app on its own local port and add a proxy entry per domain or subdomain pointing to the right port. This lets one Webuzo server host multiple Node apps.
Was this article helpful?