Dolibarr is a free and open-source CRM and ERP system that can help you manage your business operations. In this tutorial, we will be installing Dolibarr onto an Ubuntu Server.
Before we begin, you will need the following:
Visit the Dolibarr website and obtain the latest version of Dolibarr.
wget https://github.com/Dolibarr/dolibarr/archive/develop.zip
Once the files are downloaded, extract them to the /var/www/ directory.
sudo unzip develop.zip -d /var/www/
Change the ownership of the Dolibarr files to www-data, the user which Apache runs as:
sudo chown -R www-data:www-data /var/www/*/
To create a database for Dolibarr, open the MySQL shell:
sudo mysql -u root -p
Create a database for Dolibarr:
CREATE DATABASE dolibarr;
Create a user with privileges to the dolibarr database:
CREATE USER 'dolibarruser'@'localhost' IDENTIFIED BY 'dolibarrpassword';
GRANT ALL PRIVILEGES ON dolibarr.* TO 'dolibarruser'@'localhost';
FLUSH PRIVILEGES;
Exit the MySQL shell:
exit
Create a virtual host for Dolibarr by creating a new Apache configuration file:
sudo nano /etc/apache2/sites-available/dolibarr.conf
Add the following content to the configuration file:
<VirtualHost *:80>
ServerAdmin admin@example.com
DocumentRoot /var/www/dolibarr-develop/htdocs
ServerName example.com
ServerAlias www.example.com
<Directory /var/www/dolibarr-develop/htdocs>
Options FollowSymLinks
AllowOverride All
Require all granted
</Directory>
ErrorLog ${APACHE_LOG_DIR}/error.log
CustomLog ${APACHE_LOG_DIR}/access.log combined
</VirtualHost>
Save and exit the file.
Disable the default site and enable the Dolibarr site:
sudo a2dissite 000-default
sudo a2ensite dolibarr.conf
Restart Apache:
sudo systemctl restart apache2
Open the Dolibarr configuration file in a text editor:
sudo nano /var/www/dolibarr-develop/htdocs/conf/conf.php
Update the lines below with the details for your MySQL/MariaDB database:
$conf->dbhost = "localhost";
$conf->dbuser = "dolibarruser";
$conf->dbpassword = "dolibarrpassword";
$conf->dbport = 3306;
$conf->dbtype = 'mysqli';
$conf->dbdefault = 'dolibarr';
Save and exit the file.
In your web browser, navigate to your server's IP address or domain name. You should see the Dolibarr installation page.
Select your language and follow the prompts to install Dolibarr.
It is important to keep your Dolibarr installation secure. Consider the following measures:
That's it. You have now installed Dolibarr on Ubuntu Server.
If you want to self-host in an easy, hands free way, need an external IP address, or simply want your data in your own hands, give IPv6.rs a try!
Alternatively, for the best virtual desktop, try Shells!