# Self-host EspoCRM

> An open-source CRM for managing sales, support, and customer relationships end to end.

- Page: https://levelrail.com/templates/espocrm/
- JSON: https://levelrail.com/templates/espocrm.json
- Category: Applications
- Licence: AGPL-3.0-or-later (Network copyleft (AGPL) license)
- Source: https://github.com/espocrm/espocrm
- Upstream docs: https://docs.espocrm.com

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 10

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| espocrm | espocrm/espocrm | 10 | 80 | espocrm_data -> /var/www/html/data; espocrm_custom -> /var/www/html/custom |
| espocrm-db | mariadb | 12.3 | none | espocrm_db_data -> /var/lib/mysql |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| espocrm | ESPOCRM_ADMIN_PASSWORD | generated |
| espocrm | ESPOCRM_ADMIN_USERNAME | preset |
| espocrm | ESPOCRM_DATABASE_HOST | preset |
| espocrm | ESPOCRM_DATABASE_NAME | preset |
| espocrm | ESPOCRM_DATABASE_PASSWORD | generated |
| espocrm | ESPOCRM_DATABASE_PLATFORM | preset |
| espocrm | ESPOCRM_DATABASE_USER | generated |
| espocrm | ESPOCRM_SITE_URL | preset |
| espocrm-db | MARIADB_DATABASE | preset |
| espocrm-db | MARIADB_PASSWORD | generated |
| espocrm-db | MARIADB_ROOT_PASSWORD | generated |
| espocrm-db | MARIADB_USER | generated |

## Deploy

### CLI

```bash
levelrail-cli templates deploy espocrm --name my-espocrm
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/espocrm/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy EspoCRM on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list we compared does not have an entry with the same id for EspoCRM, so on Dokploy you would use a Docker Compose application with the file from this page. Dokku deploys container images with its own commands, so the pinned image espocrm/espocrm:10, mariadb:12.3 is what you deploy there.

Self-host EspoCRM, EspoCRM docker compose file, deploy EspoCRM on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
