How to Install Monica CRM on Ubuntu with Nginx
Installing Monica CRM on Ubuntu with Nginx makes your personal relationship manager available through a web browser.
Monica CRM is a free, open-source program that helps you keep track of people you know, their important dates, and your interactions with them.
This guide walks you through setting up Monica CRM on Ubuntu, specifically for versions 24.04 and newer. It includes configuring Nginx, a popular web server, to make the CRM easily accessible.
By following these steps, you will have your own private web space to manage your contacts and personal information.
Install Nginx, MariaDB, and PHP-FPM using apt commands. Then, download Composer and Node.js. Create a database for Monica, download Monica from GitHub to /var/www/monica, and configure the .env file. Finally, install dependencies with composer and yarn, and run artisan commands.
Install Nginx
Install Nginx. Nginx is a fast and reliable web server required for Monica CRM to run on Ubuntu.
Start by installing Nginx, a fast and reliable web server essential for Monica CRM. Detailed steps for its setup are available in the guide titled “How to install Nginx on Ubuntu Linux.” This web server setup is crucial for Monica CRM’s correct function on your Ubuntu system. For further Nginx assistance, consult this guide.
Install MariaDB
Monica CRM stores your data in a database, and MariaDB is the recommended database choice for the CRM. Install MariaDB on Ubuntu using the sudo apt install mariadb-server command.
sudo apt update sudo apt install mariadb-server
Find additional database help here How to install MariaDB on Ubuntu Linux.
Install PHP-FPM
First, install PHP-FPM. This program helps your web server process PHP code efficiently, a requirement for Monica CRM. Detailed instructions for setting up PHP and PHP-FPM, essential for Monica CRM, are available in the guide “How to install PHP or PHP-FPM on Ubuntu Linux.”
For further assistance with PHP, consult the link "How to install PHP or PHP-FPM on Ubuntu Linux." This linked resource provides detailed instructions for setting up PHP and PHP-FPM, which are essential components for Monica CRM.
Install Composer
Next, install Composer, a vital tool for managing Monica CRM’s software packages. This step ensures all necessary components are ready for your Monica CRM installation.
Tools like Composer and those specific to Ubuntu v22+ handle the visual elements of the Monica CRM interface, ensuring you can correctly see and interact with its features.
Your Monica CRM installation on Ubuntu needs a dedicated database and user. A new database and a specific user will be created for Monica CRM’s data storage. This pairing ensures Monica CRM has a secure, separate location for all its important information.
sudo mysql -u root -p
CREATE DATABASE monicadb; CREATE USER 'monicadbuser'@'localhost'; ALTER USER 'monicadbuser'@'localhost' IDENTIFIED BY 'your_strong_password'; GRANT ALL ON monicadb.* TO 'monicadbuser'@'localhost'; FLUSH PRIVILEGES; exit
Install Monica
Finally, install Monica CRM on your Ubuntu server by downloading the latest version and configuring it. This step brings Monica CRM to your system, ready for setup.
sudo -u www-data composer install --no-interaction --no-dev sudo -u www-data yarn install sudo -u www-data yarn run production
sudo -u www-data php artisan key:generate sudo -u www-data php artisan setup:production -v
Configure Nginx
fastcgi_pass unix:/var/run/php/php8.3-fpm.sock;
Enable the site, test the configuration, and restart Nginx to apply the changes.
Access Monica Portal
Navigate to your domain in your web browser. You can now register your account and begin using your CRM. For security, consider setting up SSL using Let’s Encrypt How to install and use Let’s Encrypt SSL with Nginx on Ubuntu Linux.
[signed-by=/usr/share/keyrings/yarnkey.gpg]
Was this guide helpful?
About the Author
Richard
Tech Writer, IT Professional
Richard, a writer for Geek Rewind, is a tech enthusiast who loves breaking down complex IT topics into simple, easy-to-understand ideas. With years of hands-on experience in system administration and enterprise IT operations, he’s developed a knack for offering practical tips and solutions. Richard aims to make technology more accessible and actionable. He's deeply committed to the Geek Rewind community, always ready to answer questions and engage in discussions.
No comments yet — be the first to share your thoughts!