Monica is a great open-source CRM or calls it your personal relationship management system. It is an open-source web application to organize and record your interactions with family, friends, and almost any group. Monica will help you keep track of personal events, birthdays, contacts, basic journals, notes, and more. Stay in touch with a contact by sending reminders at a given interval. For more on Monica, check its project’s GitHub page. Below is how to install Monica on Ubuntu Linux with Nginx support.
How to install Monica’s personal relation manager on Ubuntu Linux with Nginx
As mentioned above, Monica is a great open-source CRM of call it your personal relationship management system. It is an open-source web application to organize and record your interactions with family, friends, and almost organizations. Below is how to install it on Ubuntu Linux with Nginx support.
Install Nginx
Monica is a web application written in PHP. It requires a web server, and a great web server to use is Nginx. Below is how to install Nginx on Ubuntu Linux. Additional help on installing Nginx can be found at the link below. How to install Nginx on Ubuntu Linux
Install MariaDB
Monica also needs a database server to store its content. A great open-source database server to use with Monica is MariaDB. Below is how to install MariaDB on Ubuntu Linux. Additional help on installing MariaDB can be found at the link below. How to install MariaDB on Ubuntu Linux
Install PHP-FPM
As described above, Monica is an application written in PHP. The current version of Monica CRM required at least PHP v8.1 or newer. Below is how to install PHP on Ubuntu Linux. Additional help on installing PHP can be found at the link below. How to install PHP or PHP-FPM on Ubuntu Linux
Install Composer
A composer is a PHP tool that can be used to install PHP dependencies. You may need Composer to install Monica dependencies. You can install Composer via the one-line command below.
Install Node.js and Yarn
Node.js and Yarn are PHP package managers that will be used to download and compile static files for Monica CRM. Run the following command to add the Node.js Nodesource repository. After that, run the following command to add the Yarn package repository to your system. Finally, install Node.js and Yarn using the commands below. Now that all required packages to install Monica is installed, we can begin configuring Monica’s database and creating a web application portal.
Create Monica database
Let’s create a database for Monica. Run the commands below to log in to the MariaDB shell via the MySQL command below. Then create a database named monicadb. Create a database user named monicadbuser. Finally, grant all access to monicadb database to monicadbuser and create a new password. Save your changes and exit.
Install Monica
We are ready to install the Monica web app. Before we do that, let’s clone Monica’s project from GitHub. Check out the stable branch version 3.7.0. Next, copy the default configuration .env.example to .env inside the Monica directory. Then, change the file ownership to ‘www-data‘. Run the commands below to edit the .env file. Then update the highlighted lines to match your environment. Save the file and exit. Next, run the commands below to update the directory permissions, and create a new folder. After that, run the commands below to install PHP dependencies for Monica. Next, create a Yarn folder and also update its permissions to work with Nginx. Once you are done, run the commands below to complete installing and compiling Monica’s dependencies and environment. When you the last command, it should prompt you if you want to configure Monica. Type Yes to continue. When all said and done, you should see the output similar to the one below: To ensure that Monica’s application functions well, update its directory permissions so that the web server has access to manage the content within.
Configure the Nginx server block
To get the Monica portal working, we need to configure the Nginx server block and define the Monica directory to manage. Run the commands below to create a server block for Monica. Copy and paste the lines below into the file and save. After saving, run the commands below to enable the server block. Test and restart Nginx. If you don’t get any errors, you’re good to go.
Access Monitor portal
Now all that is left to do is to connect to the server hostname or domain and access the Monitor portal. You can register and begin using Monica. If you want to secure the Monica portal with SSL, you may want to install and use Let’s Encrypt free SSL. Below is how to do that with Nginx on Ubuntu Linux. How to install and use Let’s Encrypt SSL with Nginx on Ubuntu Linux That should do it! Conclusion: This post showed you how to install Monica CRM on Ubuntu Linux with Nginx. If you find any error above or have something to add, please use the comment form below.