+1 (408) 320-0380

Server Configuration for EspoCRM

EspoCRM can be installed on:

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

Configuration Recommendations for EspoCRM

PHP Requirements

EspoCRM requires PHP 7.3 or greater, with the following extensions enabled:

  • 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.

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.

php.ini settings:

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

MySQL Requirements

EspoCRM supports MySQL version 5.7 or greater.
These are no special peculiarities. All default settings are good for EspoCRM.

Required Permissions for Unix-based Systems

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;

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> .;

Setup a crontab

To setup a crontab on a UNIX system

  • 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:

32 comments on “Server Configuration for EspoCRM
  1. L1 says:

    Got error when running connection-test for MySQL about mcrypt.
    Somewhere in php.ini I added mcrytp.so as module to use, still having error:

    could not find driver

    Ubuntu14.04 64b

    What is missing??

  2. L1 says:

    Found out in the meantime:
    – had to install php5-gd and php5-mysql, and
    – a2enmod rewrite

  3. Billy Wagner says:

    You know what would have been nice. Giving Urls to all the pre reqs.

  4. Renato Frota says:

    PHP 5.3+ relies on a “.user.ini” file (with the initial dot) to custom variables, not on php.ini.

    A php.ini on the app directory will make the server’s standard php.ini not to be loaded and this will cause most of your PHP modules not to be loaded as well (mcrypt, including).

    Also, the last line looks as “max execution time” instead “max_execution_time” because of the code box styling (at least on Firefox). 1px padding on “.syntaxhighlighter code” class should resolve this.

  5. chris says:

    I’ve got the system working, but the charts only show as a x y access line no info or labels? any ideas

  6. Johannes says:

    Is there any possibility running it with PHP 5.3.29 as well?
    Because I’ve got this version provided from my provider and it works well with every other application I installed or tried, so never got this requirement before.

  7. Fn Smith says:

    Getting the error, “-bash: www-data: No such file or directory” for the command:
    chown -R : .;

  8. Panama says:

    Installation and login no problem
    If i want change or upload something i get
    the field authentication required (is not a field from Espo)
    i have again set the permissions – but allways “authentication requuired”
    Is there a solution ?

  9. Minh Hoang says:

    I can’t get pass this.

    API Error: EspoCRM API unavailable.
    Possible problems: RewriteBase required, disabled “mod_rewrite” in Apache server or .htaccess support.

    I have added the rewritebase , server already have mod_rewrite and .htaccess support.

    Don’t know what else I can do. PLease help.

  10. Алексей Доронин says:

    Столкнулся с ошибкой 403 при попытке сохранения настроек “Администрирование”, например в “Интерфейсе пользователя”. Так же подобная ошибка возникает при попытке сохранить любые настройки из “Администрирования” и при закрытии задачи.
    Работаю в EspoCRM под администратором.
    У меня не все было гладко с установкой: вот эти параметры max_execution_time = 180, max_input_time = 180 у меня были по 60. Может это вызвать такую ошибку?
    Конфигурация сервера мне не известна, использую виртуальный хостинг от спринтхоста. Пробовал менять тарифный план на более расширенный – не помогло. Переходить на VDS?

  11. Serhan says:

    Hi,
    I did successfully setup.
    Adding features works.
    During the update features “Error 404” I’m getting.
    What should I do? Where is the problem?

  12. Lo says:

    Hello,
    I managed to install the software ESpocrm . However, when I try to connect , I see nothing. Jj’ai the error message “Auth error” that appears a few seconds and then disappears . Footer , there well with the gray line © 2015 EspoCRM . Could you help me? Thanks in advance, Lo

  13. nasri says:

    comment faire la connexion entra un formulaire de contact et espocrm?

  14. John says:

    For those missing mcrypt and imap on clean ubuntu.

    sudo apt-get install mcrypt php5-mcrypt
    sudo php5enmod mcrypt
    sudo apt-get install php5-imap
    sudo php5enmod imap
    sudo service apache2 restart

  15. nhatdv says:

    I have already assign 775 permision to data folder but when i install espocrm, it notice error below:
    Permission denied for “data” directory. Please set 775 for “data” or just execute this command in the terminal

    cd /var/www/html/democrm.apecsoft.net/public_html && find data -type d -exec chmod 775 {} + && chown -R 498:498 .;

    Operation not permitted? Try this one: cd /var/www/html/democrm.apecsoft.net/public_html && find data -type d -exec sudo chmod 775 {} + && sudo chown -R 498:498 .;

    I have ran all statement above too.

    Please have me

    • Taras Machyshyn says:

      Did you set permission for all subdirectories for “data” directory? Please make sure, that your webserver user/group is “498”.

  16. Tom Hancock says:

    I am stuck on
    API Error: EspoCRM API is unavailable.

    I ran all statements to try correct it. Tried fixing my virtual host file (which i am not sure if it is correct or not).
    Have apache 2.4 installed.
    Please help.

  17. Murugappan Ramanathan says:

    I have installed version 4.8.1 and I am getting this Error 403 – Access Denied when i tried to upload the company logo and also when I tried adding the avatar. I looked into the forum and i am really tired as the solutions provided seem to be of no help for someone who is setting EspoCRM on a web hosting site.

    Can anyone really help? Otherwise i may have to resort to other CRM software.

    Thank you.

  18. Alexandre says:

    Hello,
    I try to install ESpocrm on Wampserver. When I try to connect after the last step, the error message “Auth error” appears a few seconds and then disappears with a blank page.
    Could you please help me?

    Thanks in advance,

    Alexandre

  19. Mickaël says:

    Good Evening everybody, I try to install EspoCRM 4.8.4 on my Synology NAS.
    i’m using PHPmyadmin 4.4.7 with MariaDB 5.5.47 and PHP version 5.5.33.
    When I execute EspoCRM installation, I get this error : Ajax failed:
    – Test Connexion with Base is okay
    – Set Permissions : 777 (I will modify later)
    – Set recommandations are good

    I have the same problem with EspoCRM 4.8.2.
    Could you help me please ?
    Best Regards.
    Mickaël.

    • Tom says:

      Mickaël,
      777 permission is not good. Please check apache error log and espocrm error log (espocrm-directory/data/logs/*.log).
      Please find some solutions on a forum http://forum.espocrm.com/ or create a topic with your problem.

  20. Ravi says:

    auth error after installation

    no login page

  21. auth error appear after completion of installation any solution