Strapi 3

CloudPanel v1 is obsolete

CloudPanel v1 is obsolete; check out the CloudPanel v2 Docs.

On this page, we explain step by step how to setup Strapi 3 with CloudPanel.


In the following example we will setup Strapi under the subdomain


Before we can start with the installation, we need to create an SSH User and a Domain.

When you Add the Domain, make sure to select the Strapi 3 Vhost Template.


To install Strapi do the following steps:

  1. In the first step, we need to downgrade (as root user) Node.js to version 12.x:

Open the nodesource list file:

nano /etc/apt/sources.list.d/nodesource.list


deb buster main
deb-src buster main


deb buster main
deb-src buster main
  1. Update the package sources and remove the old Node.js version:
apt update && dpkg -r --force-depends nodejs
  1. Install Node.js Version 12.x:
apt -y install nodejs
  1. Login via SSH to the server e.g. with john-ssh and go htdocs directory:
cd /home/cloudpanel/htdocs/
  1. Delete the project directory which has been created by CloudPanel:
rm -rf /home/cloudpanel/htdocs/
  1. We create the Strapi app via yarn:
yarn create strapi-app --quickstart
  1. Done! Open the admin url in your browser to create an admin user:


For the development, you can start Strapi from the commandline with a detailed output:

  1. Login via SSH to the server e.g. with john-ssh and go the project directory:
cd /home/cloudpanel/htdocs/
  1. Start Strapi via yarn:
yarn develop

Production Deployment

For running Strapi in production it's recommended to use a process control system like supervisor, which restarts the node processes automatically in case of a failure.

Setup Supervisor

  1. Got to the project directory and build Strapi with user john-ssh:
cd /home/cloudpanel/htdocs/ && NODE_ENV=production yarn build
  1. Install the supervisor package:
apt update && apt -y install supervisor
  1. Create a supervisor configuration file.
touch /etc/supervisor/conf.d/strapi-api.conf
  1. Open the configuration file and put the following content:
command=/usr/bin/yarn --cwd /home/cloudpanel/htdocs/ start

Make sure that the user is correct to avoid permission problems.

  1. Update the configuration and start the node processes :
supervisorctl reread
supervisorctl update
supervisorctl start strapi-api:*

With the command supervisorctl you get information about the status, pid, and uptime:


You may want to see what happens in the background; you can do that by tailing the log file:

tail -f /var/log/supervisor/strapi-api.log -n1000