Searched self-hosting Twenty docker setup installation
Found 10 results
1 messages · Page 1 of 1 (latest)
• https://docs.twenty.com/developers/self-host/capabilities/setup
• https://docs.twenty.com/l/es/developers/self-host/capabilities/setup
• https://docs.twenty.com/l/es/user-guide/settings/how-tos/settings-faq
• https://docs.twenty.com/l/fr/developers/self-host/capabilities/setup
• https://docs.twenty.com/l/fr/user-guide/settings/how-tos/settings-faq
• https://docs.twenty.com/l/ja/developers/self-host/capabilities/setup
• https://docs.twenty.com/l/ko/user-guide/settings/how-tos/settings-faq
Here is how to set up Twenty on your Linux server with Docker and access it via your domain abc.net:
Option 1: One-line install script (recommended)
bash <(curl -sL https://raw.githubusercontent.com/twentyhq/twenty/main/packages/twenty-docker/scripts/install.sh)
Option 2: Manual setup
mkdir twenty && cd twenty
curl -o .env https://raw.githubusercontent.com/twentyhq/twenty/refs/heads/main/packages/twenty-docker/.env.example
curl -o docker-compose.yml https://raw.githubusercontent.com/twentyhq/twenty/refs/heads/main/packages/twenty-docker/docker-compose.yml
.env:openssl rand -base64 32
Edit your .env file:
APP_SECRET=your_generated_secret_here
PG_DATABASE_PASSWORD=your_strong_password_here
.env:SERVER_URL=https://abc.net
Use http://abc.net:3000 if you do not have SSL set up yet.
docker compose up -d
Since you want to access Twenty via abc.net:
abc.net pointing to your server IP3000 with SSL terminationExample Nginx config:
server {
listen 443 ssl;
server_name abc.net;
# SSL certificates here
location / {
proxy_pass http://localhost:3000;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
}
}
After making changes, restart:
docker compose down
docker compose up -d
Then access Twenty at https://abc.net (or http://abc.net:3000 without SSL).
System requirements: At least 2GB RAM.
These pages may help:
in step 2, file .env really have :
TAG=latest
#PG_DATABASE_USER=postgres
#PG_DATABASE_PASSWORD=replace_me_with_a_strong_password_without_special_characters
#PG_DATABASE_HOST=db
#PG_DATABASE_PORT=5432
#REDIS_URL=redis://redis:6379
SERVER_URL=http://localhost:3000
STORAGE_TYPE=local
You are correct. The .env.example file has those values commented out by default. You need to uncomment and set the required values.
Here is what your .env file should look like after editing:
TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=your_strong_password_here
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=https://abc.net
# Generate with: openssl rand -base64 32
APP_SECRET=your_generated_secret_here
STORAGE_TYPE=local
Key changes:
PG_DATABASE_PASSWORD and set a strong password (no special characters)APP_SECRET and set it to the value generated by openssl rand -base64 32SERVER_URL from http://localhost:3000 to your domain:
https://abc.net if you have SSL configured via reverse proxyhttp://abc.net:3000 if no SSL yetAfter editing .env, start Twenty:
docker compose up -d
For your domain to work, you also need to:
abc.net to your server IP3000 with SSL terminationSSL is strongly recommended for full functionality (clipboard, copy buttons, etc.).
Let me know if you run into any issues.
root@cs-linux-20260113172059287:~/twenty# docker compose up -d
[+] up 41/41
[+] up 48/48tgres:16 Pulled 96.7s
✔ Image postgres:16 Pulled 96.7s
✔ Image redis Pulled 43.2s
✔ Image twentycrm/twenty:latest Pulled 278.4s
✔ Network twenty_default Created 0.5s
✔ Volume twenty_server-local-data Created 0.0s
✔ Volume twenty_db-data Created 0.0s
✔ Container twenty-db-1 Healthy 18.1s
✔ Container twenty-redis-1 Healthy 9.9s
✘ Container twenty-server-1 Error dependency server failed to start 124.8s
✔ Container twenty-worker-1 Created 0.5s
dependency failed to start: container twenty-server-1 is unhealthy
The server container is failing to start. Let me check the logs to understand what is happening.
First, check the server logs:
docker compose logs twenty-server-1
This will show you the specific error. Common causes for this issue:
Most likely cause: Missing or invalid APP_SECRET
Make sure you have uncommented and set APP_SECRET in your .env file:
APP_SECRET=your_generated_secret_here
Generate one with:
openssl rand -base64 32
Quick fix - try this:
docker compose down --volumes
.env file has these values uncommented and set:TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=your_strong_password_here
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=http://localhost:3000
APP_SECRET=your_generated_secret_here
STORAGE_TYPE=local
docker compose up -d
docker compose logs
Paste the output of docker compose logs twenty-server-1 here and I can help diagnose the specific issue.
root@cs-linux-20260113172059287:~/twenty# docker compose up -d
WARN[0000] The "DISABLE_DB_MIGRATIONS" variable is not set. Defaulting to a blank string.
WARN[0000] The "STORAGE_S3_NAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "DISABLE_CRON_JOBS_REGISTRATION" variable is not set. Defaulting to a blank string.
WARN[0000] The "STORAGE_S3_REGION" variable is not set. Defaulting to a blank string.
WARN[0000] The "STORAGE_S3_ENDPOINT" variable is not set. Defaulting to a blank string.
WARN[0000] The "STORAGE_S3_REGION" variable is not set. Defaulting to a blank string.
WARN[0000] The "STORAGE_S3_NAME" variable is not set. Defaulting to a blank string.
WARN[0000] The "STORAGE_S3_ENDPOINT" variable is not set. Defaulting to a blank string.
WARN[0000] No services to build
[+] up 7/7
✔ Network twenty_default Created 0.2s
✔ Volume twenty_server-local-data Created 0.0s
✔ Volume twenty_db-data Created 0.0s
✔ Container twenty-redis-1 Healthy 7.0s
✔ Container twenty-db-1 Healthy 8.0s
✘ Container twenty-server-1 Error dependency server failed to start 8.3s
✔ Container twenty-worker-1 Created 0.1s
dependency failed to start: container twenty-server-1 is unhealthy
The warnings about S3 variables are fine since you are using local storage. The server container is failing its health check. Let me help you diagnose this.
Check the server logs:
docker logs twenty-server-1
Paste the output here so I can see the specific error.
Most common causes for this issue:
APP_SECRET - This is required and must be uncommented in your .envQuick fix to try:
.env file and make sure these are uncommented and set:PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=your_strong_password_here
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
APP_SECRET=your_generated_secret_here
APP_SECRET if you have not:openssl rand -base64 32
docker compose down --volumes
docker compose up -d
docker logs twenty-server-1
Let me know what the logs show.
root@cs-linux-20260113172059287:~/twenty# docker logs twenty-server-1
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Running database setup and migrations...
psql: error: invalid integer value "cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA" for connection option "port"
Found the issue. Your APP_SECRET value (cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA) is being read as the database port. This means there is a formatting problem in your .env file.
The problem: Your .env file likely has the variables in the wrong order or PG_DATABASE_PORT is not set correctly.
Fix your .env file:
Make sure each variable is on its own line and properly set:
TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=twentypassword
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=http://localhost:3000
APP_SECRET=cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA
STORAGE_TYPE=local
Important checks:
PG_DATABASE_PORT=5432 is uncommented (remove the # at the start)= signsAfter fixing .env, reset and restart:
docker compose down --volumes
docker compose up -d
Then check:
docker logs twenty-server-1
Let me know how it goes.
How i get twentypassword
You create it yourself. It is just a password you choose for the PostgreSQL database.
Use any strong password you want, for example:
PG_DATABASE_PASSWORD=MySecurePassword123
Requirements:
@, #, $, %, &, etc.)Example .env file:
TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=MySecurePassword123
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=http://localhost:3000
APP_SECRET=cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA
STORAGE_TYPE=local
Then restart:
docker compose down --volumes
docker compose up -d
The password is only used internally between the Twenty server and the PostgreSQL database container. You will not need to enter it anywhere else.
TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=MySecurePassword123
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=http://crmdemo.net:3000
APP_SECRET=cG8mMEXa++x81eJQYTCf59N6QthhLsD9xRrTA/AAULQ=
STORAGE_TYPE=local
I changed this file, but when i run docker compose ulti error
✘ Container twenty-server-1 Error dependency server failed to start 116.3s
dependency failed to start: container twenty-server-1 is unhealthy
The APP_SECRET contains special characters (/, +, =) which can cause issues.
Try these fixes:
openssl rand -hex 32
This will give you a hex string with only letters and numbers.
.env file:TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=MySecurePassword123
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=http://crmdemo.net:3000
APP_SECRET=your_new_hex_secret_here
STORAGE_TYPE=local
docker compose down --volumes
docker compose up -d
docker logs twenty-server-1
Paste the new logs if it still fails.
Hello @eager urchin sounds like https://docs.twenty.com/developers/self-host/capabilities/troubleshooting#first-install-results-in-password-authentication-failed-for-user-"postgres"
That link is correct. This is a known issue documented in the troubleshooting guide.
The problem: The password you set during the first installation attempt is stored in the database volume. When you changed the password later, the database still had the old password stored.
Since this is a fresh installation, here is the fix:
Update your .env file with the password you want to use
Remove the volumes and restart:
docker compose down --volumes
docker compose up -d
This will delete the old database volume (which has the old password) and create a fresh one with your new password.
docker logs twenty-server-1
The --volumes flag is key here - it removes the database volume so the new password can be set properly on the fresh database.
Let me know if that resolves it.
root@cs-linux-20260113172059287:~/twenty# docker compose up -d
WARN[0000] No services to build
[+] up 3/3
✔ Container twenty-redis-1 Healthy 0.6s
✔ Container twenty-db-1 Healthy 1.1s
✔ Container twenty-server-1 Healthy 1.1s
root@cs-linux-20260113172059287:~/twenty# docker ps
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
8eecaa16a55a twentycrm/twenty:latest "/app/entrypoint.sh …" 19 hours ago Up About a minute twenty-worker-1
a931ab0fe180 twentycrm/twenty:latest "/app/entrypoint.sh …" 19 hours ago Up 19 hours (healthy) 0.0.0.0:3000->3000/tcp, [::]:3000->3000/tcp twenty-server-1
8932126ebbae postgres:16 "docker-entrypoint.s…" 19 hours ago Up 19 hours (healthy) 5432/tcp twenty-db-1
3ccb553f344c redis "docker-entrypoint.s…" 19 hours ago Up 19 hours (healthy) 6379/tcp twenty-redis-1
Twenty is now running successfully. All containers are healthy.
Access Twenty at: http://crmdemo.net:3000
Make sure your DNS A record for crmdemo.net points to your server's IP address.
Quick test from your server:
curl http://localhost:3000
If you want to access it via https://crmdemo.net (without the port), you will need to set up a reverse proxy (Nginx, Traefik, etc.) with SSL termination. Let me know if you need help with that.
It up, but how to edit src ???
You are running Twenty via Docker using the pre-built image (twentycrm/twenty:latest). This is a production deployment, not a development setup.
If you want to edit the source code, you need to set up a local development environment instead of using Docker. Here is how:
1. Install prerequisites:
nvm)# Enable yarn
corepack enable
2. Clone the repository:
git clone https://github.com/twentyhq/twenty.git
cd twenty
3. Set up PostgreSQL and Redis:
You can use your existing Docker containers for the database and Redis, or install them locally.
4. Copy environment files:
cp ./packages/twenty-front/.env.example ./packages/twenty-front/.env
cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env
5. Install dependencies:
yarn
6. Set up the database:
npx nx database:reset twenty-server
7. Start the development servers:
npx nx start twenty-server
npx nx worker twenty-server
npx nx start twenty-front
Access points:
http://localhost:3001http://localhost:3000http://localhost:3000/graphqlhttp://localhost:3000/restDemo login: [email protected] / [email protected]
Important: You cannot edit the source code inside the Docker container since it uses a pre-built image. For development, you need to run Twenty from source as described above.
These pages may help:
but i want set up twenty manage src and up to server with domain
• https://docs.twenty.com/developers/introduction
• https://docs.twenty.com/developers/self-host/capabilities/cloud-providers
• https://docs.twenty.com/l/es/developers/introduction
• https://docs.twenty.com/l/es/developers/self-host/capabilities/cloud-providers
• https://docs.twenty.com/l/fr/developers/introduction
• https://docs.twenty.com/l/fr/developers/self-host/capabilities/cloud-providers
• https://docs.twenty.com/l/ja/developers/self-host/capabilities/cloud-providers
• https://docs.twenty.com/l/ko/developers/self-host/capabilities/cloud-providers
• https://docs.twenty.com/l/pt/developers/self-host/capabilities/cloud-providers
• https://docs.twenty.com/l/zh/developers/self-host/capabilities/cloud-providers
I understand now. You want to:
The documentation does not cover building a custom Docker image from modified source code. However, here is the general approach:
1. Clone the repository on your server:
git clone https://github.com/twentyhq/twenty.git
cd twenty
2. Make your code changes in the relevant packages:
packages/twenty-front/ - Frontend (React)packages/twenty-server/ - Backend (NestJS)3. Build your own Docker image:
cd packages/twenty-docker
docker build -t my-twenty:latest .
4. Update your docker-compose.yml to use your custom image:
# Change from:
image: twentycrm/twenty:${TAG}
# To:
image: my-twenty:latest
5. Restart:
docker compose down
docker compose up -d
If you want to actively develop and test changes, run Twenty from source instead of Docker:
1. Install prerequisites:
nvm)corepack enable)2. Clone and setup:
git clone https://github.com/twentyhq/twenty.git
cd twenty
yarn
3. Configure environment files:
cp ./packages/twenty-front/.env.example ./packages/twenty-front/.env
cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env
4. Setup database and start:
npx nx database:reset twenty-server
npx nx start twenty-server
npx nx start twenty-front
The documentation does not provide detailed instructions for building custom Docker images from source. You may want to check the GitHub repository or ask in the Twenty Discord for more specific guidance on production deployment of modified source code.
These pages may help:
i have an db image in docker hub and i want use it
You can use your own database image by modifying the docker-compose.yml file.
1. Open your docker-compose.yml:
nano ~/twenty/docker-compose.yml
2. Find the db service section and change the image:
db:
image: your-dockerhub-username/your-db-image:tag
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${PG_DATABASE_USER}
POSTGRES_PASSWORD: ${PG_DATABASE_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_DATABASE_USER} -d default"]
interval: 5s
timeout: 5s
retries: 5
restart: always
Replace your-dockerhub-username/your-db-image:tag with your actual Docker Hub image.
3. Update .env if needed to match your database credentials:
PG_DATABASE_USER=your_db_user
PG_DATABASE_PASSWORD=your_db_password
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
4. Reset and restart:
docker compose down --volumes
docker compose up -d
Important: Your database image must be PostgreSQL-compatible since Twenty requires PostgreSQL. If your image has a different database name or user, make sure to update the .env file accordingly.
What is your Docker Hub image name? I can help you configure it correctly.
i go Local Development Setup and use db image in docker hub, how can i do
Here is how to set up Twenty for local development using your Docker Hub database image:
1. Install prerequisites:
# Install nvm if not already installed
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# Close and reopen terminal, then:
nvm install 24.5.0
nvm use 24.5.0
corepack enable
2. Clone the repository:
git clone https://github.com/twentyhq/twenty.git
cd twenty
3. Start your Docker Hub database image:
docker run -d \
--name twenty-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-p 5432:5432 \
your-dockerhub-username/your-db-image:tag
Replace your-dockerhub-username/your-db-image:tag with your actual image name.
4. Start Redis via Docker:
make redis-on-docker
Or run Redis manually:
docker run -d --name twenty-redis -p 6379:6379 redis
5. Create the required databases:
docker exec -it twenty-postgres psql -U postgres -c "CREATE DATABASE \"default\";" -c "CREATE DATABASE test;"
6. Copy environment files:
cp ./packages/twenty-front/.env.example ./packages/twenty-front/.env
cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env
7. Update ./packages/twenty-server/.env to point to your database:
PG_DATABASE_URL=postgres://postgres:postgres@localhost:5432/default
REDIS_URL=redis://localhost:6379
8. Install dependencies:
yarn
9. Set up the database and start:
npx nx database:reset twenty-server
npx nx start twenty-server
npx nx worker twenty-server
npx nx start twenty-front
Or start all at once:
npx nx start
10. Access Twenty:
http://localhost:3001http://localhost:3000[email protected] / [email protected]What is your Docker Hub database image name? I can help you adjust the configuration if needed.
my image is vanvo13065/twenty-app20-custom and vanvo13065/twenty-db20-custom
You have both a custom app image and a custom database image. Here is how to set them up:
If you want to deploy your custom images to your server with your domain:
1. Update your docker-compose.yml:
version: '3.8'
services:
db:
image: vanvo13065/twenty-db20-custom
volumes:
- db-data:/var/lib/postgresql/data
environment:
POSTGRES_USER: ${PG_DATABASE_USER}
POSTGRES_PASSWORD: ${PG_DATABASE_PASSWORD}
healthcheck:
test: ["CMD-SHELL", "pg_isready -U ${PG_DATABASE_USER} -d default"]
interval: 5s
timeout: 5s
retries: 5
restart: always
redis:
image: redis
healthcheck:
test: ["CMD", "redis-cli", "ping"]
interval: 5s
timeout: 5s
retries: 5
restart: always
server:
image: vanvo13065/twenty-app20-custom
depends_on:
db:
condition: service_healthy
redis:
condition: service_healthy
environment:
PG_DATABASE_URL: postgres://${PG_DATABASE_USER}:${PG_DATABASE_PASSWORD}@${PG_DATABASE_HOST}:${PG_DATABASE_PORT}/default
SERVER_URL: ${SERVER_URL}
REDIS_URL: ${REDIS_URL}
APP_SECRET: ${APP_SECRET}
STORAGE_TYPE: ${STORAGE_TYPE}
ports:
- "3000:3000"
healthcheck:
test: ["CMD", "curl", "-f", "http://localhost:3000/healthz"]
interval: 5s
timeout: 5s
retries: 10
restart: always
worker:
image: vanvo13065/twenty-app20-custom
depends_on:
server:
condition: service_healthy
environment:
PG_DATABASE_URL: postgres://${PG_DATABASE_USER}:${PG_DATABASE_PASSWORD}@${PG_DATABASE_HOST}:${PG_DATABASE_PORT}/default
SERVER_URL: ${SERVER_URL}
REDIS_URL: ${REDIS_URL}
APP_SECRET: ${APP_SECRET}
STORAGE_TYPE: ${STORAGE_TYPE}
command: ["yarn", "worker:prod"]
restart: always
volumes:
db-data:
2. Your .env stays the same:
TAG=latest
PG_DATABASE_USER=postgres
PG_DATABASE_PASSWORD=MySecurePassword123
PG_DATABASE_HOST=db
PG_DATABASE_PORT=5432
REDIS_URL=redis://redis:6379
SERVER_URL=http://crmdemo.net:3000
APP_SECRET=your_hex_secret_here
STORAGE_TYPE=local
**3. Reset and start:**
```bash
docker compose down --volumes
docker compose up -d
If you want to develop locally and edit source code:
1. Start your custom database:
docker run -d \
--name twenty-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-p 5432:5432 \
vanvo13065/twenty-db20-custom
2. Start Redis:
docker run -d --name twenty-redis -p 6379:6379 redis
3. Clone and setup Twenty source:
git clone https://github.com/twentyhq/twenty.git
cd twenty
yarn
4. Configure ./packages/twenty-server/.env:
PG_DATABASE_URL=postgres://postgres:postgres@localhost:5432/default
REDIS_URL=redis://localhost:6379
5. Start development servers:
npx nx database:reset twenty-server
npx nx start twenty-server
npx nx start twenty-front
Which option do you want to use? And does your vanvo13065/twenty-db20-custom image already have the Twenty database schema, or is it a fresh PostgreSQL image?
how to down image in docker hub to docker server
To pull (download) your images from Docker Hub to your server:
Pull your images:
docker pull vanvo13065/twenty-app20-custom
docker pull vanvo13065/twenty-db20-custom
Verify they are downloaded:
docker images
You should see both images listed.
If your images are private, you need to login first:
docker login
Enter your Docker Hub username (vanvo13065) and password.
Then pull the images:
docker pull vanvo13065/twenty-app20-custom
docker pull vanvo13065/twenty-db20-custom
After pulling, you can use them in your docker-compose.yml as shown in my previous message, then run:
docker compose up -d
i downladed my image to docker server it is : vanvo13065/twenty-db20-custom:v1 and vanvo13065/twenty-app20-custom:v1
Countinue Option 2: Local Development with Your DB Image
Your images are downloaded. Now let's set up local development with your custom DB image.
1. Start your custom database:
docker run -d \
--name twenty-postgres \
-e POSTGRES_USER=postgres \
-e POSTGRES_PASSWORD=postgres \
-p 5432:5432 \
vanvo13065/twenty-db20-custom:v1
2. Start Redis:
docker run -d --name twenty-redis -p 6379:6379 redis
3. Verify both containers are running:
docker ps
4. Install Node.js and Yarn:
# Install nvm
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/master/install.sh | bash
# Reload terminal
source ~/.bashrc
# Install and use Node v24.5.0
nvm install 24.5.0
nvm use 24.5.0
# Enable yarn
corepack enable
5. Clone Twenty source code:
git clone https://github.com/twentyhq/twenty.git
cd twenty
6. Copy environment files:
cp ./packages/twenty-front/.env.example ./packages/twenty-front/.env
cp ./packages/twenty-server/.env.example ./packages/twenty-server/.env
7. Edit ./packages/twenty-server/.env:
nano ./packages/twenty-server/.env
Set these values:
PG_DATABASE_URL=postgres://postgres:postgres@localhost:5432/default
REDIS_URL=redis://localhost:6379
APP_SECRET=your_hex_secret_here
Generate APP_SECRET with:
openssl rand -hex 32
8. Install dependencies:
yarn
9. Set up database and start:
npx nx database:reset twenty-server
npx nx start twenty-server
npx nx worker twenty-server
npx nx start twenty-front
Access Twenty:
http://localhost:3001http://localhost:3000[email protected] / [email protected]Now you can edit the source code in:
packages/twenty-front/ - Frontendpackages/twenty-server/ - BackendChanges will hot-reload automatically.
Let me know when you complete each step or if you hit any errors.
root@cs-linux-20260113172059287:~/twenty# docker images
i Info → U In Use
IMAGE ID DISK USAGE CONTENT SIZE EXTRA
redis:latest 73dad4271642 203MB 55.4MB U
vanvo13065/twenty-app20-custom:v1 2129d75738e9 2.22GB 329MB
vanvo13065/twenty-db20-custom:v1 987b85d2b9c4 397MB 110MB U
root@cs-linux-20260113172059287:~/twenty# docker run -d
--name twenty-postgres
-e POSTGRES_USER=postgres
-e POSTGRES_PASSWORD=postgres
-p 5432:5432
vanvo13065/twenty-db20-custom:v1
docker: Error response from daemon: Conflict. The container name "/twenty-postgres" is already in use by container "095c9ee70115d0bcc91cbe9e2fac29c96a9f580f35379c70dc0afe3ee7e09b35". You have to remove (or rename) that container to be able to reuse that name.
Run 'docker run --help' for more information
root@cs-linux-20260113172059287:~/twenty# docker run -d --name twenty-redis -p 6379:6379 redis
docker: Error response from daemon: Conflict. The container name "/twenty-redis" is already in use by container "b5621a99b30830fcbeb6090d8fc585797936a02c967fb5e5a3823ba19aa15d0c". You have to remove (or rename) that container to be able to reuse that name.
Run 'docker run --help' for more information