How to Secure Your Dolibarr: A Beginner's Guide
   02/22/2025 00:00:00     Dolibarr    0 Comments
How to Secure Your Dolibarr: A Beginner's Guide

Introduction

Dolibarr is a widely used open-source ERP & CRM for business management. Its flexibility and scalability make it an ideal choice for small and medium-sized enterprises (SMEs). However, like any web application, Dolibarr is vulnerable to cyberattacks and misconfigurations that could compromise data security.

In this guide, we will explore the best practices to secure your Dolibarr, protect your information, and ensure system stability.


1. Securing Dolibarr Installation and Configuration

1.1. Install Dolibarr on a Secure Server

When installing Dolibarr, make sure to use a secure server:

  • Prefer hosting with strong security protocols.

  • Use a server that receives regular updates.

  • Enable firewalls and IP filters to restrict unauthorized access.

1.2. Restrict Access to Sensitive Files

Certain parts of Dolibarr contain critical files for the system's proper functioning. It is essential to restrict access to these files:

  • config.php: This file contains database connection details. Ensure it is read-only.

  • Sensitive directories: Limit access by modifying permissions to chmod 600 for critical files and chmod 700 for sensitive directories.


2. Securing User Access

2.1. Create User Accounts with Specific Roles

  • Do not grant administrator rights to all users.

  • Assign specific permissions based on user needs (accounting, sales management, HR, etc.).

2.2. Enable Strong Authentication

  • Use complex passwords (minimum length of 12 characters, mix of letters, numbers, and special characters).

  • Enable two-factor authentication (2FA) if possible.

2.3. Limit Login Attempts

  • Configure an automatic lockout system after multiple failed attempts.

  • Enable login logs to detect any suspicious activity.


3. Protecting the Database

3.1. Secure Database Access

  • Do not allow unsecured external connections.

  • Assign limited permissions to database users.

  • Use a strong password for the MySQL user.

3.2. Regularly Backup Data

Perform regular backups to prevent data loss:

  • Automated database backups.

  • Store backups on a remote server.

  • Test and verify data restoration procedures.


4. Securing Server and Web Interface Access

4.1. Implement an SSL Certificate

  • Enable HTTPS on your server to encrypt data exchanges.

  • Install a valid SSL/TLS certificate (Let’s Encrypt, Cloudflare, or another provider).

4.2. Restrict Access by IP Address

  • Restrict admin interface access only to authorized IP addresses.

  • Configure a firewall to limit exposure of sensitive ports.

4.3. Secure the .htaccess File

Add the following lines to .htaccess to block unauthorized access:

<Files config.php>
Order deny,allow
Deny from all
</Files>

This prevents access to the critical configuration file.


5. Keeping Dolibarr Up to Date

5.1. Perform Regular Updates

  • Keep Dolibarr up to date to benefit from the latest security patches.

  • Regularly check for updates on the official Dolibarr website.

5.2. Update Extensions and Modules

  • Remove obsolete or unused modules.

  • Download modules only from official and trusted sources.

5.3. Secure Plugins and External APIs

  • Avoid unverified third-party modules.

  • Review the permissions of APIs connected to Dolibarr.

  • Restrict access to API keys based on specific needs.


6. Monitoring and Incident Response

6.1. Enable Logs and Monitoring

  • Activate logging for login attempts and critical changes.

  • Set up an alert system for suspicious access.

6.2. Regularly Audit Security

  • Analyze your setup with vulnerability scanning tools.

  • Perform penetration testing to detect security flaws.

6.3. Establish an Incident Response Plan

  • Prepare a plan in case of an attack or security breach.

  • Designate a responsible team for incident management.


Conclusion

Securing your Dolibarr is a crucial step to protect your data and ensure system reliability. By applying these best practices—secure configuration, access management, database protection, regular updates, and monitoring—you will significantly reduce the risks associated with cyberattacks and human errors.

Security is an ongoing process. It is essential to adopt a proactive strategy and regularly assess your Dolibarr setup to maintain optimal protection.

Take the right steps today to secure your Dolibarr and ensure your business’s continuity!

Comments

Log in or register to post comments