# Self-host Twenty CRM

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

- Page: https://levelrail.com/templates/twenty/
- JSON: https://levelrail.com/templates/twenty.json
- Category: Productivity
- Licence: AGPL-3.0 (Network copyleft (AGPL) license)
- Source: https://github.com/twentyhq/twenty
- Upstream docs: https://docs.twenty.com

## Requirements
- Memory: about 1 GiB
- amd64: published, arm64: published
- Needs configuration before start: no
- Pinned image tag: 16-alpine

## Services

| Service | Image | Tag | Ports | Volumes |
| --- | --- | --- | --- | --- |
| postgres | postgres | 16-alpine | none | twenty_postgres_data -> /var/lib/postgresql/data |
| redis | redis | 7-alpine | none | twenty_redis_data -> /data |
| twenty | twentycrm/twenty | v1.15 | 3000 | twenty_storage -> /app/packages/twenty-server/.local-storage |

## Environment

| Service | Variable | Kind |
| --- | --- | --- |
| postgres | POSTGRES_DB | preset |
| postgres | POSTGRES_PASSWORD | generated |
| postgres | POSTGRES_USER | preset |
| twenty | APP_SECRET | generated |
| twenty | CACHE_STORAGE_TYPE | preset |
| twenty | ENABLE_DB_MIGRATIONS | preset |
| twenty | FRONT_BASE_URL | preset |
| twenty | MESSAGE_QUEUE_TYPE | preset |
| twenty | PG_DATABASE_URL | generated |
| twenty | REDIS_URL | preset |
| twenty | SERVER_URL | preset |
| twenty | STORAGE_TYPE | preset |

## Deploy

### CLI

```bash
levelrail-cli templates deploy twenty --name my-twenty
```

### API

```bash
curl -X POST -H "Authorization: Bearer $TOKEN" \
  https://levelrail.example.com/api/v1/service-templates/twenty/deploy
```

Create a token in the dashboard first. This one-click route deploys it as a trial app you can keep or remove.

## Questions

### Can I deploy Twenty CRM on Dokploy or Dokku?

The services and pinned images on this page can be run on any Docker host. The public Dokploy templates list has an entry with the id twenty for this app, so check that entry as well. Dokku deploys container images with its own commands, so the pinned image postgres:16-alpine, redis:7-alpine, twentycrm/twenty:v1.15 is what you deploy there.

Self-host Twenty CRM, Twenty CRM docker compose file, deploy Twenty CRM on a VPS: this page lists the pinned image, ports, volumes and the commands for each.
