How to upgrade a Script Installation from 9.3.7 to 10?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Gomez
    Junior Member
    • Jul 2024
    • 27

    #1

    How to upgrade a Script Installation from 9.3.7 to 10?

    I've always had problems upgrading my script installation but I'm currently on version 9.3.7

    I just tried to upgrade to the latest version using

    sudo /var/www/espocrm/command.sh upgrade

    and unsurprisingly nothing updated.

    after sudo /var/www/espocrm/command.sh logs

    I see

    warning: LEGACY INSTALLATION METHOD DETECTED.
    warning: Do not mount /var/www/html directly. Instead, mount the following directories separately:
    warning: /var/www/html/custom
    warning: /var/www/html/data
    warning: /var/www/html/client/custom
    warning: No further EspoCRM upgrades will be available.
    warning: See https://docs.espocrm.com/administrat...-to-espocrm-10

    When I check that page it's all about Migration when its "Installation with Docker" and there are options for local directory or docker volumes.

    If I select "Installation by script" on the left there is nothing about migration to 10.

    Sorry if I'm being stupid but how do I upgrade to 10 from a script installation?
  • heint
    Member
    • Jun 2025
    • 92

    #2
    Greetings, Gomez

    It seems like this inconvenience during the upgrade happened because you used the "installation by script" script before v.10 of EspoCRM had been released. Users who installed Espo by script after v.10 was released are not supposed to face this problem.

    For your case it's recommended to follow the instruction from the log (migration), but I'm strongly emphasizing making a backup beforehand. All your files are located at /var/www/espocrm path.

    Comment

    • Gomez
      Junior Member
      • Jul 2024
      • 27

      #3
      Thanks for the reply heint

      Before I commit can I just check where to modify my docker-compose.yml correctly?

      In the current file (see below) the volumes: section is under espocrm-nginx: section and contains the line

      - ./data/espocrm:/var/www/html

      Do I follow the local directory instructions and change this to :-

      - ./data/espocrm/data:/var/www/espocrm/data
      - ./data/espocrm/custom:/var/www/espocrm/custom
      - ./data/espocrm/client/custom:/var/www/espocrm/cliet/custom

      And the same under espocrm: amd espocrm-daemon: and espocrm-websocket: sections?

      After I've done that do I then just run sudo /var/www/espocrm/command.sh upgrade again?

      I see there this an optional step in the instructions to remove obsolete files which appears (amongst other things) to delete command.php, which is called from command,sh - should I not do this?

      I also notice that image listed under the espocrm section is espocrm/espocrm:fpm but the instructions just show espocrm/espocrm is there any need to change that.

      I'm sorry for all the questions but I really want to get this right before I attempt it.

      current docker-compose.yml follows

      # MODE: http
      # VERSION: 2.5.1

      services:

      espocrm-db:
      image: mariadb:latest
      container_name: espocrm-db
      command: --max-allowed-packet=64MB
      restart: always
      environment:
      MARIADB_ROOT_PASSWORD: {root-passowrd}
      MARIADB_DATABASE: espocrm
      MARIADB_USER: {username}
      MARIADB_PASSWORD: {dbpassword}
      volumes:
      - ./data/mariadb/data:/var/lib/mysql
      networks:
      - espocrm-network
      healthcheck:
      test: ["CMD", "healthcheck.sh", "--connect", "--innodb_initialized"]
      interval: 20s
      start_period: 10s
      timeout: 10s
      retries: 3

      espocrm-nginx:
      image: nginx:latest
      container_name: espocrm-nginx
      environment:
      NGINX_HOST: 192.168.38.5
      volumes:
      - ./data/nginx/conf.d/:/etc/nginx/templates
      - ./data/espocrm:/var/www/html
      - ./data/nginx/espocrm.conf:/etc/nginx/espocrm.conf
      - ./data/nginx/logs:/var/log/nginx
      restart: always
      depends_on:
      - espocrm
      - espocrm-websocket
      ports:
      - "8081:80"
      networks:
      - espocrm-network

      espocrm:
      image: espocrm/espocrm:fpm
      container_name: espocrm
      environment:
      ESPOCRM_DATABASE_HOST: espocrm-db
      ESPOCRM_DATABASE_USER: {user}
      ESPOCRM_DATABASE_PASSWORD: {database-password}
      ESPOCRM_ADMIN_USERNAME: {admin-user}
      ESPOCRM_ADMIN_PASSWORD: {admin-password}
      ESPOCRM_CONFIG_SITE_URL: "http://192.168.38.5"
      restart: always
      depends_on:
      espocrm-db:
      condition: service_healthy
      volumes:
      - ./data/espocrm:/var/www/html
      networks:
      - espocrm-network


      espocrm-daemon:
      image: espocrm/espocrm:fpm
      container_name: espocrm-daemon
      volumes:
      - ./data/espocrm:/var/www/html
      restart: always
      depends_on:
      - espocrm
      entrypoint: docker-daemon.sh
      networks:
      - espocrm-network

      espocrm-websocket:
      container_name: espocrm-websocket
      image: espocrm/espocrm:fpm
      environment:
      ESPOCRM_CONFIG_USE_WEB_SOCKET: "true"
      ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBSCRIBER_DSN: "tcp://*:7777"
      ESPOCRM_CONFIG_WEB_SOCKET_ZERO_M_Q_SUBMISSION_DSN: "tcp://espocrm-websocket:7777"
      volumes:
      - ./data/espocrm:/var/www/html
      restart: always
      depends_on:
      - espocrm
      entrypoint: docker-websocket.sh
      ports:
      - "8080:8080"
      networks:
      - espocrm-network

      networks:
      espocrm-network:
      driver: bridge

      Comment

      • heint
        Member
        • Jun 2025
        • 92

        #4
        Gomez,

        In the current file (see below) the volumes: section is under espocrm-nginx: section and contains the line

        - ./data/espocrm:/var/www/html

        Do I follow the local directory instructions and change this to :-

        - ./data/espocrm/data:/var/www/espocrm/data
        - ./data/espocrm/custom:/var/www/espocrm/custom
        - ./data/espocrm/client/custom:/var/www/espocrm/cliet/custom

        And the same under espocrm: amd espocrm-daemon: and espocrm-websocket: sections?

        After I've done that do I then just run sudo /var/www/espocrm/command.sh upgrade again?
        - Yes, you should split these data sets as shown in the documentation (every section mentioned). After, you can run the upgrade command only with a backup performed!


        I see there this an optional step in the instructions to remove obsolete files which appears (amongst other things) to delete command.php, which is called from command,sh - should I not do this?​
        - Since this step is flagged as optional, you can try to skip this one.

        I also notice that image listed under the espocrm section is espocrm/espocrm:fpm but the instructions just show espocrm/espocrm is there any need to change that.
        - Install script using slightly different logic from direct Docker installation script while creating a working build (afaik), so image names like "espocrm/espocrm:fpm" are intended for your case and should not be changed.

        All questions above are reasonable, so don't worry about asking further ones. Hope everything went/ will go smoothly on your side.

        Comment

        • Gomez
          Junior Member
          • Jul 2024
          • 27

          #5
          heint

          Well I had a few false starts with a couple of typo's in docker-compose.yml but then I thought I had cracked it as /var/www/espocrm/command.sh upgrade completed, apparently with no errors.

          Alas I spoke to soon as now when I try and log in all I get is a 404 Not Found error from nginx

          Status returns

          CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
          9218c64d9292 nginx:latest "/docker-entrypoint.…" 21 minutes ago Up 18 minutes 0.0.0.0:8081->80/tcp, [::]:8081->80/tcp espocrm-nginx
          198976a9bbf8 espocrm/espocrm:fpm "docker-websocket.sh" 21 minutes ago Restarting (0) 27 seconds ago espocrm-websocket
          f02078e6cdd0 espocrm/espocrm:fpm "docker-daemon.sh" 21 minutes ago Restarting (0) 29 seconds ago espocrm-daemon
          6dd404d695f9 espocrm/espocrm:fpm "docker-entrypoint.s…" 21 minutes ago Restarting (1) 24 seconds ago espocrm
          d5a20315ee10 mariadb:latest "docker-entrypoint.s…" 21 minutes ago Up 18 minutes (healthy) 3306/tcp espocrm-db

          Logs just shows

          info: Running "install" action.

          about 20 times

          Help! I don't know where to start trying to fix this.

          Comment

          Working...