
Introduction
Dolibarr ERP & CRM is a powerful open-source solution that enables businesses to manage various aspects of their operations, including customer management, inventory, accounting, and invoicing. However, to ensure its smooth operation and prevent slowdowns, effective optimization is necessary.
This article details best configuration and maintenance practices to improve Dolibarr’s performance, reduce latency, and ensure better resource management.
1. Choosing the Right Infrastructure
1.1. Dedicated Server or Cloud Hosting?
Choosing the right server is crucial for Dolibarr’s performance. Shared hosting can cause slowdowns due to resource sharing, while a dedicated server or VPS (Virtual Private Server) offers more control and power.
-
Dedicated server: Ideal for large businesses requiring high performance.
-
VPS: A good balance between performance and cost.
-
Cloud hosting: Provides scalability and redundancy.
1.2. Recommended Hardware Specifications
A good Dolibarr server should include:
-
Processor: Minimum 4 cores (Intel Xeon or AMD Ryzen recommended).
-
RAM: Minimum 8 GB (16 GB recommended for intensive use).
-
Storage: NVMe SSD for fast read/write speeds.
-
Bandwidth: Stable network connection with high speed.
2. Web Server and Database Optimization
2.1. Configuring Apache/Nginx
Dolibarr primarily runs on Apache or Nginx. To improve performance, follow these recommendations:
-
Enable caching (mod_cache for Apache, FastCGI for Nginx).
-
Limit the number of simultaneous connections to avoid overload.
-
Optimize configuration files:
KeepAlive On MaxKeepAliveRequests 100 KeepAliveTimeout 5
2.2. Optimizing MySQL/MariaDB
The database is a central element of Dolibarr’s performance. Some key optimizations:
-
Increase allocated memory:
innodb_buffer_pool_size = 2G
-
Use indexes on frequently used tables.
-
Enable table compression to reduce disk space.
-
Implement regular maintenance (analyze and optimize tables).
3. Configuring Dolibarr for Better Performance
3.1. Enable Caching
Dolibarr allows caching to improve page load speed.
-
Go to Configuration > Display and enable Use browser cache.
-
Also enable caching for static files (CSS, JS).
3.2. Disable Unused Modules
Dolibarr offers many modules, but not all are necessary. Disabling unused modules reduces server load.
-
Go to Configuration > Modules and disable non-essential ones.
3.3. Optimizing Logs and Journals
Large log files can slow down Dolibarr. It is recommended to:
-
Limit log retention duration.
-
Store logs on a dedicated disk.
-
Use a log management tool like Logrotate.
4. Security and Regular Maintenance
4.1. Frequent Updates
Keeping Dolibarr updated is essential to benefit from the latest performance and security improvements.
-
System updates (Debian, Ubuntu, CentOS…)
-
Dolibarr updates via the interface or command line.
4.2. Monitoring and Performance Analysis
Using monitoring tools helps identify bottlenecks quickly:
-
Munin: Monitors system resource usage.
-
New Relic: Analyzes PHP application performance.
-
MySQLTuner: Analyzes and provides recommendations for MariaDB/MySQL.
4.3. Automating Backups
Setting up automated backups prevents data loss.
-
Database backup with a script:
mysqldump -u root -p dolibarr > /backup/dolibarr.sql
-
Dolibarr file backup with rsync:
rsync -avz /var/www/dolibarr /backup/
Conclusion
Optimizing Dolibarr relies on proper configuration, efficient resource management, and proactive maintenance. By applying these tips, you can significantly improve your installation’s performance and ensure smooth and secure operation.
Whether you are a small business, medium-sized enterprise, or large corporation, these best practices will help you get the most out of your Dolibarr ERP & CRM!