Published on Oct 29 2025 in JavaScript Node.js

Deploying Strapi v5 on CloudLinux Shared Hosting Using Node.js Selector (Passenger)

We present a Strapi v5 deployment using CloudLinux Node.js Selector, which is available on DirectAdmin-, cPanel-, and Plesk-based shared hosting servers.

Node.js Selector uses Phusion Passenger to start Node.js and proxy the requests. In this guide, we will set up Strapi v5 with Node.js 20 and npm 10 at the root URL of a subdomain: strapi.budgetjava.com.

1. Create a Subdomain

Create a subdomain in the control panel (DirectAdmin in this example). Ensure SSL is issued for the subdomain (or a wildcard certificate) if using https:// URLs.

2. Create a Database

Create a MySQL database with a database user. We will use it instead of the default SQLite. Another option is PostgreSQL.

3. Configure the Node.js App

In DirectAdmin → Setup Node.js App, create a new application:

Setting Value
Node.js Version 20 or 22
Application Mode Development (for now)
Application Root domains/strapi.budgetjava.com/strapi
Application URL (leave empty)
Application Startup File server.js
Passenger Log File domains/strapi.budgetjava.com/passenger.log

The above will create:

~/domains/strapi.budgetjava.com/public_html/.htaccess

with Passenger directives, and:

~/domains/strapi.budgetjava.com/strapi/

with the app skeleton.

Node.js app setup

4. Finalize the Setup via SSH/Terminal

Enter the virtual environment and create the app:

source /home/budgetja/nodevenv/domains/strapi.budgetjava.com/strapi/20/bin/activate && cd /home/budgetja/domains/strapi.budgetjava.com/strapi
rm -rf ~/domains/strapi.budgetjava.com/strapi/* # the `npx` command requires an empty directory to work
npx create-strapi@latest .

You can interactively choose Strapi bootstrap settings. There are a few non-default selections:

You can empty the strapi folder and rerun npx on the next attempt if needed.

Why answer No to “Install dependencies with npm?” Because it would fail — we must first remove the existing node_modules.

NPX create-strapi output

Now remove existing (empty) node_modules and install dependencies:

rmdir node_modules
npm install  # it takes time
npm run build

NPM install output

Correct node_modules will be created and will point to:

~/nodevenv/domains/strapi.budgetjava.com/strapi/20/lib/node_modules

node_modules will then be populated. The last command builds the admin panel.

NPM run build output

Finally, create the startup script:

cat > server.js <<'JS'
const strapi = require('@strapi/strapi');
strapi.createStrapi(/* {...} */).start();
JS

You can now Start or Restart the app in DirectAdmin and access http://strapi.budgetjava.com/

The first access will start Node.js and the database will be populated. You can find the related output in:

~/domains/strapi.budgetjava.com/passenger.log

Admin onboarding URL will become http://strapi.budgetjava.com/admin/auth/register-admin

Strapi login page

Notes