Skip to content

Installation by the script

This script automatically installs EspoCRM as a Docker image with NGINX server and MySQL database.


  1. Operating system:

    • Ubuntu
    • Debian
    • Linux Mint
  2. Access via command line.

  3. Root or sudo access.


Open your server's command line and run the commands:


Installation with SSL/TLS certificate

bash --ssl

Installation without prompts

bash -y --ssl --letsencrypt

Available options

-y or --yes

Skip confirmation prompts during installation.


Installation with SSL/TLS certificate. Ex. --ssl See installation modes.


Installation with a Let's Encrypt free certificate. Ex. --ssl --letsencrypt See installation modes.


Installation with an own SSL/TLS certificate. Ex. --ssl --owncertificate See installation modes.


Define your domain. Ex.


Email address for Let's Encrypt certificate. Ex.


Clean the existing EspoCRM installation and start a new one. This option can be used if you have already installed EspoCRM. Ex. --clean


Define your own MySQL root password instead of the automatically generated one. Ex. --mysqlRootPassword=my-password


Define your own MySQL password for EspoCRM installation. Ex. --mysqlPassword=my-password


Define a username of your EspoCRM administrator. Ex. --adminUsername=admin


Define a password of EspoCRM administrator. Ex. --adminPassword=admin-password



├── data
│   ├── espocrm
│   ├── mysql
│   └── nginx
├── docker-compose.yaml

Storage location

All data are stored at:


Installation modes

1. Let's Encrypt certificate

This certificate is a free of charge and can be used by providing an email address.

2. Own SSL/TLS certificate

If you need a high-security connection, you have to use your own SSL/TLS certificate. In this mode, EspoCRM will be installed with dummy certificates which should be replaced by real ones.

Post installation steps:

  1. Go to your server directory /var/www/espocrm/data/nginx/ssl/cert/.

  2. Replace the following certificates with your own:

    - fullchain.pem - privkey.pem

    Important! Your own certificates have to substitute the existing certificates and must have the same names.

  3. Restart nginx server:

/var/www/espocrm/ espocrm-nginx

3. HTTP mode

This mode is recommended to use only if you don't have a domain name or want to use your IP address as a domain name.

Changing installed mode

All the actions can be applied to already installed EspoCRM instance.

From HTTP to Own SSL/TLS certificate

bash --ssl --owncertificate

From HTTP to Let's Encrypt certificate

bash --ssl --letsencrypt

From Own SSL/TLS certificate to Let's Encrypt certificate

bash --ssl --letsencrypt

Manually (advanced users only)

  1. Stop your existing EspoCRM instance.
/var/www/espocrm/ stop
  1. Rename your existing directory:
mv /var/www/espocrm /var/www/espocrm-old
  1. Run the installer in the required mode, e.g. Let's Encrypt certificate mode:
bash --ssl --letsencrypt
  1. Copy your existing data to a new installation:
rm -rf /var/www/espocrm/data/espocrm
rm -rf /var/www/espocrm/data/mysql
cp -rp /var/www/espocrm-old/data/espocrm /var/www/espocrm/data
cp -rp /var/www/espocrm-old/data/mysql /var/www/espocrm/data
  1. Update your /var/www/espocrm/docker-compose.yml file. You have to copy your existing options from /var/www/espocrm-old/docker-compose.yml for the services: - espocrm-mysql - espocrm

  2. Restart services via the command:

/var/www/espocrm/ restart
  1. Login as administrator and update your new Site URL in Administration > Settings.

Server management

The operation of EspoCRM consists of several services, such as nginx, mysql, daemon.

Status of services

/var/www/espocrm/ status

Restart services

/var/www/espocrm/ restart

Start services

/var/www/espocrm/ start

Stop services

/var/www/espocrm/ stop

EspoCRM rebuild

/var/www/espocrm/ rebuild


Nginx logs


EspoCRM logs