Run Node.js applications with OpenLiteSpeed + Node.js, a combination that allows OpenLiteSpeed to serve as the web server while Node.js runs the application. OpenLiteSpeed can be configured to route requests to Node.js applications, making it possible to host Node.js-based websites and applications on your Self-Managed VPS.
With OpenLiteSpeed + Node.js, you can configure Node.js applications through OpenLiteSpeed's WebAdmin Console, set up virtual hosts and application contexts, and route web traffic to your Node.js application. OpenLiteSpeed can also function as a reverse proxy for Node.js applications and support WebSocket connections when properly configured. With a Self-Managed VPS, you're responsible for configuring, maintaining, updating, and securing your server, your OpenLiteSpeed and Node.js installation, and the applications you deploy.
Key Benefits of OpenLiteSpeed + Node.js
OpenLiteSpeed and Node.js work together to provide a flexible web-serving environment for Node.js applications.
- Node.js Application Support: Run Node.js applications through OpenLiteSpeed using an application server context.
- Web-Based Configuration: Configure Node.js application settings through the OpenLiteSpeed WebAdmin Console.
- Virtual Host Support: Configure individual virtual hosts for Node.js applications and map them to the appropriate domains.
- Reverse Proxy Support: Route requests from OpenLiteSpeed to Node.js applications running as backend services.
- Custom Application Settings: Configure the Node.js binary path, application type, startup file, and other supported application settings.
- WebSocket Support: Proxy WebSocket traffic to a Node.js backend when your application requires persistent connections.
- Static and Dynamic Content Handling: Use OpenLiteSpeed to serve static content while routing dynamic application requests to Node.js.
What Can You Do with OpenLiteSpeed + Node.js?
OpenLiteSpeed + Node.js provides the tools needed to host and manage Node.js applications through OpenLiteSpeed. You can:
- Run Node.js Applications: Configure OpenLiteSpeed to run Node.js applications using its application server settings.
- Configure Node.js Application Contexts: Set the application URI, location, Node.js binary path, application type, and startup file.
- Host Node.js Websites: Configure a virtual host and domain to serve a Node.js application through OpenLiteSpeed.
- Configure Virtual Hosts: Set up virtual hosts specifically for your Node.js applications and map them to listeners.
- Route Requests to Node.js: Configure OpenLiteSpeed to send application requests to a Node.js backend.
- Use Reverse Proxying: Place Node.js applications behind OpenLiteSpeed and route incoming requests to the appropriate backend application.
- Configure Startup Files: Specify the file OpenLiteSpeed should use to start your Node.js application, such as app.js.
- Customize the Node.js Path: Specify a custom Node.js binary location when your installation uses a non-default path.
- Support WebSocket Applications: Configure OpenLiteSpeed to proxy WebSocket connections to a Node.js backend when required by your application.
- Apply Configuration Changes: Use OpenLiteSpeed's configuration and restart options to apply changes to your Node.js application setup.
OpenLiteSpeed + Node.js on a HostGator Self-Managed VPS provides an environment for hosting Node.js applications while using OpenLiteSpeed to handle incoming web traffic. You can configure application contexts, virtual hosts, reverse proxy rules, and WebSocket connections to connect your Node.js applications with your websites and domains.
How to Purchase a Self-Managed VPS with OpenLiteSpeed + Node.js

Not sure which VPS setup is right for you? That's exactly what Pre-configured Setup is for. You'll find this option near the top of the HostGator Self-Managed VPS purchase page, and it takes the guesswork out of getting started. Just tell us what you're building—a WordPress Site, an AI Agent/Claude Code project, a Dev/Staging environment, or an eCommerce Store—and we'll automatically select the right plan, operating system, and template to match.
- Great option if you're new to VPS or want a fast, easy setup
- Get the recommended configuration for your project right away
- No need to figure out the technical details yourself
- Full flexibility to adjust settings later on
To use OpenLiteSpeed + Node.js on HostGator, you first need to buy a Self-Managed VPS plan. Here is how to do it:
- Open https://www.hostgator.com/vps-hosting in your browser.
- Pick the plan you want and click Choose Plan.

Important: Pricing is subject to change—please visit https://www.hostgator.com/vps-hosting for the current introductory/sign-up offer for HostGator Self-Managed VPS Hosting. For the most up-to-date renewal pricing, visit your Customer Portal Renewal Center.
- Pick a Data Center location.

- On the Cart page, you can set up your server the way you want:
- Hardware:
- Pre-selected:
You can change to a different Self-Managed VPS plan here.

- Configure:
Click Configure if you want to build your own custom package.
Note: any changes you make here will change the total price.

- Pre-selected:
- Software:
The app will be grayed out if your selected plan does not meet its minimum requirements.
- Click the Application tab.
- Choose OpenLiteSpeed + Node.js.

- In the pop-up, click Confirm.

- Hardware:
- Support & Security:
You can add Premium Support, an optional paid add-on that gives you a dedicated specialist team for server tuning and migrations, plus priority chat and phone access. The current price is shown in your cart before you complete checkout.

- AI Credits:
You can add a HostGator AI Credits package, an optional paid add-on that lets you connect your application to supported LLM providers, including Claude, GPT, Gemini, and Grok, using one API key and a single bill. Supported models may change over time. The current price is shown in your cart before you complete checkout.

- In Advanced options, you can set these up if you want:
- Extra IPs: Add more IP addresses for an extra cost. The price depends on how many you add, and the current price is shown in your cart before you complete checkout.
- Hostname: Give your server a custom name. This is optional.
- SSH Key: If you want to log in without a password, add your SSH public key here. This is optional.

- Choose a billing term, check your Order Summary, then click Continue to Checkout.

- Review your HostGator cart. Some add-ons may be included by default. Review each item, remove any you don't want, then click Continue to Checkout again.

- On the Checkout page, do the following:
If you are new to HostGator:
- Fill in your billing information and contact details. If you don't want marketing emails, uncheck the box at the bottom.

- Create a password for your account.

- Choose how you want to pay—credit card or PayPal—and enter your payment details.

If you already have an account, your HostGator login details will show up once you log in to your Customer Portal. If you are not logged in, click Log In.

- Fill in your billing information and contact details. If you don't want marketing emails, uncheck the box at the bottom.
- Review your payment method and order total. If you have a promo code, click Add Promo Code and enter your code. If you need to make changes, click Edit or Add Payment Method. When everything looks correct, click Submit Payment to complete your purchase. By clicking Submit Payment, you agree to the Auto Renewal Terms, Terms of Service, Cancellation Policy, and Privacy Notice.

After checkout, your Self-Managed VPS will begin setting up. Once it's ready, you can find it under the Hosting tab in your Customer Portal.
Opening Your OpenLiteSpeed + Node.js Dashboard
After the installation completes:
- Log in to your Customer Portal.
- From the left-hand menu, navigate to Hosting and select My Plans.

- Locate the server you want to manage, then click View Details in the bottom-left corner to expand the section and access additional server information.

- Click the Reset Password button.

- In the pop-up window, type your new root password, then click Reset Password again to confirm and save the changes.

- Connect to your VPS over SSH.
Use an SSH client with your VPS IP address and login details, then respond to the prompts by entering your root password when asked:Swapyour_server_ipfor your server's real IP address.ssh root@your_server_ip - Run this command to retrieve your password.
grep OLS_ADMIN_PASS /root/.app_passwords
- Your dashboard password appears in the output.
Sample:root@server-123456:~# grep OLS_ADMIN_PASS /root/.app_passwords OLS_ADMIN_PASS=exampleonly1ItjdBvI05SEP3m34AC - Open the WebAdmin console. In your browser, go to
http://your_server_ip:7080/, replacingyour_server_ipwith your server's IP address. (Sample:http://12.3.456.789:7080/)Important: The WebAdmin console uses an unencrypted connection, so your username and password are sent without protection. Port 7080 is also open to the internet by default. To limit access to your own IP address, run these commands:ufw allow from your_ip_address to any port 7080ufw delete allow 7080 - The dashboard login page opens.

- Enter the username
adminand the password you retrieved in step 8. - Your dashboard then loads.

More Details and Examples
Run cat /root/README.md for further details and handy commands:
Sample Output:
root@123456:~# cat /root/README.md
# OpenLiteSpeed + Node.js
## Description
OpenLiteSpeed and Node.js is a web server and runtime combination for deploying server-side JavaScript applications. OpenLiteSpeed handles traffic delivery while Node.js runs real-time, event-driven back-end logic, which suits APIs, web apps, and dynamic services.
## Image contents
* OpenLiteSpeed from the official LiteSpeed repository (`repo.litespeed.sh`)
* Node.js 22 LTS via NodeSource
* Placeholder Node.js application at `/var/www/html/nodejs/app.js`
* OLS virtual host configured to proxy all traffic -> Node.js port 3000
* `nodejs-app` systemd service to manage the Node.js process
* `openlitespeed` systemd service (depends on `nodejs-app`)
* UFW firewall: ports 22, 80, 7080 open
* Log rotation at `/etc/logrotate.d/openlitespeed-nodejs`
* Login banner at `/etc/update-motd.d/99_openlitespeed-nodejs`
* First-boot script at `/var/lib/cloud/scripts/per-instance/001_onboot`
## Services
Service | Port | Description
--------------- | ---- | -----------------------------------------------
OpenLiteSpeed | 80 | HTTP - proxies all traffic to Node.js on 3000
OLS WebAdmin | 7080 | Web-based admin console (HTTP)
nodejs-app | 3000 | Internal - proxied by OLS, not exposed directly
OpenSSH | 22 | Remote access
## First boot behavior
`/var/lib/cloud/scripts/per-instance/001_onboot` runs once on first boot:
1. Generates a 24-character random WebAdmin password.
2. Stores it in `/root/.app_passwords` (mode 600).
3. Sets the password using the official OLS `admpass.sh` tool.
4. Starts `nodejs-app` and waits for port 3000.
5. Starts `openlitespeed`.
No credentials are included in the image; a unique password is generated for each instance on first boot.
## Accessing the UI
After first boot, open in a browser:
* **Node.js app:** `http://server-ip/`
* **OLS WebAdmin:** `http://server-ip:7080/`
* Username: `admin`
* Password: run `grep OLS_ADMIN_PASS /root/.app_passwords` on the server
## HTTPS / SSL
OpenLiteSpeed includes built-in Let's Encrypt support. To enable HTTPS:
1. Open the OLS WebAdmin console at `http://server-ip:7080/`
2. Navigate to **Listeners** and add an SSL listener on port 443.
3. Under the virtual host, use the built-in **Let's Encrypt** option to
provision a certificate for your domain.
A valid domain name pointing to this server is required for Let's Encrypt.
## Deploying your Node.js application
Replace the placeholder with your own application:
```bash
# Upload your app files to /var/www/html/nodejs/
# Then restart:
systemctl restart nodejs-app
```
Your app must listen on `127.0.0.1:3000`. Use `process.env.PORT || 3000`.
## Useful commands
```bash
# Service status
systemctl status openlitespeed
systemctl status nodejs-app
# Restart services
systemctl restart nodejs-app
systemctl restart openlitespeed
# Logs
tail -100 /usr/local/lsws/logs/error.log
tail -100 /var/log/nodejs/app.log
journalctl -u openlitespeed -n 100 --no-pager
journalctl -u nodejs-app -n 100 --no-pager
# WebAdmin password
grep OLS_ADMIN_PASS /root/.app_passwords
# Reset WebAdmin password manually
/usr/local/lsws/admin/misc/admpass.sh
```
## Validation tests
```bash
perl /root/app_test/main.t
```
Runs 14 checks: services enabled and active, all config and service files
present, Node.js binary available, `admpass.sh` present, port 80 listening,
and end-to-end HTTP proxy response verified.
## Important paths
Path | Description
---- | -----------
`/usr/local/lsws/conf/httpd_config.conf` | OLS main server config
`/usr/local/lsws/conf/vhosts/nodejs/vhconf.conf` | OLS virtual host (proxy)
`/usr/local/lsws/logs/` | OLS server logs
`/usr/local/lsws/admin/conf/htpasswd` | WebAdmin credentials (hashed)
`/usr/local/lsws/admin/misc/admpass.sh` | OLS password reset tool
`/var/www/html/nodejs/app.js` | Node.js application entry point
`/var/log/nodejs/app.log` | Node.js application log
`/var/log/openlitespeed-nodejs/` | OLS service log
`/root/.app_passwords` | Plaintext WebAdmin password (mode 600)
`/etc/openlitespeed/openlitespeed.env` | OLS port/user reference file
## Links
* Manage: [OpenLiteSpeed WebAdmin](http://server-ip:7080/)
**OpenLiteSpeed**
* Home: [openlitespeed.org](https://openlitespeed.org/)
* Documentation: [docs.openlitespeed.org](https://docs.openlitespeed.org/)
* Installation guide: [Install from Repository](https://docs.openlitespeed.org/installation/repo/)
* Node.js app server setup: [App Server - Node.js](https://docs.openlitespeed.org/config/appserver/nodejs/)
* Reverse proxy configuration: [Reverse Proxy](https://docs.openlitespeed.org/config/reverseproxy/)
* Community forum: [forum.openlitespeed.org](https://forum.openlitespeed.org/)
**Node.js**
* Home: [nodejs.org](https://nodejs.org/)
* Node.js 22 LTS docs: [Previous Releases](https://nodejs.org/en/about/previous-releases)
* npm documentation: [docs.npmjs.com](https://docs.npmjs.com/)
* NodeSource distributions: [nodesource/distributions](https://github.com/nodesource/distributions)