Usage & Enterprise Capabilities

Best for:Modern Startups & YC CompaniesDeveloper Tooling & APIsSaaS & B2B TechnologyAgile Sales TeamsVenture Capital & Private Equity

Twenty CRM represents the new wave of open-source software, built directly as an alternative to modern, rigid SaaS CRMs like Salesforce and modern, flexible (but generic) block-editors like Notion or Airtable. It aims to combine the structural rigidity and sales-focus of a traditional CRM with the lightning-fast, keyboard-shortcut-driven interface that younger, agile teams expect.

Built entirely on a modern JavaScript/TypeScript stack (React frontend, NestJS backend, GraphQL API, PostgreSQL database), Twenty is designed to be fully customizable while remaining extremely fast. A core philosophy is that "the API is a first-class citizen." Whenever an administrator creates a new custom business object visually in the UI (e.g., creating an "Investor" object), a corresponding, fully-typed GraphQL endpoint is automatically generated for it instantly.

For production, Twenty is deployed via Docker, making it highly portable. It relies heavily on background workers for syncing external data (like reading email threads via the Gmail API) without slowing down the primary web application.

Key Benefits

  • Notion-Like Speed: A clean, uncluttered interface that responds instantly, eschewing the clunky page-loads of older PHP-based CRMs.

  • Data Extensibility: Complete freedom to build customized data models without writing code, acting nearly as a low-code database builder.

  • Autogenerated APIs: Eliminates backend development bottlenecks. The GraphQL API automatically updates its schema the moment changes are made in the CRM UI.

  • Developer Experience (DX): Built on familiar, modern tooling (TS/React/NestJS/Docker), making it easy to fork, extend, or contribute to.

Production Architecture Overview

Twenty is a modern containerized microservices architecture:

  • Web Frontend (React/Vite): The Single Page Application (SPA) served to the user's browser via Nginx.

  • Backend API (NestJS): The core Node.js server handling business logic, authentication, and serving the GraphQL API.

  • Worker (NestJS): A dedicated background process handling long-running, asynchronous tasks (e.g., bulk imports, syncing connected IMAP/Gmail accounts, webhooks).

  • Database (PostgreSQL 15+): The primary relational datastore managing the complex entity relationships and the custom generated schemas.

  • Redis: Required for managing the asynchronous job queues (for the Worker) and application caching.

Implementation Blueprint

Implementation Blueprint

Prerequisites

Twenty CRM relies on Docker as the official, supported deployment method.

# Update Server
sudo apt update && sudo apt upgrade -y

# Install Docker and Docker Compose
sudo apt-get install docker.io docker-compose -y
sudo systemctl enable --now docker
shell

Deploying Twenty via Docker Compose

Create an isolated directory for the configuration files.

mkdir /opt/twenty && cd /opt/twenty
shell

First, you must obtain a secure APP_SECRET. This is vital for encrypting OAuth tokens and user passwords.

openssl rand -base64 32
# Copy the output
shell

Create an environment variables file .env using Nano:

nano .env
shell

Populate .env with the necessary configurations:

# Required core variables
TAG=latest
PORT=3000
SERVER_URL=https://crm.mycompany.com # The external URL where the CRM will live

# Security
APP_SECRET=paste_your_randomly_generated_secret_here

# Database Configurations (Internal Docker Networking)
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
PG_DATABASE_USER=twenty
PG_DATABASE_PASSWORD=super_secure_postgres_pass
PG_DATABASE_NAME=default

# Redis Configuration
REDIS_URL=redis://redis:6379

# Storage (Local file storage configuration)
STORAGE_TYPE=s3
STORAGE_S3_ENDPOINT=http://minio:9000
STORAGE_S3_REGION=us-east-1
STORAGE_S3_BUCKET=twenty-storage
STORAGE_S3_ACCESS_KEY_ID=minioadmin
STORAGE_S3_SECRET_ACCESS_KEY=minioadmin

The Docker Compose File

Pull the official docker-compose.yml file recommended by the Twenty project. (Refer to the official Github repository for the most up-to-date version, as microservice architecture can shift).

wget https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-docker/docker-compose.yml
shell

The typical compose file orchestrates:

  • db: A PostgreSQL container.

  • redis: A Redis container.

  • minio: A MinIO container (local S3-compatible service to handle file attachments).

  • server: The main NestJS backend.

  • worker: The asynchronous task processor.

Launching the Application

Boot the entire stack using Docker Compose:

cd /opt/twenty
docker-compose up -d
shell

Verify the containers are healthy:

docker-compose ps
docker-compose logs -f server
shell

Wait until the server container logs indicate that database migrations have successfully executed and the server is listening on port 3000.

Exposing via Reverse Proxy (Nginx)

Twenty runs its backend service internally on port 3000. Use Nginx to securely expose this port to the internet via your domain.

sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/twenty
shell

Configure the Reverse Proxy:

server {
    listen 80;
    server_name crm.mycompany.com;

    location / {
        proxy_pass http://127.0.0.1:3000;
        proxy_http_version 1.1;
        proxy_set_header Upgrade $http_upgrade; # Required for WebSockets (Live Server Updates)
        proxy_set_header Connection 'upgrade';
        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_set_header X-Forwarded-Proto $scheme;
    }
}

Enable the site and obtain SSL via Certbot.

sudo ln -s /etc/nginx/sites-available/twenty /etc/nginx/sites-enabled/
sudo systemctl reload nginx
shell

Setup and Initial Configuration

  1. Initial Login: Browse to https://crm.mycompany.com. The first user to register an account acts as the Workspace Administrator.

  2. Setup Custom Objects: Navigate to Settings > Workplace Settings > Objects. Rather than relying on rigid predefined "Leads", establish the precise data structure that matches your specific business pipeline.

  3. Configure the Worker Queue: Ensure the Redis integration is functioning by navigating to the "Connected Accounts" section and linking a test Google/Outlook account. The worker container will begin asynchronously syncing the email history.

Security Practices

  • MinIO Exposure: By default in the compose setup, MinIO (S3 clone) internal storage might be accessible from the host. Ensure the MinIO ports (usually 9000/9001) are not bound to 0.0.0.0 but strictly to 127.0.0.1 or internal Docker networking, proxying attachment downloads strictly through the main Twenty API.

  • Database Isolation: If deploying at scale, replace the Dockerized PostgreSQL and Redis containers with managed cloud services (e.g., AWS RDS PostgreSQL and AWS ElastiCache). Update the .env PG_DATABASE_HOST variables to point externally to substantially increase the CRM's reliability and simplify automated backup procedures.

Technical Support

Stuck on Implementation?

If you're facing issues deploying this tool or need a managed setup on Hostinger, our engineers are here to help. We also specialize in developing high-performance custom web applications and designing end-to-end automation workflows.

Engineering trusted by teams at

Managed Setup & Infra

Production-ready deployment on Hostinger, AWS, or Private VPS.

Custom Web Applications

We build bespoke tools and web dashboards from scratch.

Workflow Automation

End-to-end automated pipelines and technical process scaling.

Faster ImplementationRapid Deployment
100% Free Audit & ReviewTechnical Analysis