Install on Ubuntu 26.04 - API Error: EspoCRM API is unavailable

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • ferradeira
    Junior Member
    • Apr 2026
    • 9

    #1

    Install on Ubuntu 26.04 - API Error: EspoCRM API is unavailable

    Trying to install EspoCRM on Ubuntu 26.04
    mariadb from 11.8.6-MariaDB, client 15.2 for debian-linux-gnu (x86_64) using EditLine wrapper
    PHP 8.5.2 (cli) (built: Jan 21 2026 17:35:28) (NTS)

    During the installation I get this error:
    API Error: EspoCRM API is unavailable.

    Do only necessary steps. After each step check if the issue is solved.

    1. Enable "mod_rewrite".

    and this error in apache2 log:
    [Wed May 20 18:40:11.509071 2026] [core:notice] [pid 20493:tid 20493] AH00094: Command line: '/usr/sbin/apache2 -D FOREGROUND'
    [Wed May 20 18:41:16.006298 2026] [php:warn] [pid 20497:tid 20497] [client 10.81.0.130:44120] PHP Warning: preg_match(): Allocation of JIT memory failed, PCRE JIT will be disabled. This is likely caused by security restrictions. Either grant PHP permission to allocate executable memory, or set pcre.jit=0 in /var/www/espocrm/application/Espo/Core/Utils/System.php on line 45, referer: http://crm.logicworks.com.pt/install/
    [Wed May 20 18:41:16.343428 2026] [core:alert] [pid 20497:tid 20497] [client 10.81.0.130:44120] /var/www/espocrm/public/api/v1/.htaccess: Invalid command 'RewriteEngine', perhaps misspelled or defined by a module not included in the server configuration, referer: http://crm.logicworks.com.pt/install/

    If I enable a2enmod rewrite
    doesn't work either

    Maybe it's not prepared for Ubuntu 26 yet
  • victor
    Active Community Member
    • Aug 2022
    • 1194

    #2
    Similar issue and solution https://forum.espocrm.com/forum/inst...is-unavailable.

    Comment

    • ferradeira
      Junior Member
      • Apr 2026
      • 9

      #3
      I follow this https://docs.espocrm.com/administrat...access-support
      but did not work
      This post https://forum.espocrm.com/forum/inst...is-unavailable. refers to a folder. Don't no what they did.

      Comment

      • ferradeira
        Junior Member
        • Apr 2026
        • 9

        #4
        Ok, I found the solution from here: https://docs.espocrm.com/administrat...configuration/
        I changed:
        <Directory /var/www/espocrm/>
        Options FollowSymlinks
        AllowOverride All
        Require all granted
        </Directory>

        to:

        <Directory /var/www/espocrm/>
        Options FollowSymlinks
        AllowOverride None
        Require all granted
        </Directory>

        Comment

        • jamie
          Senior Member
          • Aug 2025
          • 318

          #5
          why don't you just do it with docker?

          php 8.5 might be a bit bleeding edge

          Comment

          • ferradeira
            Junior Member
            • Apr 2026
            • 9

            #6
            Well, I don't have much experience with Docker

            Comment


            • jamie
              jamie commented
              Editing a comment
              its a lot easier then you think here is some basic advice from chatgpt

              📦 docker-compose.yaml
              version: "3.8"

              services:
              espocrm:
              image: espocrm/espocrm:latest
              container_name: espocrm
              ports:
              - "8080:80"
              environment:
              ESPOCRM_DATABASE_HOST: db
              ESPOCRM_DATABASE_NAME: espocrm
              ESPOCRM_DATABASE_USER: espocrm
              ESPOCRM_DATABASE_PASSWORD: espocrm_password

              # Optional but commonly useful
              ESPOCRM_ADMIN_USERNAME: admin
              ESPOCRM_ADMIN_PASSWORD: admin123
              ESPOCRM_SITE_URL: http://localhost:8080
              volumes:
              - espocrm_data:/var/www/html
              depends_on:
              - db
              restart: unless-stopped

              db:
              image: mariadb:11
              container_name: espocrm_db
              environment:
              MYSQL_ROOT_PASSWORD: root_password
              MYSQL_DATABASE: espocrm
              MYSQL_USER: espocrm
              MYSQL_PASSWORD: espocrm_password
              volumes:
              - db_data:/var/lib/mysql
              restart: unless-stopped
              command: >
              --character-set-server=utf8mb4
              --collation-server=utf8mb4_unicode_ci

              volumes:
              espocrm_data:
              db_data:


              🐳 Dockerfile (optional customisation)

              Use this only if you want to extend EspoCRM (custom PHP modules, extensions, tools, etc.)

              FROM espocrm/espocrm:latest

              # Install extra PHP extensions or tools if needed
              RUN apt-get update && apt-get install -y \
              git \
              unzip \
              nano \
              && rm -rf /var/lib/apt/lists/*

              # Example: enable additional PHP config tweaks (optional)
              # COPY ./custom.ini /usr/local/etc/php/conf.d/custom.ini

              # If you have custom EspoCRM files
              # COPY ./custom /var/www/html/custom

              WORKDIR /var/www/html
              🚀 Run it
              docker compose up -d

              Then open:




              if yuri likes i'd be happy to make up some official documentation on how todo this as this is now at least the 3rd time i have posted this
          Working...