UbuntuUbuntu Based

How To Install Dolibarr on Ubuntu 24.04 LTS

Install Dolibarr on Ubuntu 24.04

Dolibarr is an open-source ERP and CRM system widely utilized by businesses that seek a straightforward yet powerful platform to streamline operations. Its versatility lies in features that support project management, invoicing, inventory tracking, sales, human resources, and more. With Dolibarr, small and medium-sized enterprises can manage everyday tasks in a user-friendly environment without incurring hefty licensing fees.

Installing Dolibarr on Ubuntu 24.04 LTS can be accomplished through a series of carefully structured steps. This guide explores crucial system requirements, how to perform pre-installation tasks, and the entire installation process, including key configuration details. You will also learn to set up the database, configure important security features, troubleshoot common issues, and verify that your ERP/CRM software is working smoothly. The outcome of this tutorial is a high-performing Dolibarr deployment optimized on Ubuntu 24.04 LTS.

Introduction

Organizations often seek efficient and cost-effective solutions to manage their enterprise resource planning (ERP) and customer relationship management (CRM) needs seamlessly. Dolibarr ERP/CRM, developed in PHP, fits these criteria perfectly by offering a modular design, web-based interface, and comprehensive functionality. It simplifies everything from handling customer data to generating quotes, invoices, and financial reports.

When deploying Dolibarr on Ubuntu 24.04 LTS, you benefit from the operating system’s stability, security updates, and abundant community support. Throughout this guide, we cover every relevant detail. From verifying hardware prerequisites and installing necessary packages like a LAMP stack (Linux, Apache, MySQL/MariaDB, and PHP) to configuring user permissions, each step ensures a smoother process. Whether you are brand new to Linux or an experienced system administrator, following these instructions carefully will help you troubleshoot effectively and maintain an optimized ERP/CRM environment for business operations.

System Requirements

Hardware Prerequisites

Before proceeding, confirm that your hardware meets essential requirements to run Dolibarr and Ubuntu 24.04 LTS efficiently. While exact resource demands vary depending on the number of users, the following baseline is recommended:

  • Processor: A modern single-core or dual-core CPU running at 1.5 GHz or higher provides enough power. For larger deployments, opt for multiple cores.
  • RAM: A minimum of 2 GB is recommended, with 4 GB or more for improved performance if you expect concurrent users and heavier data processing.
  • Storage Space: Dolibarr itself may only require around 150 MB for program files, but consider additional space for the database (35 MB or more) and file uploads. Reserve additional storage based on the scope of your data.
  • Network Connectivity: Ensure reliable network access since Dolibarr is predominantly web-based. Adequate bandwidth is crucial for concurrent users.

Software Prerequisites

Dolibarr is built on PHP and uses MySQL or MariaDB for data storage. To ensure compatibility, verify the following software requirements:

  • Operating System: Ubuntu 24.04 LTS up-to-date with official repositories and security patches.
  • Web Server: Typically Apache or Nginx. Apache is often preferred for its ease of integration with PHP modules, but Nginx is also a viable, stable choice.
  • PHP: PHP 7.4 or higher is strongly recommended, along with core modules like mbstring, gd, curl, zip, xml, and json.
  • Database: MySQL 5.7+ or a matching version of MariaDB (10.1+). A functioning database server is mandatory for Dolibarr data storage.
  • Extra PHP Extensions: Certain features in Dolibarr require extensions like PHP SOAP or PHP LDAP. Install as needed based on your business requirements.

Pre-Installation Setup

Preparing your Ubuntu 24.04 LTS system to accept and run Dolibarr is crucial. Properly updating packages, installing the LAMP stack, and configuring your environment to ensure stable performance all contribute to a headache-free experience. Below is a systematic approach to completing these tasks before you download and install Dolibarr ERP/CRM.

System Preparation

Before adding any new packages, refresh your package lists to get the latest releases and security patches:

sudo apt update
sudo apt upgrade -y

These commands update installed packages and fix potential security vulnerabilities. After completion, it is best to reboot your system to apply new kernel or library changes if required.

Installing the LAMP Stack

Dolibarr needs a web server, a database server, and PHP. The classic choice is the LAMP stack. Perform the following commands:

sudo apt install apache2
sudo apt install mariadb-server mariadb-client
sudo apt install php php-cli php-common php-xml php-zip php-mbstring php-curl php-gd php-xmlrpc php-intl

This set of packages pulls in core components necessary for running Dolibarr. Apache is a robust web server, MariaDB is a popular MySQL-compatible database server, and PHP is the scripting environment Dolibarr relies on.

Configuring Apache and PHP

By default, Apache should start automatically once installed. You can check its status:

sudo systemctl status apache2

To ensure Apache launches upon every reboot:

sudo systemctl enable apache2

Next, review and adjust PHP settings if necessary, especially for memory limits and file upload sizes. Edit the /etc/php/*/apache2/php.ini file and modify values:

memory_limit = 256M
upload_max_filesize = 64M
post_max_size = 64M

Then restart Apache to load the new settings:

sudo systemctl restart apache2

Setting up MySQL/MariaDB

After installing MariaDB, it is recommended to run the secure installation script to remove default test databases and set a root password:

sudo mysql_secure_installation

Follow the prompts to enhance the security of your MariaDB instance. If you need to log in and confirm settings, use:

sudo mysql -u root -p

Success here indicates that you have a functional database environment ready for Dolibarr.

Installation Process

With the system prepared, the next step is obtaining the Dolibarr files, placing them in an accessible directory, and setting file permissions. This process also includes creating and configuring your database user and database name for Dolibarr.

Downloading Dolibarr

First, verify the latest version of Dolibarr from its official repository or release page. Once confirmed, download it to your server. Replace VERSION with the most recent release number:

wget https://github.com/Dolibarr/dolibarr/archive/refs/tags/VERSION.tar.gz

When the download completes, extract the files:

tar -xvf VERSION.tar.gz

Ensure you record the newly created folder’s name (for instance, dolibarr-VERSION). This is where the Dolibarr source code resides.

Directory Setup

Choose a dedicated directory for Dolibarr, commonly in /var/www/html or a custom location. For example:

sudo mkdir /var/www/html/dolibarr
sudo cp -r dolibarr-VERSION/htdocs/* /var/www/html/dolibarr

Next, set proper permissions for Apache to read and write files:

sudo chown -R www-data:www-data /var/www/html/dolibarr
sudo chmod -R 755 /var/www/html/dolibarr

These steps help ensure minimized permission-related errors during installation and runtime.

Database Configuration

Within MySQL or MariaDB, create a database and user specifically for Dolibarr. Log into MariaDB:

sudo mysql -u root -p

Once logged in, execute the following:

CREATE DATABASE dolibarrdb;
CREATE USER 'dolibarruser'@'localhost' IDENTIFIED BY 'Str0ngPassw0rd';
GRANT ALL PRIVILEGES ON dolibarrdb.* TO 'dolibarruser'@'localhost';
FLUSH PRIVILEGES;
EXIT;

Here, dolibarrdb is the dedicated database, and dolibarruser is the database user with a secure password. Adjust these names to reflect your preferred naming convention.

Post-Installation Configuration

With the Dolibarr files in place and your database ready, the final steps focus on the initial configuration wizard that establishes core settings. This is where you specify your database credentials, create the main administrator account, and tailor the environment to your needs.

Web-Based Setup

Open your web browser and navigate to the server’s IP address or domain name. For example:

http://YOUR_SERVER_IP/dolibarr

You should see the Dolibarr installation wizard. Follow these steps:

  • Language Selection: Choose your preferred interface language.
  • System Checks: Dolibarr will perform environment checks, verifying PHP extensions and directory permissions. Ensure you address any missing dependencies identified.
  • Database Connection: Specify dolibarrdb as your database name, dolibarruser as your username, and the chosen password. The host is typically localhost unless you have a remote database.

Install Dolibarr on Ubuntu 24.04

Admin Account Creation

The setup wizard will prompt you to create an administrative username and password for Dolibarr. This user enjoys full privileges within Dolibarr, allowing changes to entire modules, user management, and configuration. Always choose a secure password for improved protection against unauthorized access.

Once everything is confirmed, proceed to finalize the installation. Dolibarr automatically creates tables within the specified database. After that, you can log in to the Dolibarr dashboard using your administrator credentials.

Security Considerations

Whether you use Dolibarr solely in an internal network or in a public-facing environment, security should be a continuous priority. Ensuring that unauthorized access and configuration vulnerabilities are mitigated will help sustain a stable ERP/CRM environment.

Pay particular attention to the following areas:

  • File Permissions: Restrict write or read access to conf.php and other configuration files only to the Apache user and root as necessary. Overly lax permissions open the door to exploitation.
  • Database Security: Enforce strong passwords and unique database credentials. Avoid using the root user or a blank password. Periodically review database logs for suspicious activity.
  • Web Server Hardening: Configure virtual hosts to serve Dolibarr over HTTPS using SSL/TLS certificates. Secure any administrative portals by limiting IP ranges or utilizing password-based authentication.
  • Firewall Configuration: If possible, expose only the necessary ports (HTTP/HTTPS) to the public, keeping all other services behind a firewall or restricted to internal access.
  • Updates: Keep your Ubuntu system updated. Also, periodically check for Dolibarr releases that address security patches or new vulnerabilities.

Troubleshooting Guide

In the event you experience hiccups during installation or usage, this troubleshooting guide can help isolate and fix issues efficiently:

  • Blank Pages or PHP Errors: Run sudo tail -f /var/log/apache2/error.log to monitor errors. Missing PHP modules or permission misconfigurations are common culprits.
  • Database Connection Issues: Verify credentials in Dolibarr’s config file, double-check dolibarruser privileges, and confirm MariaDB is listening on localhost.
  • 403 or 404 Errors: Make sure that the /dolibarr directory if specified in URL is correct, and that Apache’s configuration does not block that path.
  • File Permission Problems: If certain modules or features fail, re-check the directory permission settings under /var/www/html/dolibarr and confirm they match the recommended ownership by www-data.

If regular logs are insufficient, you can increase PHP verbosity by editing php.ini and setting display_errors = On (for staging environments only). Revert later to avoid exposing sensitive info in production.

Final Configuration and Testing

After you successfully install Dolibarr, perform essential checks to verify everything works:

  • Login and Dashboard: Use your new admin credentials, ensuring the ERP environment loads without errors.
  • Module Activation: Explore available Dolibarr modules—accounting, HR, stock management, etc.—to tailor the system to your operational needs.
  • Sample Tasks and Entries: Create a test customer record, generate an invoice or quote, and confirm email configurations (if applicable).

Once satisfied, you can remove or rename /install folders if Dolibarr recommends it, preventing reinstallation prompts. At this point, your Dolibarr ERP/CRM is live and ready to use on Ubuntu 24.04 LTS.

Congratulations! You have successfully installed Dolibar. Thanks for using this tutorial for installing Dolibar on Ubuntu 24.04 LTS system. For additional help or useful information, we recommend you check the official Dolibar website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button