| search |
|
|---|
EspoCRM can be installed on:
- Webserver
- PHP 8.3 - 8.5
- Database
- MySQL 8.0 and greater
- MariaDB 10.6 and greater
- PostgreSQL 15
In this article:
- Recommendations & requirements
- Required permissions for Unix-based systems
- Setting up crontab
- Configuration instructions based on your server
- See also
!!! note
Consider using our Docker [setup](docker/installation.md), which includes all the necessary dependencies.
EspoCRM requires PHP with the following extensions:
- pdo_mysql or pdo_pgsql – for database access;
- gd (with enabled FreeType support) – to manipulate images and render avatars;
- 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 orientation of uploaded images;
- bcmath – arbitrary precision mathematics;
Optional PHP extensions that could be useful:
- zmq – for WebSocket;
- pcntl – for parallel job processing and daemon (Unix-like systems only);
- posix – for Unix-like systems;
- ldap – for LDAP authentication;
- ev – for WebSocket, if a large number of connections is expected.
Recommended minimum values in php.ini:
max_execution_time = 180
max_input_time = 180
memory_limit = 256M
post_max_size = 50M
upload_max_filesize = 50M
EspoCRM supports MySQL, MariaDB and PostgreSQL. There are no special requirements – the default settings work fine for EspoCRM.
Prefer using a VPS or a dedicated server for production EspoCRM instances. Shared hosting typically imposes some limitations. Nevertheless, Espo can run on shared hosting environments quite smoothly.
!!! note
In most cases, permissions are set properly after extracting EspoCRM instance from the zip package. You may only need to set file ownership.
A simple setup.
Set files and directories to the following permissions:
data,custom,client/custom– all files, directories and subdirectories should be writable (664 for files, 775 for directories, including all subdirectories and files);bin/command– should be executable (754);- 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 754 bin/command;
The simplest setup is when all files are owned and group-owned by the web server user. It can be www-data, daemon, apache, www, etc.
!!! note
On shared hosts, files usually 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> .;
In production, static application files are typically owned by the deployment user and group-owned under the web server user (e.g. deploy-user:www-data). Writable directories should usually be both owned and group-owned by the web server user.
Example:
data/,custom/Espo/Custom/–www-data:www-data; directories:770, files:660;- everything else –
deploy-user:www-data; directories:750, files:640; bin/command–deploy-user:deploy-user;700(for running console commands);
Note that this setup implies that upgrades and extensions cannot be installed via the admin UI (should be installed via CLI).
The last 0 in the directory's octal permissions determines that other users cannot access or traverse the directory.
More information about jobs in EspoCRM is available here.
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
You might need to replace /var/www/html/espocrm/ with an actual path to your instance.
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).
See in a separate article how to set up Cron on Windows.