Monica Personal Relationship Manager Installation Guide: Debian 11 - Easy Setup (2024)

Welcome to this comprehensive guide on how to install Monica Personal Relationship Manager (CRM) on Debian 11 server. Monica CRM is a powerful, free, and open-source CRM written in PHP that allows you to track personal events, activities, work information, contacts, journals, notes, and more. With its robust features like contact management, reminders, task management, journaling, and data import/export capabilities, Monica CRM is an excellent tool for organizing and managing your personal and professional relationships.

In this article, we will walk you through the step-by-step process of installing Monica CRM on a Debian 11 server. We will also guide you in setting up and configuring the LEMP Stack (Nginx, MariaDB, PHP-FPM), installing PHP dependencies via Composer, and compiling static assets using Node.js and Yarn.

Prerequisites

Before we begin, make sure you have the following prerequisites:

  1. A Debian 11 server with a non-root user that has root or administrator privileges.
  2. If you plan to deploy on production, ensure that you have a domain name pointed to your Debian server’s IP address.
  3. It is recommended to turn on the Firewall on your Debian server for production environments.

Installing Nginx Web Server

To start the installation process, we will first install the Nginx web server.

sudo apt updatesudo apt install nginx

Once the installation is complete, verify the status of the Nginx service.

sudo systemctl is-enabled nginxsudo systemctl status nginx

If everything is set up correctly, you should see that the Nginx service is enabled and running.

Installing MariaDB Server

Next, we will install the MariaDB server, which is the database management system that Monica CRM supports.

sudo apt install mariadb-server

After the installation, verify the status of the MariaDB service.

sudo systemctl is-enabled mariadbsudo systemctl status mariadb

Ensure that the MariaDB service is enabled and running.

Installing and Configuring PHP-FPM 8.1

Now it’s time to install PHP and configure PHP-FPM 8.1 on your Debian 11 server.

curl -sSL https://packages.sury.org/php/README.txt | sudo bash -xsudo apt install php8.1 php8.1-cli php8.1-fpm php8.1-common php8.1-mbstring php8.1-xml php8.1-mysql php8.1-curl php8.1-zip php8.1-intl php8.1-bcmath php8.1-gd php8.1-gmp php8.1-redis

After installing PHP 8.1, edit the PHP-FPM configuration file.

sudo nano /etc/php/8.1/fpm/php.ini

In the PHP configuration file, modify the following settings:

date.timezone = Europe/Parismax_execution_time = 130memory_limit = 256Mpost_max_size = 128Mupload_max_filesize = 128M

Save the file and restart the PHP-FPM 8.1 service.

sudo systemctl restart php8.1-fpm

Verify the status of the PHP-FPM 8.1 service.

sudo systemctl is-enabled php8.1-fpmsudo systemctl status php8.1-fpm

Installing Composer

Now, let’s install Composer, a dependency management tool for PHP that will be used to install the required PHP dependencies for Monica CRM.

curl-sS https://getcomposer.org/installer | php -- --install-dir=/usr/bin --filename=composer

Verify the installation by checking the version of Composer.

sudo -u www-data composer -v

Installing Node.js and Yarn

Next, we will install Node.js and Yarn, which are required for compiling static files in Monica CRM.

curl -fsSL https://deb.nodesource.com/setup_16.x | bash -curl -sL https://dl.yarnpkg.com/debian/pubkey.gpg | gpg --dearmor | sudo tee /usr/share/keyrings/yarnkey.gpg >/dev/nullecho "deb [signed-by=/usr/share/keyrings/yarnkey.gpg] https://dl.yarnpkg.com/debian stable main" | sudo tee /etc/apt/sources.list.d/yarn.listsudo apt updatesudo apt install nodejs yarn

Verify the installation by checking the versions of Node.js and Yarn.

node --versionyarn --version

Installing Monica CRM

Now that we have all the necessary components installed, let’s proceed with the installation of Monica CRM.

First, clone the Monica CRM repository from GitHub.

cd /var/wwwgit clone https://github.com/monicahq/monica.git

Move to the Monica CRM directory and checkout the desired version.

cd /var/www/monicagit checkout tags/v3.7.0

Copy the default configuration file and change its ownership.

cp /var/www/monica/.env.example /var/www/monica/.envsudo chown www-data:www-data/var/www/monica/.env

Edit the .env file and update the following settings:

APP_ENV=productionAPP_URL=https://YOUR_DOMAIN.comDB_CONNECTION=mysqlDB_HOST=127.0.0.1DB_PORT=3306DB_DATABASE=monicacrm_dbDB_USERNAME=monicaDB_PASSWORD=password

Change APP_URL to your domain name, and update the database details with the values you set during the MariaDB setup.

Change the ownership of the Monica CRM installation directory.

sudo chown -R www-data:www-data /var/www/monica

Install the PHP package dependencies using Composer.

sudo -u www-data composer install --no-interaction --no-dev

Create a directory for storing JavaScript packages’ cache.

sudo mkdir -p /var/www/.yarnsudo chown -R www-data:www-data /var/www/.yarn

Install JavaScript packages and generate static files.

sudo -u www-data yarn installsudo -u www-data yarn run production

Generate the application key and migrate the database.

sudo -u www-data php artisan key:generatesudo -u www-data php artisan setup:production -v

Set up a cron job for background tasks.

crontab -u www-data -e

Add the following line to the cron file:

* * * * * /usr/bin/php /var/www/monica/artisan schedule:run >> /dev/null 2>&1

Change the ownership and permissions of the Monica CRM installation directory.

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

Setting up Nginx Server Block

To access Monica CRM through a web browser, we need to set up an Nginx server block.

Create a new Nginx configuration file.

sudo nano /etc/nginx/sites-available/monicacrm

Add the following Nginx configuration to the file:

server {listen 80;server_name YOUR_DOMAIN.com;return 301 https://$host$request_uri;}server {listen 443 ssl http2;ssl_certificate /etc/letsencrypt/live/YOUR_DOMAIN.com/fullchain.pem;ssl_certificate_key /etc/letsencrypt/live/YOUR_DOMAIN.com/private.key;server_name YOUR_DOMAIN.com;root /var/www/monica/public;index index.php;location / {try_files $uri $uri/ /index.php?$args;}location ~ \.php$ {include snippets/fastcgi-php.conf;fastcgi_pass unix:/var/run/php/php8.1-fpm.sock;}}

Replace YOUR_DOMAIN.com with your actual domain name and ensure that you have valid SSL certificates.

Activate the Nginx server block and verify the configuration.

sudo ln -s /etc/nginx/sites-available/monicacrm /etc/nginx/sites-enabled/sudo nginx -t

Finally, restart the Nginx service.

sudo systemctl restart nginx

Accessing Monica CRM

You can now access Monica CRM by opening your web browser and visiting your domain name (e.g.,https://YOUR_DOMAIN.com). In the initial setup, you will be prompted to register an account for your Monica CRM installation. Enter your desired username, password, and email address, then click “Register.”

After registering, you will be redirected to the Monica CRM user dashboard, where you can start organizing your contacts, creating journals, and tracking important information about your relationships.

Conclusion

Congratulations! You have successfully installed Monica CRM on your Debian 11 server. By following this step-by-step guide, you have learned how to set up the LEMP Stack, install PHP dependencies, configure Nginx, and deploy Monica CRM. Now you can enjoy the benefits of this powerful open-source CRM and efficiently manage your personal and professional relationships.

For reliable and scalable Linux SSD VPS hosting services, consider Shape.host. Shape.host offers industry-leading cloud hosting solutions to empower your business with secure and efficient cloud infrastructure.

Tags:Debian 11 Installation and configuration Monica

Monica Personal Relationship Manager Installation Guide: Debian 11 - Easy Setup (1)

Christian Wells
Monica Personal Relationship Manager Installation Guide: Debian 11 - Easy Setup (2024)

References

Top Articles
Meijer Tenant Url
Lego Batman Minikits Locations Guide (Wii, PC, PS3, Xbox 360)
2016 Hyundai Sonata Refrigerant Capacity
Words With Friends Cheat Board Layout 11X11
Solo Player Level 2K23
Temu Beanies
Drift Boss 911
Kutty Movie Net
Strawwberrymilkkk
Swap Shop Elberton Ga
R Umineko
Oracle Holiday Calendar 2022
Spacebar Counter - Space Bar Clicker Test
Tinyzonetv.to Unblocked
Join MileSplit to get access to the latest news, films, and events!
Ingersoll Greenwood Funeral Home Obituaries
AT&T Mission | Cell Phones, Wireless Plans & Accessories | 2409 E Interstate Highway 2, Mission, TX | AT&T Store
Transform Your Backyard: Top Trends in Outdoor Kitchens for the Ultimate Entertaining - Paradise Grills
Pay Vgli
Craigslist Eugene Motorcycles
New Homes in Waterleigh | Winter Garden, FL | D.R. Horton
My Les Paul Forum
Noel Berry's Biography: Age, Height, Boyfriend, Family, Net Worth
Resident Evil Netflix Wiki
Elizabeth Nj Garbage Schedule 2022
Roxplayhouse
Watch ESPN - Stream Live Sports & ESPN Originals
How to get tink dissipator coil? - Dish De
Red Dragon Fort Mohave Az
Craigslist Cars Los Angeles
Hartford Healthcare Employee Tools
Winsipedia
Indiefoxx's biography: why has the streamer been banned so often?
Our Favorite Paper Towel Holders for Everyday Tasks
454 Cubic Inches To Litres
Dumb Money Showtimes Near Regal Dickson City
How Did Laura Get Narally Pregnant
"Lebst du noch?" Roma organisieren Hilfe für die Ukraine – DW – 05.03.2022
Psalm 136 Nkjv
600 Aviator Court Vandalia Oh 45377
Intriguing Facts About Tom Jones Star Hannah Waddingham
Justina Morley Now
Star Wars Galaxy Of Heroes Webstore
Quazii Plater Nameplates Profile - Quazii UI
Barbarian Frenzy Build with the Horde of the Ninety Savages set (Patch 2.7.7 / Season 32)
Used Cars for Sale in Phoenix, AZ (with Photos)
Priscilla 2023 Showtimes Near Regal Escondido
Lhhouston Photos
Al Horford House Brookline
Craig List El Paso Tx
Mt Sinai Walk In Clinic
Mi Game Time
Latest Posts
Article information

Author: Gregorio Kreiger

Last Updated:

Views: 6550

Rating: 4.7 / 5 (77 voted)

Reviews: 92% of readers found this page helpful

Author information

Name: Gregorio Kreiger

Birthday: 1994-12-18

Address: 89212 Tracey Ramp, Sunside, MT 08453-0951

Phone: +9014805370218

Job: Customer Designer

Hobby: Mountain biking, Orienteering, Hiking, Sewing, Backpacking, Mushroom hunting, Backpacking

Introduction: My name is Gregorio Kreiger, I am a tender, brainy, enthusiastic, combative, agreeable, gentle, gentle person who loves writing and wants to share my knowledge and understanding with you.