Question: How can I install Monica CRM on Ubuntu 18.04 / Debian 10 Linux?. Monica is an open source web-based Personal Relationship Manager application to organize the interactions with your loved ones.

Monica CRM helps you keep track of everything that’s important about their friends and family. This application is for people who have a hard time remembering details about other people’s lives – especially the ones they care about.

In this guide, we’ll see how you can install and use Monica CRM on Ubuntu 18.04 / Debian system.

Monica PRM Principles

  • It should help have better relationships.
  • It should be simple to use, simple to contribute to, simple to understand, extremely simple to maintain.
  • It is not a social network and shall never be.
  • It is not and will never be ad-supported.
  • Users are not and will never be tracked.
  • It should be transparent.
  • It should be open-source.
  • It should do one thing (documenting social interactions) extremely well, and nothing more.
  • It should be well documented.

Features of Monica Personal Relationship Manager

The features of Monica PRM as stated on Github page are:

  • Add and manage contacts
  • Define relationships between contacts
  • Reminders
  • Auto reminders for birthdays
  • Stay in touch with a contact by sending reminders at a given interval
  • Management of debts
  • Ability to add notes to a contact
  • Ability to indicate how you’ve met someone
  • Management of activities done with a contact
  • Management of tasks
  • Management of gifts
  • Management of addresses and all the different ways to contact someone
  • Management of contact field types
  • Management of contact pets
  • Basic journal
  • Ability to indicate how the day went
  • Export and import of data
  • Export a contact as vCard
  • Ability to set custom genders
  • Ability to define custom activity types
  • Ability to favorite contacts
  • Track conversations made on social media or SMS
  • Multi-users
  • Labels to organize contacts
  • Ability to define what section should appear on the contact sheet
  • Multi-currencies
  • Multi-languages
  • An API that covers most of the data
  • We also have official mobile apps, also open source

Monical setup Requirements

  • PHP 7.1+ or newer
  • HTTP server with PHP support (eg: Apache, Nginx, Caddy)
  • Composer
  • Git
  • MySQL Database

Install Monica CRM on Ubuntu 18.04 / Debian 10 Linux

This section will cover installation of Monica PRM dependencies and deployment of the actual application on your Ubuntu 18.04 / Debian server.

Step 1: Install PHP and Composer

Start by installing PHP 7.2 on Ubuntu and compose dependency manager for PHP

sudo apt install -y git php php-intl php-json php-cli php-fpm php-mysql php-zip php-gd php-mbstring php-curl php-xml php-pear php-bcmath

When done, install composer

sudo apt -y install composer

Step 2: Install MariaDB Server

Install MariaDB using the guide:

Install MariaDB 10 on Ubuntu 18.04 and CentOS 7

Install MariaDB on Debian Linux

Once MariaDB service is running, log in with the root account to configure the database.

$ mysql -uroot -p

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

Step 3: Install Monica CRM on Ubuntu 18.04 / Debian 10 Linux

Now download Monica fro Github and configure it.

cd /srv
git clone
cd monica

Create environment variable file and modify .env variables to your specific needs.


Install all PHP packages by running:

composer install --no-interaction --no-suggest --no-dev

Generate an application key and set APP_KEY with the right value automatically.

php artisan key:generate

Run the migrations, seed the database and symlink folders:

$ php artisan setup:production
You are about to setup and configure Monica. Do you wish to continue? (yes/no) [no]:
> yes
| Welcome to Monica v2.9.0
| You can now register to the first account by opening the application:
| URL:
Setup is done. Have fun.

Finally, create the access tokens required for the API (Optional).

$ php artisan passport:install
Encryption keys generated successfully.
Personal access client created successfully.
Client ID: 1
Client Secret: DpJ3uuf67tceR2V7Jl1ljLOfv80e3kM1DfWBACs4
Password grant client created successfully.
Client ID: 2
Client Secret: kWzG5MDdOThWYgSDnCiiYZzxdasmzGiPFOijI3dK

Step 4: Configure a cron job

Monica requires some background processes to continuously run, setup a cron that runs every minute to trigger the command php artisan schedule:run.

echo "* * * * * www-data /usr/bin/php /var/www/html/monica/artisan schedule:run" | sudo tee  /etc/cron.d/monica

Step 5: Configure Apache web server

Install Apache web server by running:

sudo apt install apache2  libapache2-mod-php

Enable the rewrite module of the Apache web server:

sudo a2enmod rewrite
sudo systemctl restart apache2

Configure a new Monica Virtual Host site in apache by doing:

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

Populate the file with data:

<VirtualHost *:80>

    ServerAdmin [email protected]
    DocumentRoot /srv/monica/public

    <Directory /srv/monica/public>
        Options Indexes FollowSymLinks
        AllowOverride All
        Require all granted

    ErrorLog /var/log/apache2/monica_error.log
    CustomLog /var/log/apache2/monica_access.log combined

Set proper permissions for Web directory

sudo chown -R www-data:www-data /srv/monica
sudo chmod -R 775 /srv/monica/storage

Check apache configuration syntax then restart Apache web service

$ sudo apachectl -t
Syntax OK
$ sudo systemctl restart apache2

The final step is to access Monica web interface on You’ll be required to create admin user on first access:

monica add first user min

After clicking the Register button, you’ll get a welcome page

monica prm welcome page min

You should be ready to add your Friends and family members contacts.

monica prm add new user min

Thanks for using our guide to install Monica CRM on Ubuntu 18.04 LTS and Debian 10 (Buster) Linux. I hope this tool helps you keep in touch with old friends and have a balanced job/family time.

Similar guides:

How To Install SuiteCRM on Ubuntu 18.04 / CentOS 7 with Nginx

How To Install Odoo on Ubuntu 18.04 Linux

Install Dolibarr ERP & CRM on Ubuntu 18.04 LTS

How to Install ERPNext ERP System on Ubuntu 18.04

Your support is our everlasting motivation,
that cup of coffee is what keeps us going!

As we continue to grow, we would wish to reach and impact more people who visit and take advantage of the guides we have on our blog. This is a big task for us and we are so far extremely grateful for the kind people who have shown amazing support for our work over the time we have been online.

Thank You for your support as we work to give you the best of guides and articles. Click below to buy us a coffee.


Please enter your comment!
Please enter your name here