Laravel 8

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 Laravel 8 with CloudPanel.


In the following example we will setup Laravel under the domain


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

When you Add the Domain, make sure to select the Laravel 8 Vhost Template and the right PHP Version.

Document Root

Make sure to point the Document Root to the public directory.


To install Laravel do the following steps:

  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. Install via composer:
php7.4 /usr/local/bin/composer create-project --prefer-dist laravel/laravel:^8
  1. Reset permissions.
cd /home/cloudpanel/htdocs/
clpctl system:permissions:reset 775
  1. Done! You can now open your domain in your browser to see the welcome page.


Powered by Supervisor, daemons are used to keep long-running PHP scripts alive.

In case they will be terminated, Supervisor makes sure to restart them automatically.


  1. Login via SSH to the server e.g. as root user.

  2. Install supervisor

apt install -y supervisor
  1. Create a supervisor configuration file.
touch /etc/supervisor/conf.d/supervisor.conf
  1. Open the configuration file and put the following content:
command=php7.4 /home/cloudpanel/htdocs/ queue:work redis --sleep=10 --daemon --quiet --queue="default"

Make sure that the php version and the user are correct to avoid permission problems.


For consuming messages in parallel, e.g., when you are working with rabbitMQ, you may increase numprocs.

  1. Update the configuration and start the worker.
supervisorctl reread
supervisorctl update
supervisorctl start laravel-worker:*

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