Skip to content

Server Configuration for EspoCRM

EspoCRM can be installed on:

  • Apache (instructions), Nginx (instructions), or IIS server
  • with PHP version 7.2 and later
  • MySQL 5.7 (and later), or MariaDB 10.1 (and later)

In this article:

Recommendations & requirements

PHP requirements

EspoCRM requires PHP 7.2 or later, with the following extensions:

  • pdo – for database access;
  • json;
  • gd – to manipulate images;
  • openssl – to ensure the highest protection;
  • zip – to be able to upgrade EspoCRM and install extensions;
  • mbstring;
  • iconv;
  • curl – for integrations;
  • xml – for excel export;
  • xmlwriter – for excel export;
  • exif – for a proper oriantion of uploaded images.

php.ini settings:

max_execution_time = 180
max_input_time = 180
memory_limit = 256M
post_max_size = 50M
upload_max_filesize = 50M

Optional php extensions that may be needed:

  • zmq – for websocket;
  • pcntl – for parallel job processing and daemon (Unix-like systems only);
  • posix – for Unix-like systems;
  • ldap – for LDAP authentication.

Database requirements

EspoCRM supports MySQL 5.7 or greater and MariaDB 10.1 or greater. These are no special peculiarities. All default settings are fine for EspoCRM.

MySQL 8 support

MySQL 8.0.4 has changed a default authentication method to caching_sha2_password which is not supported by PHP (at the time of writing). For MySQL 8 it should be changed to mysql_native_password method. For a user it can be done with the query:

CREATE USER username@localhost identified with mysql_native_password by 'password';

where username is your MySQL user, password is your MySQL user password.

Required permissions for Unix-based systems

Note: In most cases permissions are set properly after extracting EspoCRM instance from a zip package. You need only to set ownership.

Permissions

The files and directories should have the following permissions:

  • /data, /custom, /client/custom – should be writable all files, directories and subdirectories (664 for files, 775 for directories, including all subdirectories and files);
  • /application/Espo/Modules, /client/modules – should be writable the current directory (775 for the current directory, 644 for files, 755 for directories and subdirectories);
  • all other files and directories should be readable (644 for files, 755 for directories).

To set the permissions, execute these commands in the terminal:

cd <PATH-TO-ESPOCRM-DIRECTORY>
find . -type d -exec chmod 755 {} + && find . -type f -exec chmod 644 {} +;
find data custom client/custom -type d -exec chmod 775 {} + && find data custom client/custom -type f -exec chmod 664 {} +;
chmod 775 application/Espo/Modules client/modules;

Ownership

All files should be owned and group-owned by the webserver process. It can be www-data, daemon, apache, www, etc.

Note: On Bitnami Stack, files should be owned and group-owned by daemon user.

Note: On shared hosts, files should be owned and group-owned by your user account.

To set the owner and group-owner, execute these commands in the terminal:

cd <PATH-TO-ESPOCRM-DIRECTORY>
chown -R <OWNER>:<GROUP-OWNER> .;

Setting up crontab

Note: More information about jobs in EspoCRM is available here.

Unix-like systems

To setup crontab on Unix-like system, take the following steps:

1. Login as administrator into your EspoCRM instance.

2. Go to the Scheduled Jobs section in the administrator panel (Menu > Administration > Scheduled Jobs) and copy the string for the crontab. It looks like this one:

* * * * * /usr/bin/php -f /var/www/html/espocrm/cron.php > /dev/null 2>&1

3. Open a terminal and run this command:

crontab -e -u WEBSERVER_USER

WEBSERVER_USER can be one of the following “www”, “www-data”, “apache”, etc (depends on your webserver).

4. Paste the copied string (from step 2) and save the crontab file (Ctrl+O, then Ctrl+X for nano editor).

Windows

For Windows servers you can utilize Scheduled Tasks.

Configuration instructions based on your server

See also