28.6 C

How To Install Dolibarr ERP & CRM on Ubuntu 18.04

- Advertisement -
- Advertisement -

At the end of article you will be able to easily Install Dolibarr ERP & CRM on Ubuntu 18.04 LTS
Dolibarr is a modern open source ERP & CRM tool written in PHP to help you manage your organization’s activity contacts, suppliers, invoices, orders,stocks, agenda etc.
For users looking for an ERP & CRM that works for small, medium or large companies, foundations and freelancers, can choose Dolibarr as it is right tool for them.


  • Apache Web Server
  • PHP
  • MySQL or MariaDB database server

Let’s proceed towards our Installation

Step 1: Install PHP

Install PHP and its extensions by executing

sudo apt udpate 
sudo apt install -y php php-cli php-mysql php-common php-zip php-mbstring php-xmlrpc php-curl php-soap php-gd php-xml php-intl php-ldap
- Advertisement -

Configure PHP settings similar to this

sudo vi /etc/php/7.2/apache2/php.ini

Make the changes below:

date.timezone = Asia/Karachi
memory_limit = 256M
upload_max_filesize = 64M
display_errors = On
log_errors = Off

Step 2: Install MariaDB and Create Database

Click here if you don’t have Installed MariaDB.

Login to the MariaDB shell:

mysql -u root -p

Create a Database & user for Dolibarr ERP & CRM

CREATE USER 'dolibarr'@'localhost' IDENTIFIED BY 'StrongPassword';
GRANT ALL PRIVILEGES ON dolibarr.* TO 'dolibarr'@'localhost';

Confirm if you can log in to Database shell as dolibar user.

[email protected]:~$ mysql -u dolibarr -p
Enter password:
Welcome to the MariaDB monitor. Commands end with ; or \g.
Your MariaDB connection id is 58
Server version: 10.1.43-MariaDB-0ubuntu0.18.04.1 Ubuntu 18.04
Copyright (c) 2000, 2018, Oracle, MariaDB Corporation Ab and others.
Type 'help;' or '\h' for help. Type '\c' to clear the current input statement.
MariaDB [(none)]> SHOW DATABASES;
| Database |
| dolibarr |
| information_schema |
2 rows in set (0.00 sec)

Step 3: Download Dolibarr ERP & CRM on Ubuntu 18.04

Now, download the latest Dolibarr ERP & CRM version to Ubuntu 18.04

Check for the latest release on GitHub.

[email protected]:~$ wget https://github.com/Dolibarr/dolibarr/archive/develop.zip
--2019-12-29 17:06:00-- https://github.com/Dolibarr/dolibarr/archive/develop.zip
Resolving github.com (github.com)…
Connecting to github.com (github.com)||:443… connected.
HTTP request sent, awaiting response… 302 Found
Location: https://codeload.github.com/Dolibarr/dolibarr/zip/develop [following]
--2019-12-29 17:06:02-- https://codeload.github.com/Dolibarr/dolibarr/zip/develop
Resolving codeload.github.com (codeload.github.com)…
Connecting to codeload.github.com (codeload.github.com)||:443… connected.
HTTP request sent, awaiting response… 200 OK
Length: unspecified [application/zip]
Saving to: ‘develop.zip’
develop.zip [ <=> ] 61.36M 558KB/s in 57s
2019-12-29 17:07:00 (1.08 MB/s) - ‘develop.zip’ saved [64342851]

Extract the archive

unzip develop.zip

Move the resulting directory to /srv/dolibarr

sudo mv dolibarr-develop /srv/dolibarr

After all set proper permissions

sudo chown -R www-data:www-data /srv/dolibarr

Step 4: Install and Configure Apache2

Install Apache2 using

Apache2 is mostly installed if you don’t have then you can install it on Ubuntu by

sudo apt -y install apache2
sudo a2enmod rewrite

Then check the status of Apache2

[email protected]:~$ systemctl status apache2
● apache2.service - The Apache HTTP Server
Loaded: loaded (/lib/systemd/system/apache2.service; enabled; vendor preset: enabled)
Drop-In: /lib/systemd/system/apache2.service.d
Active: active (running) since Sun 2019-12-29 16:37:32 PKT; 35min ago
Main PID: 14609 (apache2)
Tasks: 7 (limit: 2302)
CGroup: /system.slice/apache2.service
├─14609 /usr/sbin/apache2 -k start
├─14633 /usr/sbin/apache2 -k start
├─14634 /usr/sbin/apache2 -k start
├─14635 /usr/sbin/apache2 -k start
├─14636 /usr/sbin/apache2 -k start
├─14637 /usr/sbin/apache2 -k start
└─25102 /usr/sbin/apache2 -k start
دسمبر 29 16:37:32 ubuntu systemd[1]: Starting The Apache HTTP Server…
دسمبر 29 16:37:32 ubuntu apachectl[14605]: AH00558: apache2: Could not reliably determine the server's fully qualified domain name, using 127.
دسمبر 29 16:37:32 ubuntu systemd[1]: Started The Apache HTTP Server.
lines 1-19/19 (END)

Then Create a Virtual Host file for vTiger

sudo vim /etc/apache2/sites-enabled/dolibarr.conf

Paste the below data into above file

<VirtualHost *:80>
ServerAdmin [email protected]
ServerName example.com
ServerAlias www.example.com
DocumentRoot /srv/dolibarr/htdocs/
<Directory /srv/dolibarr/htdocs> Options +FollowSymlinks AllowOverride All Require all granted </Directory> ErrorLog /var/log/apache2/dolibarr_error.log CustomLog /var/log/apache2/dolibarr_access.log combined

Verify the syntax

sudo apachectl -t 
Syntax OK

Then restart apache2 services.

sudo systemctl restart apache2

Finish the Installation by opening http://example.com in Browser. On first page you will be asked to choose the language.

Note: Change domain name to your own and open that in VirtualHost file.

Select the language and then choose next step.

To proceed further check all pre-requisites & then click Start to begin the Installation.

Fill DataBase Information

Database name: dolibarr
Driver type: MySQL / MariaDB
Database server: localhost
Login: dolibarr
Password: StrongPassword
Confirm settings then click Next

Then move to Next Step to save configurations & finish the Installation. Last step is to set admin logins.

Login as an admin user to Dolibarr ERP & CRM management dashboard.


Please enter your comment!
Please enter your name here

Latest article