Skip to main content


On this site, you find a guide to install and configure Ghost on CloudPanel.

Creating a Node.js Site#

Via CloudPanel#

  1. Click on + Add Site and then click on Create a Node.js Site.
Add Node.js Site
  1. Enter the Domain Name, Node.js Version, and the App Port, and click on Create.
Add Ghost Site Form

Via CloudPanel CLI#

You can create a Node.js Site with the following command as root user if you like the command line.

clpctl site:add:nodejs --nodejsVersion=16 --appPort=2368 --siteUser='john-doe' --siteUserPassword='!secretPassword!'

Creating a Ghost project#

  1. Create a Database and copy the Database Name, Database User Name, Database User Password.

  2. Log in via SSH with the Site User:

ssh john-doe@server-ip-address
  1. Install the Ghost CLI:
npm install ghost-cli@latest -g
ghost install --db mysql --port 2368 \--dbhost \--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/
  1. Enter your Blog Url like
Ghost - Enter Blog Url
  1. Start Ghost by confirming with Y:
Start Ghost Dialog
  1. The installation is done. Open your site in the browser and create an admin user.
Welcome to Ghost


Ghost needs to be started after an instance reboot. We will create a script that gets executed after the reboot.

  1. Log in via SSH with the Site User:
ssh john-doe@server-ip-address
  1. Create scripts directory:
mkdir ~/scripts/ 
  1. Create a start script:
nano ~/scripts/

Modify the --dir value and save the start script:

#!/bin/bashexport NVM_DIR="$HOME/.nvm"[ -s "$NVM_DIR/" ] && \. "$NVM_DIR/"  # This loads nvmghost run --dir $HOME/htdocs/ > $HOME/logs/ghost.log &
  1. Set execution permissions:
chmod 700 ~/scripts/
  1. Edit the crontab for the site user.
crontab -e
  1. Replace SITE_USER with your site user and add the following line:
@reboot /home/$SITE_USER/scripts/ &> /dev/null
  1. Reboot and test if Ghost is running as expected.