How to Deploy EspoCRM with Email Integration
A self-hosted CRM that tracks every lead, deal, and client communication. Here is how to deploy it with email integration in 20 minutes.
EspoCRM is a lightweight, fast CRM that tracks leads, deals, accounts, and communications. It integrates with your email so every client conversation is automatically linked to the right record. Here is the complete setup.
Step 1: Create the Docker Compose File
services:
espocrm-db:
image: mariadb:10.11
container_name: espocrm-db
restart: unless-stopped
volumes:
- ./db:/var/lib/mysql
environment:
MYSQL_ROOT_PASSWORD: root_password
MYSQL_DATABASE: espocrm
MYSQL_USER: espocrm
MYSQL_PASSWORD: espocrm_password
command: --character-set-server=utf8mb4 --collation-server=utf8mb4_unicode_ci
espocrm:
image: espocrm/espocrm:latest
container_name: espocrm
restart: unless-stopped
ports:
- "127.0.0.1:8085:80"
volumes:
- ./data:/var/www/html/data
- ./custom:/var/www/html/custom
environment:
ESPOCRM_DATABASE_HOST: espocrm-db
ESPOCRM_DATABASE_USER: espocrm
ESPOCRM_DATABASE_PASSWORD: espocrm_password
ESPOCRM_DATABASE_NAME: espocrm
ESPOCRM_ADMIN_USERNAME: admin
ESPOCRM_ADMIN_PASSWORD: admin_password
ESPOCRM_SITE_URL: https://crm.yourdomain.com
depends_on:
- espocrm-dbStep 2: Configure the Reverse Proxy
Add a proxy host in Nginx Proxy Manager for crm.yourdomain.com pointing to espocrm:80. Request an SSL certificate.
Step 3: Configure Email Integration
Open EspoCRM, go to Administration, Outbound Emails. Add your SMTP server details. This enables EspoCRM to send emails on your behalf.
For inbound email, go to Administration, Inbound Emails. Configure IMAP connection to your email server. EspoCRM will scan the inbox and associate emails with existing contacts, leads, and accounts automatically based on the sender's email address.
Step 4: Set Up Group Email Accounts
Create group email accounts for different teams:
- sales@yourdomain.com linked to the Sales team
- support@yourdomain.com linked to the Support team
- info@yourdomain.com as the general inquiry inbox
Each group email account auto-creates leads or cases in EspoCRM. Sales emails become leads. Support emails become cases. General inquiries become contacts. The team gets notified and can respond directly from EspoCRM.
Step 5: Customise Your CRM
EspoCRM is highly customisable. Add custom fields to capture business-specific data. Create custom dashboards for sales pipelines, support ticket status, and marketing campaign performance. Set up automated workflows: when a lead's status changes to Qualified, create a task for the assigned salesperson to schedule a demo within 24 hours.
EspoCRM's formula language lets you write logic without code:
# When a lead status changes to Qualified:
ifThen(
status == 'Qualified',
entity\\AddLinkMultipleId('tasks', taskId)
)This automation runs server-side. No manual follow-up reminders. No forgotten leads.
If configuring email integration and custom fields sounds like work you would rather not do, VPS1 deploys EspoCRM with email, workflows, and dashboards. You get a CRM that knows your customers better than you do.
More articles
How to Deploy BTCPay Server: Accept Bitcoin Payments with Zero Platform Fees
BTCPay Server lets you accept Bitcoin and Lightning payments with no platform fees. Only standard Bitcoin network fees apply. Here is how to deploy it with Docker Compose.
Self-Hosted Crypto Payment Processors: BTCPay Server, Bitcart, and SHKeeper Compared
Accept Bitcoin and cryptocurrency payments directly with no platform fees, no intermediaries, and no KYC. Here is how BTCPay Server, Bitcart, and SHKeeper compare.
How to Deploy SHKeeper: Accept Crypto Payments with WooCommerce in 30 Minutes
SHKeeper supports Bitcoin, Ethereum, USDT, USDC, and 19+ cryptocurrencies with a free WooCommerce plugin. Zero platform fees -- only standard network fees apply.