> ## 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 Twenty CRM with Docker

> An open-source CRM you fully control, built to look and feel like a modern spreadsheet.

An open-source CRM you fully control, built to look and feel like a modern spreadsheet.

This page describes the Levelrail template for Twenty CRM (Productivity). It deploys the services below as one Docker Compose app on your own server. Project site: [https://docs.twenty.com](https://docs.twenty.com).

Recommended memory: about 1024 MiB.

## Services, ports and volumes

| Service | Image | Container ports | Volumes |
| - | - | - | - |
| `postgres` | `postgres:16-alpine` | none | `twenty_postgres_data -&#62; /var/lib/postgresql/data` |
| `redis` | `redis:7-alpine` | none | `twenty_redis_data -&#62; /data` |
| `twenty` | `twentycrm/twenty:v1.15` | 3000 | `twenty_storage -&#62; /app/packages/twenty-server/.local-storage` |

## Environment variables

| Service | Variable | Value |
| - | - | - |
| `postgres` | `POSTGRES_DB` | Preset in the template |
| `postgres` | `POSTGRES_PASSWORD` | Generated at deploy |
| `postgres` | `POSTGRES_USER` | Preset in the template |
| `twenty` | `APP_SECRET` | Generated at deploy |
| `twenty` | `CACHE_STORAGE_TYPE` | Preset in the template |
| `twenty` | `ENABLE_DB_MIGRATIONS` | Preset in the template |
| `twenty` | `FRONT_BASE_URL` | Preset in the template |
| `twenty` | `MESSAGE_QUEUE_TYPE` | Preset in the template |
| `twenty` | `PG_DATABASE_URL` | Generated at deploy |
| `twenty` | `REDIS_URL` | Preset in the template |
| `twenty` | `SERVER_URL` | Preset in the template |
| `twenty` | `STORAGE_TYPE` | 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 Twenty CRM with Levelrail

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

With the CLI:

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

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)
* [BookStack](/self-host/bookstack)
* [Cal.com](/self-host/calcom)

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.