
Introduction: What is Dolibarr ERP/CRM?
Dolibarr ERP/CRM is an open-source enterprise resource planning (ERP) and customer relationship management (CRM) software. It is designed for small and medium-sized businesses, freelancers, foundations, and non-profits. Dolibarr combines simplicity with a rich set of features, including invoicing, sales management, project management, inventory, accounting, and human resources. Unlike many ERP solutions, Dolibarr is modular, allowing users to activate only the features they need.
Its web-based nature means Dolibarr can be accessed from any device with a browser. It can be installed locally on a personal computer, on a server, or used as a cloud solution via third-party hosting providers.
In this guide, we will go step-by-step through the installation and configuration of Dolibarr.
Prerequisites
Before diving into the installation, ensure you have the following:
-
A server or local machine with Linux (Ubuntu), Windows, or macOS
-
Apache web server (or Nginx)
-
MySQL or MariaDB database
-
PHP 7.0 or higher
-
Administrative access to install packages and modify server configurations
Recommended Server Stack:
-
Linux (Ubuntu 20.04+)
-
Apache 2.4+
-
PHP 8.0+
-
MySQL 5.7+ or MariaDB 10.5+
If you are installing on Windows, you can use XAMPP or WAMP.
Step 1: Downloading Dolibarr
The latest stable version of Dolibarr can be downloaded from the official website:
Choose the appropriate version for your operating system. You can download the "standard" package if you are setting it up manually or opt for auto-installers for Windows and macOS.
Alternatively, if you want the most up-to-date development version, you can clone it via GitHub:
git clone https://github.com/Dolibarr/dolibarr.git
For production use, stick to stable releases.
Step 2: Setting Up the Environment
On Ubuntu/Linux
-
Update the system:
sudo apt update && sudo apt upgrade -y
-
Install Apache, MySQL, PHP, and required PHP modules:
sudo apt install apache2 mysql-server php php-mysql libapache2-mod-php php-cli php-gd php-curl php-intl php-mbstring php-soap php-xml php-xmlrpc php-zip php-bcmath unzip -y
-
Secure your MySQL installation:
sudo mysql_secure_installation
Follow the prompts to set a root password and remove insecure defaults.
-
Create a database for Dolibarr:
sudo mysql -u root -p
CREATE DATABASE dolibarr CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
CREATE USER 'dolibarruser'@'localhost' IDENTIFIED BY 'strongpassword';
GRANT ALL PRIVILEGES ON dolibarr.* TO 'dolibarruser'@'localhost';
FLUSH PRIVILEGES;
EXIT;
-
Move Dolibarr files to the web server directory:
sudo unzip dolibarr-*.zip -d /var/www/html/
sudo mv /var/www/html/dolibarr-*/ /var/www/html/dolibarr
sudo chown -R www-data:www-data /var/www/html/dolibarr
sudo chmod -R 755 /var/www/html/dolibarr
-
Configure Apache: Create a new virtual host configuration file:
sudo nano /etc/apache2/sites-available/dolibarr.conf
Insert the following:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/html/dolibarr/htdocs
ServerName example.com
<Directory /var/www/html/dolibarr/htdocs>
Options Indexes FollowSymLinks MultiViews
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/dolibarr_error.log
CustomLog ${APACHE_LOG_DIR}/dolibarr_access.log combined
</VirtualHost>
Activate the site and rewrite module:
sudo a2ensite dolibarr.conf
sudo a2enmod rewrite
sudo systemctl reload apache2
-
Access Dolibarr in your browser: Visit
http://your-server-ip/
orhttp://your-domain/
to start the web-based installation wizard.
On Windows (Using XAMPP)
-
Download and install XAMPP from https://www.apachefriends.org/.
-
Start Apache and MySQL from the XAMPP control panel.
-
Place the Dolibarr folder inside
C:\xampp\htdocs\
. -
Create a database using phpMyAdmin (http://localhost/phpmyadmin).
-
Navigate to
http://localhost/dolibarr/htdocs
in your browser. -
Follow the setup wizard.
On macOS (Using MAMP)
-
Install MAMP from https://www.mamp.info/.
-
Move Dolibarr files into
/Applications/MAMP/htdocs/
. -
Start MAMP servers.
-
Create the Dolibarr database via phpMyAdmin.
-
Visit
http://localhost:8888/dolibarr/htdocs
to begin installation.
Step 3: Running the Installation Wizard
The Dolibarr installation wizard is straightforward:
-
Language Selection: Choose your preferred language.
-
System Checks: The installer verifies your PHP version, required modules, and permissions. Fix any issues before proceeding.
-
Database Configuration:
-
Server:
localhost
-
Database name:
dolibarr
-
Login:
dolibarruser
-
Password:
yourpassword
-
-
Create Database Tables: Click "Next" to create necessary tables.
-
Admin Account: Set up your administrator username and password.
-
Finalize: Once finished, delete the
/install
directory from the Dolibarr files for security:
sudo rm -rf /var/www/html/dolibarr/htdocs/install
Step 4: Basic Configuration Post-Installation
Once logged into Dolibarr, start with some basic configuration.
Company Setup
Navigate to Home > Setup > Company/Organization and input:
-
Company Name
-
Address
-
Country
-
Currency
-
VAT Number (if applicable)
-
Logo upload
Enabling/Disabling Modules
Go to Home > Setup > Modules/Applications. Here, you can:
-
Activate modules like Invoices, Products, Projects, Accounting, HR, etc.
-
Deactivate any module not needed.
Each module has its own settings. Configure each one based on your business process.
User Management
-
Add users via Home > Users & Groups.
-
Assign permissions based on roles.
-
You can create groups and link permissions for easier management.
Step 5: Securing Dolibarr
Security is crucial. Follow these best practices:
-
Force HTTPS: Install SSL certificates via Let's Encrypt.
-
Strong Passwords: Enforce complex passwords for all users.
-
Regular Backups: Schedule automatic database and file backups.
-
Limit Admin Access: Only trusted personnel should have admin privileges.
-
Keep Updated: Regularly update Dolibarr to patch vulnerabilities.
Set file permissions correctly:
sudo find /var/www/html/dolibarr/ -type f -exec chmod 644 {} \;
sudo find /var/www/html/dolibarr/ -type d -exec chmod 755 {} \;
Step 6: Common Errors and How to Fix Them
White Screen on Installation
-
Check Apache error logs.
-
Usually caused by missing PHP modules.
Database Connection Issues
-
Verify credentials in the install wizard.
-
Ensure MySQL server is running.
Permission Denied Errors
-
Double-check file ownership and permissions.
-
Ensure Apache has access to Dolibarr directory.
500 Internal Server Error
-
Look at
.htaccess
issues. -
Verify PHP memory limits and timeout settings.
Step 7: Optimizing Dolibarr for Performance
-
Enable caching on Apache.
-
Optimize MySQL with appropriate buffer and cache sizes.
-
Use a content delivery network (CDN) for static assets.
-
Minimize enabled modules to only necessary ones.
-
Regularly prune old data, such as outdated invoices and logs.
Conclusion
Installing and configuring Dolibarr ERP/CRM is straightforward if you follow a structured approach. Whether you’re a freelancer needing a basic CRM or a growing company requiring a full ERP suite, Dolibarr offers flexibility without the overhead of more complex solutions.
By following this step-by-step guide, you will have a fully functional Dolibarr instance ready to support and grow your business operations.
Remember: installation is just the beginning. To get the most out of Dolibarr, spend time configuring modules properly, training users, and regularly maintaining the system.
If you plan to use Dolibarr in production, always think security first and consider professional hosting options if you do not have the expertise to maintain servers securely.