Magento 2

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 Magento 2 with CloudPanel.


In the following example we will setup a Magento shop under the domain


The latest Magento 2 version requires Elasticsearch 7.9.

A step by step guide how to install Elasticsearch 7.9 on Debian 10 can be found on the following site:


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 Magento 2 Vhost Template and the right PHP Version.

Document Root

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


To install Magento do the following steps:

  1. Login via SSH to the server e.g. with john-ssh and go to the htdocs directory:
cd /home/cloudpanel/htdocs/
  1. Delete the project directory which has been created by CloudPanel:
rm -rf /home/cloudpanel/htdocs/
  1. Run the composer command to install the latest Magento 2 Version.

Before you run the composer command, make sure to have Magento Authentication Keys created.

php7.4 /usr/local/bin/composer create-project --repository-url= magento/project-community-edition

Enter the Username and Password (Authentication Keys) and press enter.

  1. Go to the installation directory and execute the setup::install script from Magento:
cd /home/cloudpanel/htdocs/
Edit Parameters

Edit the parameters like key, db-host, db-name and so on to your needs.

php7.4 bin/magento setup:install --backend-frontname='admin' --key='18Av6ITivOZG3gwY1DhMDWtlLfx1spLP' --session-save='files' --db-host='' --db-name='magento2' --db-user='magento2' --db-password='magento2' --base-url='' --base-url-secure='' --admin-user='admin' --admin-password='!admin123!' --admin-email='' --admin-firstname='John' --admin-lastname='Doe'
  1. Reset permissions.
cd /home/cloudpanel/htdocs/
clpctl system:permissions:reset 775
  1. Done!

You can now access the frontend and backend.

In our case the backend url would be:

Username: admin
Password: !admin123!

Admin User Password

For security reasons, make sure to NOT use the default password !admin123!.