Prerequisites
Before you begin, ensure you have the following installed:- Node.js 24+ (required)
- Yarn 4 (4.0.2 or higher)
- PostgreSQL (version 16 recommended)
- Redis (latest stable version)
- Git
Twenty uses Yarn 4 as its package manager. The project is set up with
packageManager: "[email protected]" to ensure version consistency.Clone the Repository
First, clone the Twenty repository:Install Dependencies
Install all project dependencies using Yarn:Environment Configuration
Server Configuration
Create your environment file from the example:packages/twenty-server/.env with your local configuration:
Frontend Configuration
The frontend typically doesn’t require additional configuration for local development, but you can create an.env file if needed:
Database Setup
Start PostgreSQL and Redis
Make sure PostgreSQL and Redis are running:Initialize the Database
Reset and initialize the database:- Drop and recreate the database
- Run all migrations
- Seed with initial data
Start Development Server
Start all services (frontend, backend, and worker) at once:- Frontend on
http://localhost:3001 - Backend on
http://localhost:3000 - Worker for background jobs
The
yarn start command uses concurrently to run multiple services. It waits for the backend to be ready before starting the worker.Start Individual Services
You can also start services individually:Verify Installation
- Open your browser and navigate to
http://localhost:3001 - Click “Continue with Email”
- Use the prefilled credentials to sign in
- You should see the Twenty dashboard
Development Commands
Testing
Code Quality
Database Operations
GraphQL
Common Issues
Port already in use
Port already in use
If port 3000 or 3001 is already in use, you can:
- Stop the conflicting process
- Change the port in your
.envfile:
Database connection failed
Database connection failed
Verify PostgreSQL is running and the connection string is correct:If the database doesn’t exist, create it:
Redis connection failed
Redis connection failed
Ensure Redis is running:
Build errors after pulling latest changes
Build errors after pulling latest changes
Clean and reinstall dependencies:
Next Steps
Architecture Overview
Learn about Twenty’s technical architecture
Contributing Guide
Start contributing to Twenty
Code Style Guide
Follow Twenty’s code conventions
Testing
Write and run tests
