SuiteCRM in Docker. Tutorial on how to configure your CRM system without pain

illustration of the combination of services for suitecrm in docker

This article is a complete guider of installing and configuring SuiteCRM system in Docker with tips on how to enable service web interface as a separate webpage in Apache2.

What is suitecrm?

“SuiteCRM is a completely open source enterprise-grade Customer Relationship Management (CRM) application. SuiteCRM is a software fork of the popular customer relationship management (CRM) system SugarCRM.” (

It’s a tool with a great variety of possibilities for marketing management which can help to automate and optimize every-day tasks of business development. Implemented reporting and analytics enables users to correct its strategy accordingly and customize the system to their needs. Main features of SuiteCRM:

  • Sales Force Automation: Customer contact, Task, Contract, Product and  Sales lifecycle Management
  • Marketing Automation: Lead Management, Email Marketing,  ROI Analytics, Campaign Management
  • Support: Customer Support and Analytics, Tracking System,
  • Social Network Integration
  • Reporting and Analytics
  • Customization


Why docker?

During our work, we were more than convinced by the profitability of using containers. The main reason why in this article Docker was used – its short time of deployment, ease of management and comfortable log access. But besides this, it has a lot of other advantages:

  • Deployment time – just a few seconds to launch a container saves operational costs and enables to track server load spikes.
  • Resource allocation – enables to run the same configured service instance flexibly, in a different environment.
  • The small size of container results in its ergonomic – same host may run more containers with more workload in a contradiction to VMs.
  • Development, testing and bug tracking of a service are cost-effective and not painful since deployed container will act the same while running on different servers.


Installing Docker

To start with, make sure that your host system has Docker Engine to serve containers and Docker Compose to run a multi-container application installed.

The second step is to download to your machine a docker-compose template, which is sort of config file with the list of services in containers involved to your application. You can pick a preferable solution, e.g. from here.

1. Let’s check the downloaded template docker-compose.yml. Inside one template we declare two containers – suitecrm and mariadb to serve an application. SMTP server (to send notifications from SuiteCRM) and Apache2 (to serve http-requests) we have on the system pre-installed and configured.

version: '2'

image: 'bitnami/mariadb:latest'
#Replace all credentials in <...> with your data
- MARIADB_ROOT_USER=<UsernameRoot>      
- MARIADB_PASSWORD=<PasswordDB>            
- MARIADB_DATABASE=<DBName>                
#Mount directory mariadb_data into container to get direct access to config files
- 'mariadb_data:/bitnami'               

image: 'bitnami/suitecrm:latest'
- MARIADB_HOST=mariadb
- SUITECRM_USERNAME=<UserSuite>            
- SUITECRM_PASSWORD=<PasswordSuite>        
#Forward SuiteCRM port from container to external http port
- '12281:80' 
#Mount directory ./config into container to get direct access to config files
- './config:/bitnami'                    
- mariadb

driver: local

2. Run containers. Navigate to the directory with docker-compose.yml file and run the following:

docker-compose up -d; docker-compose ps

The output of the command should be something like this:

Name                                           Command                      State       Ports
suite_mariadb_1       / /          Up        3306/tcp
suite_suitecrm_1      / /   Up>443/tcp, 80/tcp

3. Useful commands in managing containers:

#show container info like IP-address, host configs, etc.
docker inspect suiteclean_suitecrm_1

#run bash shell in  suitecrm container to login 
docker-compose exec suitecrm bash     

#list directories of services config files in the container
docker-compose exec suitecrm ls -lh /opt/bitnami   

#remove all containers in a docker-compose.yml file 
docker-compose stop; docker-compose rm -f --remove-orphans  

#run the container and follow its logs
docker-compose up -d; docker-compose logs -f



Apache2 Configuration

1. To make SuiteCRM visible to the world make sure you have apache2 mod-proxy  module installed:

sudo apt install libapache2-mod-proxy-html; sudo a2enmod proxy_http; sudo service apache2 reload

2. Go to any VirtualHost config in your apache2  server and add to it the following:

<VirtualHost *:443>



# To check your <containerIP_address> run docker inspect suiteclean_suitecrm_1 command, where suiteclean_suitecrm_1 is the name of your container

  ProxyPass /suitecrm http://<containerIP_address>:80/
  ProxyPassReverse /suitecrm http://<containerIP_address>:80/



3. Now you should be able to see SuiteCRM Web-interface  under

But by default, trailing slash (…/suitecrm/) is not added to the request end which might cause problems in the web-page loading if a user requests

To avoid such situation add to the same VirtualHost config follow rewrite rule:

<VirtualHost *:443>


RewriteEngine On
RewriteCond %{REQUEST_URI} /+[^\.]+$
RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]



4. Login to your SuiteCRM system under the link with credentials defined in suitecrm container (see docker-compose.yml).

Want to get more?

At Dexor, we offer a wide range of IT services. If you would like a custom Docker configuration for your service or need support in any of the technologies listed here here, please feel free to contact us.