First time installing? Follow the Docker Compose installation guide to get Twenty running, then return here for configuration.
Twenty offers two configuration modes to suit different deployment needs:
Admin panel access: Only users with admin privileges (canAccessFullAdminPanel: true
) can access the configuration interface.
IS_CONFIG_VARIABLES_IN_DB_ENABLED=true # default
Most configuration happens through the UI after installation:
http://localhost:3000
)Multi-Container Deployments: When using database configuration (IS_CONFIG_VARIABLES_IN_DB_ENABLED=true
), both server and worker containers read from the same database. Admin panel changes affect both automatically, eliminating the need to duplicate environment variables between containers (except for infrastructure variables).
What you can configure through the admin panel:
Some configuration requires setting in .env: Infrastructure like database connections (PG_DATABASE_URL
), server URLs (SERVER_URL
), and app secrets (APP_SECRET
) can only be configured via .env
file.
Those configurations are marked as isEnvOnly: true
in the source code.
IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
All configuration managed through .env
files:
IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
in your .env
file.env
filehttps://<your-domain>/auth/google/redirect
(for SSO)https://<your-domain>/auth/google-apis/get-access-token
(for integrations)MESSAGING_PROVIDER_GMAIL_ENABLED=true
CALENDAR_PROVIDER_GOOGLE_ENABLED=true
AUTH_GOOGLE_CLIENT_ID=<client-id>
AUTH_GOOGLE_CLIENT_SECRET=<client-secret>
AUTH_GOOGLE_CALLBACK_URL=https://<your-domain>/auth/google/redirect
AUTH_GOOGLE_APIS_CALLBACK_URL=https://<your-domain>/auth/google-apis/get-access-token
Environment-only mode: If you set IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
, add these variables to your .env
file instead.
Required scopes (automatically configured): See relevant source code
https://www.googleapis.com/auth/calendar.events
https://www.googleapis.com/auth/gmail.readonly
https://www.googleapis.com/auth/profile.emails.read
If your app is in test mode, you will need to add test users to your project.
Under OAuth consent screen, add your test users to the "Test users" section.
Users must have a Microsoft 365 Licence to be able to use the Calendar and Messaging API. They will not be able to sync their account on Twenty without one.
You will need to create a project in Microsoft Azure and get the credentials.
On Microsoft Azure Console enable the following APIs in "Permissions":
Note: "Mail.ReadWrite" and "Mail.Send" are only mandatory if you want to send emails using our workflow actions. You can use "Mail.Read" instead if you only want to receive emails.
You need to add the following redirect URIs to your project:
https://<your-domain>/auth/microsoft/redirect
if you want to use Microsoft SSOhttps://<your-domain>/auth/microsoft-apis/get-access-token
MESSAGING_PROVIDER_MICROSOFT_ENABLED=true
CALENDAR_PROVIDER_MICROSOFT_ENABLED=true
AUTH_MICROSOFT_ENABLED=true
AUTH_MICROSOFT_CLIENT_ID=<client-id>
AUTH_MICROSOFT_CLIENT_SECRET=<client-secret>
AUTH_MICROSOFT_CALLBACK_URL=https://<your-domain>/auth/microsoft/redirect
AUTH_MICROSOFT_APIS_CALLBACK_URL=https://<your-domain>/auth/microsoft-apis/get-access-token
Environment-only mode: If you set IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
, add these variables to your .env
file instead.
If your app is in test mode, you will need to add test users to your project.
Add your test users to the "Users and groups" section.
After configuring Gmail, Google Calendar, or Microsoft 365 integrations, you need to start the background jobs that sync data.
Register the following recurring jobs in your worker container:
# from your worker container
yarn command:prod cron:messaging:messages-import
yarn command:prod cron:messaging:message-list-fetch
yarn command:prod cron:calendar:calendar-event-list-fetch
yarn command:prod cron:calendar:calendar-events-import
yarn command:prod cron:messaging:ongoing-stale
yarn command:prod cron:calendar:ongoing-stale
yarn command:prod cron:workflow:automated-cron-trigger
You will need to provision an App Password.
Environment-only mode: If you set IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
, add these variables to your .env
file instead.