# Installation

Concord CRM has its own web installer that will help you to perform the installation in a few steps without touching any code or modifying any files.

As Concord CRM is using Laravel, and Laravel requires the root of Concord CRM to be pointed at the /public path, in this case, the easiest way to install Concord CRM is on a subdomain that points to subdomain folder /public path.

WARNING

Make sure that you checked the requirements page before installing.

# Create Database

You can check this tutorial how to setup MySQL database in cPanel (opens new window) if you are not familiar with how to configure a database if you are not using cPanel the best is to perform few researches how to create the database via your control panel.

Login to cPanel and create a brand new database that will be used for Concord CRM installation.

  • Login to cPanel by accessing www.yourdomain.com/cpanel and navigate to MySQL Databases, note that this step may vary and in some hosting providers can be different.
  • Create a database.
  • Create user and set up the user password. (write down the username and the password because needs to be re-used later)
  • Add the user to the database by selecting the database and the username.
  • Make sure you have checked All privileges when adding the user to the database.

# Create Subdomain

You will need to create a subdomain for your installation, for example, https://crm.yourdomain.com

  • Login to cPanel.
  • Find the Subdomains section.
  • Create a subdomain, for example, crm.yourdomain.com and make sure to set the Document Root option to path public.
Create Subdomain Document Root

# Upload Files To Server & Install

In order to proceed with the web installer, you will first need to download (opens new window) the release archive files from your Concord CRM account releases page.

  • For the sake of this example, assuming that you created subdomain with name "crm" and the path is public_html/crm/ upload the files to the public_html/crm folder, then navigate to e.q. https://crm.yourdomain.com/install – Make sure to update yourdomain.com according to your domain.

  • If all server requirements passed click Next otherwise consult with your hosting provider to fix/enable them.

  • If all permissions are passed click Next to set up the application data, otherwise you need to set 755 permissions for the given folders, in cases where you are managing the server, see Permissions, User and Group.

  • Setup

    • App Url

      Concord CRM will automatically try to guess the URL where the application will be installed, in our case now from, this example, the URL is https://crm.yourdomain.com/, if the URL is wrong, please adjust it accordingly.

    • Application Name

      You can leave it as default or you can write your own application name, for example, "My CRM"

    • Hostname

      Enter database hostname, in most cases, the default hostname is localhost, however, if it's different in your case, make sure to set the correct hostname.

    • Port

      In most cases, this value will be 3306 as this port is MySQL default port, if you are not familiar with this option for your server, leave it as it is and continue to the next field, where you will need to configure the database name and user you created in the previous step.

    • Database Name

    • Database User

    • Database Password

  • Click Test Connection & Configure and if the database connection is successful you will be passed to the latest step otherwise please re-check your credentials and hostname.

  • On the next page, configure administrator user and perform the installation.

WARNING

If you did not created subdomain as explained in the previous step and you want to install Concord CRM on a subfolder it won't work, you will need to consult with your hosting provider change the root path to subfolder/public

# Nginx Config

If you are managing the server and you are already familiar with Laravel, probably you will know that for Nginx you will need to create separate configuration file so Concord CRM can be served.

The examples below are for installation on the root domain, but feel free to adjust the paths for the subdomain if you want to perform an installation on a subdomain.

server {
    listen 80;
    server_name example.com;
    root /example.com/public;

    add_header X-Frame-Options "SAMEORIGIN";
    add_header X-XSS-Protection "1; mode=block";
    add_header X-Content-Type-Options "nosniff";

    index index.html index.htm index.php;

    charset utf-8;

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

    location = /favicon.ico { access_log off; log_not_found off; }
    location = /robots.txt  { access_log off; log_not_found off; }

    error_page 404 /index.php;

    location ~ \.php$ {
        fastcgi_pass unix:/var/run/php/php7.4-fpm.sock;
        fastcgi_index index.php;
        fastcgi_param SCRIPT_FILENAME $realpath_root$fastcgi_script_name;
        include fastcgi_params;
    }

    location ~ /\.(?!well-known).* {
        deny all;
    }
}

# Permissions, User and Group

When you are managing the server, you will need to make sure that the proper permissions are applied to all files and folders and also the files and folders belong to the user and group responsible for managing the webserver, in most cases is www-data.

Keep in mind that you won't need to apply the commands below if your server is managed by your server provider, for example, shared hosting as the permissions and the group will be already configured for you.

Change all the directories to 755 (drwxr-xr-x):
find /var/www/example.com -type d -exec chmod 755 {} \;
Change all the files to 644 (-rw-r--r--):
find /var/www/example.com -type f -exec chmod 644 {} \;
Change the files and folders user and group
sudo chown www-data:www-data -R /var/www/example.com

NOTE

Don't forget to adjust the values in the example codes according to your setup.