CRM, Support & Productivity2 GB RAM (Pro recommended)· Port 3000

Deploy Twenty Open-Source CRM with Docker Compose

Modern open-source Salesforce & HubSpot alternative built with TypeScript, React, PostgreSQL, and Redis.

1. Production docker-compose.yml Configuration

Copy this stack definition or deploy directly from your Vexlo Cloud console with automatic Let's Encrypt TLS and persistent volume mounts.

docker-compose.yml
yaml
services:
  twenty-crm:
    image: twentycrm/twenty:latest
    restart: unless-stopped
    ports:
      - "3000:3000"
    environment:
      - SERVER_URL=${SERVER_URL:-https://crm.yourdomain.com}
      - APP_SECRET=${APP_SECRET:-32-char-app-secret-key}
      - PG_DATABASE_URL=${PG_DATABASE_URL:-postgres://postgres:secret@postgres:5432/default}
    volumes:
      - app_data:/app/docker-data
    depends_on:
      - postgres
      - redis

  postgres:
    image: postgres:16-alpine
    restart: unless-stopped
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=${POSTGRES_PASSWORD:-change-me-db-password}
      - POSTGRES_DB=twenty_crm
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    restart: unless-stopped
    command: redis-server --maxmemory 256mb --maxmemory-policy allkeys-lru
    volumes:
      - redis_data:/data

volumes:
  app_data:
  postgres_data:
  redis_data:

2. Required Environment Variables

VariableDefault / ExampleDescription
SERVER_URLhttps://crm.yourdomain.comPublic URL of your Twenty CRM server.
APP_SECRET32-char-app-secret-keyMaster secret used to sign JWTs and encrypt credentials.
PG_DATABASE_URLpostgres://postgres:secret@postgres:5432/defaultPostgreSQL connection string.

Twenty Open-Source CRM Self-Hosting FAQs

How much RAM is required to self-host Twenty Open-Source CRM in production?

Twenty Open-Source CRM requires a minimum of 2 GB RAM (Pro recommended). On Vexlo Cloud Pro (₹149/mo via UPI in India or $5/mo globally), you get 2 vCPU, 3 GB RAM, and 2 managed databases—more than enough headroom for production workloads.

How do I expose Twenty Open-Source CRM with automatic HTTPS/SSL on Vexlo Cloud?

Deploy the twentycrm/twenty:latest container on Vexlo Cloud, set the exposed port to 3000, and attach your custom domain in the Domains tab. Vexlo automatically provisions and renews Let's Encrypt TLS certificates.

How is persistent data backed up for Twenty Open-Source CRM?

Mount /app/docker-data to a persistent Docker volume and connect Vexlo Cloud's automated S3 / Cloudflare R2 backup scheduler to snapshot your database daily or weekly.

More 1-Click Docker Templates

View all 25 templates →