docker.recipes

Dolibarr ERP/CRM

beginner

Business management software suite.

Overview

Dolibarr is a comprehensive open-source ERP (Enterprise Resource Planning) and CRM (Customer Relationship Management) software suite designed for small to medium-sized businesses. Originally developed in France in 2003, Dolibarr offers a modular approach to business management, allowing organizations to activate only the features they need, from customer relationship management and invoicing to inventory control, project management, and human resources. This makes it particularly attractive for growing businesses that need flexibility without the complexity and cost of enterprise-grade solutions. This Docker stack combines Dolibarr with MariaDB to create a complete business management platform. MariaDB serves as the robust database backend, leveraging its enhanced performance features and Aria storage engine to handle Dolibarr's complex relational data structure efficiently. The combination provides excellent performance for concurrent user sessions, invoice processing, and inventory tracking while maintaining data integrity across all business modules. This configuration is ideal for businesses transitioning from spreadsheet-based management systems, organizations needing integrated CRM and accounting functionality, and companies requiring multi-user access to centralized business data. The modular nature of Dolibarr combined with MariaDB's reliability makes this stack particularly valuable for service companies, retail businesses, and consultancies that need comprehensive business management without vendor lock-in.

Key Features

  • Modular ERP system with 50+ optional modules including CRM, invoicing, inventory, HR, and project management
  • Multi-company support allowing management of multiple business entities from single installation
  • Advanced invoicing system with recurring billing, payment tracking, and multi-currency support
  • Integrated document management with automatic PDF generation for quotes, invoices, and contracts
  • Point of sale (POS) module for retail operations with barcode scanning and cash register integration
  • Project management tools with time tracking, expense reporting, and Gantt chart visualization
  • MariaDB's Aria storage engine providing crash-safe table operations and improved performance for business data
  • Built-in workflow management for purchase orders, sales processes, and approval chains

Common Use Cases

  • 1Small manufacturing companies managing inventory, suppliers, and customer orders in one system
  • 2Service-based businesses tracking client relationships, project hours, and generating professional invoices
  • 3Retail stores needing integrated POS, inventory management, and customer loyalty programs
  • 4Consulting firms managing multiple client projects with time tracking and expense reporting
  • 5Non-profit organizations tracking donors, managing events, and handling membership databases
  • 6Freelancers and small agencies requiring professional invoicing with integrated CRM capabilities
  • 7Distribution companies managing complex supplier relationships and multi-location inventory

Prerequisites

  • Minimum 2GB RAM recommended for Dolibarr with moderate usage (MariaDB requires 1GB+)
  • At least 10GB available disk space for application files and database growth
  • Port 8080 available for Dolibarr web interface access
  • Basic understanding of ERP concepts like customers, suppliers, products, and invoicing workflows
  • Knowledge of business processes to properly configure Dolibarr modules for your organization
  • Understanding of user permissions and roles for multi-user business environment setup

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 dolibarr:
3 image: dolibarr/dolibarr:latest
4 container_name: dolibarr
5 restart: unless-stopped
6 environment:
7 DOLI_DB_HOST: mariadb
8 DOLI_DB_NAME: ${DB_NAME}
9 DOLI_DB_USER: ${DB_USER}
10 DOLI_DB_PASSWORD: ${DB_PASSWORD}
11 DOLI_ADMIN_LOGIN: ${ADMIN_USER}
12 DOLI_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
13 volumes:
14 - dolibarr_docs:/var/www/documents
15 - dolibarr_custom:/var/www/html/custom
16 ports:
17 - "8080:80"
18 depends_on:
19 - mariadb
20 networks:
21 - dolibarr
22
23 mariadb:
24 image: mariadb:11
25 container_name: dolibarr-mariadb
26 environment:
27 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
28 MARIADB_DATABASE: ${DB_NAME}
29 MARIADB_USER: ${DB_USER}
30 MARIADB_PASSWORD: ${DB_PASSWORD}
31 volumes:
32 - mariadb_data:/var/lib/mysql
33 networks:
34 - dolibarr
35
36volumes:
37 dolibarr_docs:
38 dolibarr_custom:
39 mariadb_data:
40
41networks:
42 dolibarr:
43 driver: bridge

.env Template

.env
1DB_ROOT_PASSWORD=rootpassword
2DB_NAME=dolibarr
3DB_USER=dolibarr
4DB_PASSWORD=changeme
5ADMIN_USER=admin
6ADMIN_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://wiki.dolibarr.org/
  2. 2Access at http://localhost:8080 - login with ADMIN_USER/ADMIN_PASSWORD
  3. 3Enable modules in Home > Setup > Modules to activate features
  4. 4Modules: CRM, invoicing, orders, stock, HR, accounting, projects
  5. 5Custom modules in /var/www/html/custom directory
  6. 6Free and open-source - great for small/medium businesses

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

dolibarr
dolibarr:
  image: dolibarr/dolibarr:latest
  container_name: dolibarr
  restart: unless-stopped
  environment:
    DOLI_DB_HOST: mariadb
    DOLI_DB_NAME: ${DB_NAME}
    DOLI_DB_USER: ${DB_USER}
    DOLI_DB_PASSWORD: ${DB_PASSWORD}
    DOLI_ADMIN_LOGIN: ${ADMIN_USER}
    DOLI_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
  volumes:
    - dolibarr_docs:/var/www/documents
    - dolibarr_custom:/var/www/html/custom
  ports:
    - "8080:80"
  depends_on:
    - mariadb
  networks:
    - dolibarr
mariadb
mariadb:
  image: mariadb:11
  container_name: dolibarr-mariadb
  environment:
    MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
    MARIADB_DATABASE: ${DB_NAME}
    MARIADB_USER: ${DB_USER}
    MARIADB_PASSWORD: ${DB_PASSWORD}
  volumes:
    - mariadb_data:/var/lib/mysql
  networks:
    - dolibarr

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 dolibarr:
5 image: dolibarr/dolibarr:latest
6 container_name: dolibarr
7 restart: unless-stopped
8 environment:
9 DOLI_DB_HOST: mariadb
10 DOLI_DB_NAME: ${DB_NAME}
11 DOLI_DB_USER: ${DB_USER}
12 DOLI_DB_PASSWORD: ${DB_PASSWORD}
13 DOLI_ADMIN_LOGIN: ${ADMIN_USER}
14 DOLI_ADMIN_PASSWORD: ${ADMIN_PASSWORD}
15 volumes:
16 - dolibarr_docs:/var/www/documents
17 - dolibarr_custom:/var/www/html/custom
18 ports:
19 - "8080:80"
20 depends_on:
21 - mariadb
22 networks:
23 - dolibarr
24
25 mariadb:
26 image: mariadb:11
27 container_name: dolibarr-mariadb
28 environment:
29 MARIADB_ROOT_PASSWORD: ${DB_ROOT_PASSWORD}
30 MARIADB_DATABASE: ${DB_NAME}
31 MARIADB_USER: ${DB_USER}
32 MARIADB_PASSWORD: ${DB_PASSWORD}
33 volumes:
34 - mariadb_data:/var/lib/mysql
35 networks:
36 - dolibarr
37
38volumes:
39 dolibarr_docs:
40 dolibarr_custom:
41 mariadb_data:
42
43networks:
44 dolibarr:
45 driver: bridge
46EOF
47
48# 2. Create the .env file
49cat > .env << 'EOF'
50DB_ROOT_PASSWORD=rootpassword
51DB_NAME=dolibarr
52DB_USER=dolibarr
53DB_PASSWORD=changeme
54ADMIN_USER=admin
55ADMIN_PASSWORD=changeme
56EOF
57
58# 3. Start the services
59docker compose up -d
60
61# 4. View logs
62docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/dolibarr/run | bash

Troubleshooting

  • Dolibarr shows database connection error: Verify MariaDB container is running and DOLI_DB_HOST matches the MariaDB service name
  • Unable to upload documents or attachments: Check that dolibarr_docs volume has proper write permissions and sufficient disk space
  • Dolibarr modules missing after restart: Ensure dolibarr_custom volume is properly mounted and contains your custom module files
  • Invoice PDF generation fails: Verify PHP memory limits in Dolibarr configuration and check document storage volume permissions
  • MariaDB crashes during large data imports: Increase MariaDB's innodb_buffer_pool_size and max_allowed_packet settings
  • Dolibarr performance slow with many users: Enable MariaDB's thread pool and consider upgrading to MariaDB 11's improved connection handling

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space