Before starting the installation process, make sure your domain nameservers/DNS are configured. Otherwise, you would not be able to access to the website.

Learn how to configure your domain nameservers/DNS here.

1) Download the required files.

From the LeaderOS website go to My Account > Licences page and click the download button to download the .zip file.

2) Create a new website in CloudPanel.

Go to CloudPanel > Sites > Add Site page and fill in the required information. After creating the website, you will be able to upload the files.

3) Upload the required files to CloudPanel.

Upload the downloaded .zip file to your CloudPanel by going to CloudPanel > Sites > Manage Site > File Manager > htdocs > Your Domain Folder. Delete index.php file. Drag and drop the .zip file.

4) Unzip the files.

Click to .zip file you just uploaded and right click to the file and press the “Extract” button to unzip the file. Enter ”.” to Extract Directory field to extract the files to the current directory.

4) Configure your Vhost.

Go to CloudPanel > Sites > Manage Site > Vhost page. Follow the below configuration for your Vhost.

index /apps/main/public/index.php;
location = /favicon.ico {
    rewrite ^ /apps/main/public/favicon.png last;
}

location ~* \.(ini|log|sh|sql|htaccess)$ {
    deny all;
}

location ~ "(^|/)apps/(dashboard|api|auto-install|install)(?!/public)(/?)" {
    return 403;
}

location ~ "(^|/)apps/main(?!/public|/app/views/themes/[0-9a-zA-Z-_]+/assets)(/?)" {
    return 403;
}

# Auto Installer Assets
location ~ "auto-install/assets/(.*)$" {
    try_files $uri $uri/ /apps/auto-install/public/assets/$1;
}

# Installer Assets
location ~ "install/assets/(.*)$" {
    try_files $uri $uri/ /apps/install/public/assets/$1;
}

# Dashboard Assets (cached)
location ~* ^/dashboard/assets/(.+)\.(\d+)\.(js|css|png|jpeg|jpg|webp|svg|gif|ico|mp3|mp4|json|ttf|eot|woff|woff2)$ {
    try_files /apps/dashboard/public/assets/$1.$3 =404;
}

# Dashboard Assets direct access
location ~ ^/dashboard/assets/(.+)\.(js|css|png|jpeg|jpg|webp|svg|gif|ico|mp3|mp4|json|ttf|eot|woff|woff2)$ {
    try_files $uri /apps/dashboard/public/assets/$1.$2;
}

# Images for Main
location ~ "assets/core/images/(.*)$" {
    try_files $uri $uri/ /apps/main/public/images/$1;
}

# Theme Assets (cached)
location ~* ^/assets/([0-9a-zA-Z-_]+)/(.+)\.(\d+)\.(js|css|png|jpeg|jpg|webp|svg|gif|ico|mp3|mp4|json|ttf|eot|woff|woff2)$ {
    try_files /apps/main/app/views/themes/$1/assets/$2.$4 =404;
}

# Theme Assets direct access
location ~ ^/assets/([0-9a-zA-Z-_]+)/(.+)\.(js|css|png|jpeg|jpg|webp|svg|gif|ico|mp3|mp4|json|ttf|eot|woff|woff2)$ {
    try_files /apps/main/app/views/themes/$1/assets/$2.$3 =404;
}

location /auto-install {
    try_files $uri $uri/ /apps/auto-install/public/index.php?$query_string;
}

location /install {
    try_files $uri $uri/ /apps/install/public/index.php?$query_string;
}

location /api {
    try_files $uri $uri/ /apps/api/public/index.php?$query_string;
}

location /dashboard {
    try_files $uri $uri/ /apps/dashboard/public/index.php?$query_string;
}

location / {
    try_files $uri $uri/ /apps/main/public/index.php?$query_string;
}

5) Enable IonCube Loader.

Open the php.ini on server SSH.

nano /etc/php/7.4/fpm/php.ini

Add the following line to the end of the file.

zend_extension=ioncube_loader_lin_7.4.so

Then restart the PHP service.

systemctl restart php7.4-fpm

6) Visit your website.

Once you visit your website, it will direct you to the setup page for LeaderOS. Follow the guide to finish the setup.

7) Enter your database credentials.

If you already have a database server, then you can setup your website to that database. However, we will be showing you how to create a local database in Plesk in this article.

MySQL Host: This is the IP address for your database server. Use localhost for localised databases.

MySQL Port: This is usually by default 3306. If it is different then use that port for this.

7.1) Create a database in Plesk.

Go to CloudPanel > Sites > Manage Site > Databases > Add Database page. After creating the database, enter its credentials on the setup page.

8) Configure the basic site options.

Basic information such as server name. IP address, server version, etc.

9) Create an Admin account.

Create an admin account to customise your website after the setup.

10) Login to Dashboard.

Your website is now set up! Now you can start using your website. Check our other articles to learn how to add new products, setup payment gateways and more.