docker.recipes

Monica Personal CRM

intermediate

Personal relationship management system.

Overview

Monica is an open-source personal relationship management (PRM) system designed to help individuals maintain meaningful connections with friends, family, and professional contacts. Launched in 2017 by Régis Freyd, Monica addresses the modern challenge of remembering personal details, important dates, and conversation history across an expanding network of relationships. Unlike traditional CRMs focused on sales and business processes, Monica emphasizes personal relationship nurturing through features like contact journaling, gift tracking, activity logging, and automatic reminder systems. This deployment combines Monica's PHP-based application with MariaDB to create a robust personal relationship management platform. MariaDB serves as the data backbone, storing contact information, relationship mappings, conversation histories, and reminder schedules, while providing the performance and reliability needed for complex relationship queries and data integrity. The enhanced storage engines and JSON capabilities of MariaDB particularly benefit Monica's flexible contact attribute system and activity tracking features. This stack appeals to professionals managing extensive personal networks, individuals seeking to improve their relationship maintenance habits, and families wanting to coordinate contact management across multiple members. The combination provides enterprise-grade data persistence for personal relationship data while maintaining the simplicity and privacy of self-hosted deployment, making it ideal for users who value data ownership and relationship privacy.

Key Features

  • Contact relationship mapping with family trees, friendships, and professional connections
  • Conversation logging and history tracking with searchable notes and context
  • Automated reminder system for birthdays, anniversaries, and follow-up activities
  • Gift idea tracking and purchase history linked to specific contacts
  • Activity and event logging with date tracking and photo attachments
  • Journal integration for recording personal thoughts about relationships
  • Debt and loan tracking between contacts with payment history
  • vCard and CSV contact import with relationship preservation

Common Use Cases

  • 1Sales professionals maintaining personal connections separate from business CRM systems
  • 2Consultants and freelancers managing client relationships and personal networking
  • 3Busy professionals tracking family events, birthdays, and personal obligations
  • 4Individuals with ADHD or memory challenges needing relationship management support
  • 5Families coordinating shared contact information and relationship histories
  • 6Community leaders managing relationships with constituents and volunteers
  • 7Therapists and counselors organizing personal professional relationship notes

Prerequisites

  • Minimum 1GB RAM for MariaDB database operations and contact relationship queries
  • Docker and Docker Compose installed with container orchestration capabilities
  • Port 8080 available for Monica web interface access
  • Understanding of PHP application key generation for Monica security
  • Basic knowledge of environment variable configuration for database credentials
  • Familiarity with MariaDB administration for backup and maintenance tasks

For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms

docker-compose.yml

docker-compose.yml
1services:
2 monica:
3 image: monica:latest
4 container_name: monica
5 restart: unless-stopped
6 environment:
7 APP_KEY: ${APP_KEY}
8 DB_HOST: db
9 DB_DATABASE: monica
10 DB_USERNAME: monica
11 DB_PASSWORD: ${DB_PASSWORD}
12 APP_URL: http://localhost:8080
13 ports:
14 - "8080:80"
15 volumes:
16 - monica_data:/var/www/html/storage
17 depends_on:
18 - db
19
20 db:
21 image: mariadb:10
22 container_name: monica-db
23 restart: unless-stopped
24 environment:
25 MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
26 MYSQL_DATABASE: monica
27 MYSQL_USER: monica
28 MYSQL_PASSWORD: ${DB_PASSWORD}
29 volumes:
30 - monica_db:/var/lib/mysql
31
32volumes:
33 monica_data:
34 monica_db:

.env Template

.env
1APP_KEY=base64:generate-32-char-key
2DB_PASSWORD=changeme

Usage Notes

  1. 1Docs: https://www.monicahq.com/docs/
  2. 2Access at http://localhost:8080 - register to create account
  3. 3Generate APP_KEY: php artisan key:generate --show
  4. 4Track contacts, activities, conversations, reminders
  5. 5Journal, debt tracking, gift ideas features
  6. 6Import contacts from vCard, CSV, or other sources

Individual Services(2 services)

Copy individual services to mix and match with your existing compose files.

monica
monica:
  image: monica:latest
  container_name: monica
  restart: unless-stopped
  environment:
    APP_KEY: ${APP_KEY}
    DB_HOST: db
    DB_DATABASE: monica
    DB_USERNAME: monica
    DB_PASSWORD: ${DB_PASSWORD}
    APP_URL: http://localhost:8080
  ports:
    - "8080:80"
  volumes:
    - monica_data:/var/www/html/storage
  depends_on:
    - db
db
db:
  image: mariadb:10
  container_name: monica-db
  restart: unless-stopped
  environment:
    MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
    MYSQL_DATABASE: monica
    MYSQL_USER: monica
    MYSQL_PASSWORD: ${DB_PASSWORD}
  volumes:
    - monica_db:/var/lib/mysql

Quick Start

terminal
1# 1. Create the compose file
2cat > docker-compose.yml << 'EOF'
3services:
4 monica:
5 image: monica:latest
6 container_name: monica
7 restart: unless-stopped
8 environment:
9 APP_KEY: ${APP_KEY}
10 DB_HOST: db
11 DB_DATABASE: monica
12 DB_USERNAME: monica
13 DB_PASSWORD: ${DB_PASSWORD}
14 APP_URL: http://localhost:8080
15 ports:
16 - "8080:80"
17 volumes:
18 - monica_data:/var/www/html/storage
19 depends_on:
20 - db
21
22 db:
23 image: mariadb:10
24 container_name: monica-db
25 restart: unless-stopped
26 environment:
27 MYSQL_ROOT_PASSWORD: ${DB_PASSWORD}
28 MYSQL_DATABASE: monica
29 MYSQL_USER: monica
30 MYSQL_PASSWORD: ${DB_PASSWORD}
31 volumes:
32 - monica_db:/var/lib/mysql
33
34volumes:
35 monica_data:
36 monica_db:
37EOF
38
39# 2. Create the .env file
40cat > .env << 'EOF'
41APP_KEY=base64:generate-32-char-key
42DB_PASSWORD=changeme
43EOF
44
45# 3. Start the services
46docker compose up -d
47
48# 4. View logs
49docker compose logs -f

One-Liner

Run this command to download and set up the recipe in one step:

terminal
1curl -fsSL https://docker.recipes/api/recipes/monica-crm/run | bash

Troubleshooting

  • Application Error - No encryption key: Generate APP_KEY using 'php artisan key:generate --show' and add to environment variables
  • Database connection refused: Verify MariaDB container is running and DB_HOST points to 'db' service name
  • Monica shows blank page after login: Check storage volume permissions and ensure monica_data volume is properly mounted
  • Import contacts failing: Verify CSV format matches Monica expectations and file encoding is UTF-8
  • Performance issues with large contact lists: Increase MariaDB memory allocation and enable query cache optimization
  • Lost admin access after setup: Reset through database or use Monica's built-in recovery commands via container exec

Community Notes

Loading...
Loading notes...

Download Recipe Kit

Get all files in a ready-to-deploy package

Includes docker-compose.yml, .env template, README, and license

Ad Space