This guide uses Docker Compose to run Monica (Personal Relationship Manager) using the official Docker image with PostgreSQL.
For Docker installation, see Docker.
cat <<'YAML' > docker-compose.yml
services:
postgres:
image: postgres:16-alpine
restart: unless-stopped
environment:
POSTGRES_DB: monica
POSTGRES_USER: monica
POSTGRES_PASSWORD: change-me
volumes:
- postgres_data:/var/lib/postgresql/data
monica:
image: monica:latest
restart: unless-stopped
depends_on:
- postgres
ports:
- "8080:80"
environment:
APP_KEY: generate-with-openssl
DB_CONNECTION: pgsql
DB_HOST: postgres
DB_PORT: 5432
DB_DATABASE: monica
DB_USERNAME: monica
DB_PASSWORD: change-me
volumes:
- monica_data:/var/www/html/storage
volumes:
postgres_data:
driver: local
monica_data:
driver: local
YAML
Before starting, generate an APP_KEY:
echo -n 'base64:'; openssl rand -base64 32
Replace generate-with-openssl in the compose file with the output.
docker compose up -d
Open http://YOUR-SERVER:8080 and create your account.
monica.Any questions?
Feel free to contact us. Find all contact information on our contact page.