---
title: Deploy Twenty CRM with AI on Blossom
url: "/deploy/twenty-crm/"
canonical_url: https://blossom88.com/deploy/twenty-crm/
markdown_url: https://blossom88.com/deploy/twenty-crm.md
summary: Deploy Twenty CRM with AI on Blossom. Manage contacts, companies, and a sales
  pipeline with managed PostgreSQL, Redis, and files in your private R2 bucket.
categories:
- deployment
- crm
stack:
- TypeScript
- NestJS
- React
- PostgreSQL
- Redis
---

# Deploy Twenty CRM with AI on Blossom

[Twenty](https://twenty.com/) is a CRM for contacts, companies and sales
opportunities. Keep notes, track follow-ups and move deals through your
pipeline in one workspace.

![A sample sales pipeline in Twenty CRM running on Blossom.](/deploy/assets/images/twenty-crm/pipeline.png)

![A Twenty opportunity with its contact, proposal file, and follow-up task.](/deploy/assets/images/twenty-crm/opportunity.png)

## Ask Your Agent

> **Ask your AI agent:** Deploy Twenty CRM on Blossom. Help me set up a sales pipeline.
>
> Follow this guide: https://blossom88.com/deploy/twenty-crm/

[Install the Blossom CLI and skill](https://docs.blossom88.com/learn/getting-started/install/) on your agent's machine and [choose a Location in your cloud account](https://docs.blossom88.com/learn/getting-started/choose-your-cloud/#connect-your-provider).

## Have Ready

- **S3 or R2 bucket** (Required): A private bucket in your own account, with a credential limited to that bucket.
- **Email provider** (Later): Needed for invitations and password resets.
- **Gmail or calendar sync** (Later): Optional. Each has its own provider setup.

## How It Runs

| Part | Role | Where |
|---|---|---|
| Web | CRM interface and APIs | HTTPS · behind Blossom Account access while you set up |
| Worker | Background jobs | Private |
| PostgreSQL | Contacts, deals and workspace settings | Managed by Blossom |
| Redis | Queues and shared cache | Managed by Blossom |
| Bucket | Uploaded files and application assets | Your S3 or R2 account |

## Deploy Twenty

Your agent checks Twenty's
[deployment requirements](https://docs.twenty.com/developers/self-host/capabilities/docker-compose),
picks a compatible image, links managed Data, and runs database setup once
before each release starts. Keep the bucket credential in a private
environment file.

<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom app:create --data app.yml
    blossom environment:create --data environment.yml
    blossom database_instance:create --data database_instance.yml --follow
    blossom cache_instance:create --data cache_instance.yml --follow
    blossom environment_link:create --data database-link.yml
    blossom environment_link:create --data redis-link.yml

For PostgreSQL, link the logical Database. For Redis, link the Cache instance:

```yaml
environment_link:
  environment_id: environment-100
  target_type: Database
  target_id: database-100
  var_name: DATABASE_URL
```

Web and worker Services, with setup in the Release Phase:

    blossom service:create --data web-service.yml
    blossom service:create --data worker-service.yml
    blossom env_var:push --environment environment-100 --file .env.production
    blossom environment:deploy_hooks:update --id environment-100 --data hooks.yml
    blossom environment:deploy --id environment-100 --follow

</details>

<details class="optional-reading" markdown="1">
<summary>Notes for your agent</summary>

- **Data.** Map the linked `DATABASE_URL` to `PG_DATABASE_URL` at startup and
  use Twenty's required PostgreSQL extensions. Redis must keep queued jobs
  without evicting them.
- **Release Phase.** Run database initialization or upgrades and
  scheduled-job registration **once in the Release Phase**, before the new
  Services start. Require success; a failed migration must not become a
  warning followed by normal startup. Disable those steps in the web and
  worker startup commands.
- **Services.** Web runs `node dist/main` on port 3000 with an HTTP readiness
  check at `/healthz`. The worker runs `node dist/queue-worker/queue-worker`
  without a public port. Both use the same image and private settings.
- **URL and keys.** Use the same canonical HTTPS `SERVER_URL`, application
  secret and encryption key on both Services; keep the keys stable and backed
  up. For a generated address, start the private web Service first to get its
  URL, save it for both Services, enable the worker and redeploy before
  creating the workspace.
- **Bucket.** Select Twenty's S3 storage driver for web and worker, with the
  bucket, endpoint, region and credentials in the private environment file.
  Keep provider administration credentials off the app. For temporary session
  credentials, leave `STORAGE_S3_ACCESS_KEY_ID` and
  `STORAGE_S3_SECRET_ACCESS_KEY` unset; the SDK's default chain reads
  `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_SESSION_TOKEN`
  together.

</details>

## Create Your Workspace

Keep the site behind **Blossom Account access**, open its HTTPS address, and
create your own owner account and workspace. Don't enable prefilled demo
sign-in.

> **Ask your AI agent:** Help me create my Twenty workspace and owner account.

> Follow this guide: https://blossom88.com/deploy/twenty-crm/



## Build Your Pipeline

Add a company and contact, then move an opportunity through its stages with a
note, a follow-up task and a proposal file.

> **Ask your AI agent:** Set up a sales pipeline in Twenty with stages for my business.

> Follow this guide: https://blossom88.com/deploy/twenty-crm/



## Add Web Containers

Web Containers share PostgreSQL, Redis and the bucket. Every Container keeps
the same image, canonical URL and keys, with setup in the Release Phase.
Review worker concurrency separately for your workload.

> **Ask your AI agent:** Scale Twenty's web Service to two Containers.

> Follow this guide: https://blossom88.com/deploy/twenty-crm/



<details class="optional-reading" markdown="1">
<summary>Commands your agent runs</summary>

    blossom service:scale --id service-100 --desired-size 2 --follow

</details>

## Keep It Running

Follow Twenty's supported upgrade path with the same image on web and worker,
and let the Release Phase finish before new processes start. Configure
[database backups](/docs/backups/) and back up the bucket too:
PostgreSQL keeps file records, the bucket keeps the files.

<details class="optional-reading" markdown="1">
<summary>Set up email and invite your team</summary>

Configure your email provider and send a test to an address you control.
Gmail and calendar sync need their own provider setup.

> **Ask your AI agent:** Configure email on Twenty so I can invite my team.

> Follow this guide: https://blossom88.com/deploy/twenty-crm/



</details>

## What You Get

- Your own private CRM at an HTTPS address
- Contacts, companies and a sales pipeline
- Notes, tasks and files on every deal
- Managed PostgreSQL and Redis
- Uploaded files in your own S3 or R2 bucket
- Room to add web Containers as your team grows

Tested on Blossom: A sample pipeline with files in R2 kept working through Container replacement, on two web Containers and a worker.
