Usage & Enterprise Capabilities
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
- 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
# 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 dockerDeploying Twenty via Docker Compose
mkdir /opt/twenty && cd /opt/twentyAPP_SECRET. This is vital for encrypting OAuth tokens and user passwords.openssl rand -base64 32
# Copy the output.env using Nano:nano .env.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=minioadminThe Docker Compose File
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.ymldb: 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
cd /opt/twenty
docker-compose up -ddocker-compose ps
docker-compose logs -f serverExposing via Reverse Proxy (Nginx)
sudo apt install nginx -y
sudo nano /etc/nginx/sites-available/twentyserver {
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;
}
}sudo ln -s /etc/nginx/sites-available/twenty /etc/nginx/sites-enabled/
sudo systemctl reload nginxSetup and Initial Configuration
- Initial Login: Browse to
https://crm.mycompany.com. The first user to register an account acts as the Workspace Administrator. - 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.
- 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.0but strictly to127.0.0.1or 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
.envPG_DATABASE_HOSTvariables to point externally to substantially increase the CRM's reliability and simplify automated backup procedures.
Recommended Hosting for Twenty CRM
For systems like Twenty CRM, we recommend high-performance VPS hosting. Hostinger offers dedicated setups for open-source tools with one-click installer scripts and 24/7 priority support.
Get Started on HostingerExplore Alternative Crm Infrastructure
X2CRM
X2CRM is an open-source CRM, sales process, and marketing automation application designed for fast, high-performance sales teams.
vTiger CRM
vTiger CRM is a comprehensive, open-source CRM application equipping sales, support, and marketing teams to enhance customer experiences.