Ghost is a Node.js-based publishing platform that runs well on CloudPanel’s Node.js site management. Rather than a generic installation, CloudPanel handles Nginx, SSL and process management for you, so the Ghost CLI setup is scoped to the database and application layer only.
You will create a Node.js site in CloudPanel, install Ghost CLI, run the Ghost installer with MySQL credentials and configure a startup script so Ghost restarts automatically.
CloudPanel manages your Nginx configuration, SSL certificate and site user automatically when you add a Node.js site. Creating the site first gives Ghost a home directory and a dedicated system user to run under.
clpctl site:add:nodejs --domainName=www.domain.com --nodejsVersion=18 --appPort=2368 --siteUser='john-doe' --siteUserPassword='!secretPassword!'
Port 2368 is Ghost’s default application port. CloudPanel proxies public traffic through Nginx to this port.

Ghost CLI manages installation, updates and process control for Ghost. You install it globally via npm, then run the Ghost installer inside your site’s document root. The flags below tell Ghost not to configure Nginx, SSL or a Linux user, because CloudPanel already handles those.
ssh john-doe@server-ip-address
npm install ghost-cli@latest -g
ghost install --db mysql --port 2368 \
--dbhost 127.0.0.1 \
--dbuser $DATABASE_USER_NAME \
--dbpass $DATABASE_USER_PASSWORD \
--dbname $DATABASE_NAME \
--process local \
--no-setup-linux-user \
--no-setup-ssl \
--no-setup-nginx \
--dir /home/$SITE_USER/htdocs/$DOMAIN/
The --process local flag tells Ghost to manage its own process rather than using systemd. The --no-setup-* flags prevent Ghost CLI from overwriting CloudPanel’s Nginx and SSL configuration.

CloudPanel uses a startup script to launch your Node.js application. You need to create this script so Ghost starts automatically when the site user’s environment loads, and so CloudPanel can manage the process.
#!/bin/bash
export NVM_DIR="$HOME/.nvm"
[ -s "$NVM_DIR/nvm.sh" ] && \. "$NVM_DIR/nvm.sh" # This loads nvm
ghost start --dir $HOME/htdocs/ghost.moby.io/ --no-setup-linux-user > $HOME/logs/ghost.log &

ghost start --dir $HOME/htdocs/$DOMAIN/ --no-setup-linux-user
Open your domain in a browser. You should see the default Ghost homepage, confirming the installation is complete.
If Ghost fails to start, the most common causes are incorrect database credentials or a port conflict. Check the Ghost log file for error output.
$HOME/logs/ghost.log for specific error messages.2368 is not already in use by another process. See our guide on checking open ports on Linux.A 502 error means Nginx received no response from Ghost on port 2368. Ghost is either not running or listening on a different port.
ghost ls --dir $HOME/htdocs/$DOMAIN/ from your SSH session.--port value you used during installation (2368).ghost restart --dir $HOME/htdocs/$DOMAIN/.Ghost requires a specific range of Node.js versions. If Ghost CLI reports a version incompatibility, your active Node.js version may not match what Ghost supports.
node -v. Ghost currently supports Node.js 18.x LTS.You have installed Ghost on CloudPanel by creating a Node.js site, installing Ghost CLI, running the Ghost installer with MySQL and configuring a startup script. Your Ghost site is now live and managed through CloudPanel’s Nginx proxy.
To complete your setup, log in to your Ghost admin panel at https://yourdomain.com/ghost to create your first user and configure your publication settings. For related reading, see our guides on installing Node.js on Linux, managing Node.js versions with NVM and installing a free SSL certificate.
If you need a server to host Ghost, our VPS hosting plans give you the root access and Node.js support required to run CloudPanel and Ghost.
Get scalable resources with our VPS hosting with root access and optional software.
Get VPS HostingPerfect for websites and small businesses unlimited bandwidth with cPanel hosting.
Get cPanel Hosting