> ## Documentation Index
> Fetch the complete documentation index at: https://docs.levelrail.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Self-host Monica with Docker

> A personal CRM that remembers the people in your life, with notes, reminders, activities and relationships.

A personal CRM that remembers the people in your life, with notes, reminders, activities and relationships.

This page describes the Levelrail template for Monica (Productivity). It deploys the services below as one Docker Compose app on your own server. Project site: [https://github.com/monicahq/monica/blob/main/docs/installation/docker.md](https://github.com/monicahq/monica/blob/main/docs/installation/docker.md).

Recommended memory: about 512 MiB.

## Services, ports and volumes

| Service | Image | Container ports | Volumes |
| - | - | - | - |
| `mariadb` | `mariadb:11.8` | none | `mariadb -&#62; /var/lib/mysql` |
| `monica` | `monica:4.1.2-apache` | 80 | `storage -&#62; /var/www/html/storage` |

## Environment variables

| Service | Variable | Value |
| - | - | - |
| `mariadb` | `MYSQL_DATABASE` | Preset in the template |
| `mariadb` | `MYSQL_PASSWORD` | Generated at deploy |
| `mariadb` | `MYSQL_ROOT_PASSWORD` | Generated at deploy |
| `mariadb` | `MYSQL_USER` | Preset in the template |
| `monica` | `APP_ENV` | Preset in the template |
| `monica` | `APP_KEY` | Generated at deploy |
| `monica` | `APP_URL` | Preset in the template |
| `monica` | `DB_CONNECTION` | Preset in the template |
| `monica` | `DB_DATABASE` | Preset in the template |
| `monica` | `DB_HOST` | Preset in the template |
| `monica` | `DB_PASSWORD` | Generated at deploy |
| `monica` | `DB_PORT` | Preset in the template |
| `monica` | `DB_USERNAME` | Preset in the template |

Passwords and keys marked as generated are created for you when the app is deployed and stored as secrets. Values are not shown here.

## Deploy Monica with Levelrail

In the dashboard, open **Apps**, choose **New app**, then **Browse templates**, and select Monica. Review the Compose body and deploy.

With the CLI:

```bash theme={"dark"}
levelrail-cli templates deploy monica --name my-monica
```

See the [service template catalog](/templates-and-registry) for how templates work, and [Getting started](/getting-started) if you have not installed Levelrail yet.

## More Productivity templates

* [AFFiNE](/self-host/affine)
* [AppFlowy](/self-host/appflowy)
* [Baby Buddy](/self-host/babybuddy)
* [BentoPDF](/self-host/bentopdf)
* [BookStack](/self-host/bookstack)

All templates are listed in the [self-host gallery](/self-host).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.