mirror of
https://github.com/twentyhq/twenty
synced 2026-04-21 13:37:22 +00:00
Created by Github action --------- Co-authored-by: Abdul Rahman <ar5438376@gmail.com> Co-authored-by: Crowdin Bot <support+bot@crowdin.com> Co-authored-by: github-actions <github-actions@twenty.com> Co-authored-by: Charles Bochet <charles@twenty.com>
251 lines
No EOL
9.3 KiB
Text
251 lines
No EOL
9.3 KiB
Text
---
|
|
title: Opsætning
|
|
image: /images/user-guide/table-views/table.png
|
|
---
|
|
|
|
<Frame>
|
|
<img src="/images/user-guide/table-views/table.png" alt="Header" />
|
|
</Frame>
|
|
|
|
import OptionTable from '@site/src/theme/OptionTable'
|
|
|
|
# Konfigurationsadministration
|
|
|
|
<Warning>
|
|
**First time installing?** Follow the [Docker Compose installation guide](https://docs.twenty.com/l/da/developers/self-hosting/docker-compose) to get Twenty running, then return here for configuration.
|
|
</Warning>
|
|
|
|
Twenty tilbyder **to konfigurationsmetoder** til at opfylde forskellige implementeringsbehov:
|
|
|
|
**Adgang til administratorpanelet:** Kun brugere med adminrettigheder (`canAccessFullAdminPanel: true`) kan få adgang til konfigurationsinterfacet.
|
|
|
|
## 1. Konfiguration af Admin Panel (Standard)
|
|
|
|
```bash
|
|
IS_CONFIG_VARIABLES_IN_DB_ENABLED=true # default
|
|
```
|
|
|
|
**De fleste konfigurationer foretages via brugerfladen** efter installationen:
|
|
|
|
1. Få adgang til din Twenty-instans (normalt `http://localhost:3000`)
|
|
2. Gå til **Indstillinger / Admin Panel / Konfigurationsvariabler**
|
|
3. Konfigurer integrationer, email, opbevaring og mere
|
|
4. Ændringer træder i kraft med det samme (inden for 15 sekunder for multi-container implementeringer)
|
|
|
|
<Warning>
|
|
**Multi-Container Implementeringer:** Når du bruger databasekonfiguration (`IS_CONFIG_VARIABLES_IN_DB_ENABLED=true`), læser både server- og arbejdskontainere fra den samme database. Ændringer i adminpanelet påvirker begge automatisk, hvilket eliminerer behovet for at duplikere miljøvariabler mellem containerne (undtagen for infrastrukturspecifikke variabler).
|
|
</Warning>
|
|
|
|
**Hvad du kan konfigurere via adminpanelet:**
|
|
|
|
- **Autentificering** - Google/Microsoft OAuth, adgangskodeindstillinger
|
|
- **E-mail** - SMTP-indstillinger, skabeloner, verifikation
|
|
- **Opbevaring** - S3-konfiguration, lokale opbevaringsstier
|
|
- **Integrationer** - Gmail, Google Kalender, Microsoft-tjenester
|
|
- **Workflow & Rate Limiting** - Execution limits, API throttling
|
|
- **Og meget mere...**
|
|
|
|

|
|
|
|
<Warning>
|
|
Hver variabel dokumenteres med beskrivelser i dit adminpanel under **Indstillinger → Admin Panel → Konfigurationsvariabler**.
|
|
Nogle infrastrukturspecifikke indstillinger som databaseforbindelser (`PG_DATABASE_URL`), server-URL'er (`SERVER_URL`) og apphemmeligheder (`APP_SECRET`) kan kun konfigureres via `.env` filen.
|
|
|
|
[Complete technical reference →](https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/core-modules/twenty-config/config-variables.ts) </Warning>
|
|
|
|
## 2. Kun Miljø Konfiguration
|
|
|
|
```bash
|
|
IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
|
|
```
|
|
|
|
**Al konfiguration administreres gennem `.env` filer:**
|
|
|
|
1. Sæt `IS_CONFIG_VARIABLES_IN_DB_ENABLED=false` i din `.env` fil
|
|
2. Tilføj alle konfigurationsvariabler til din `.env` fil
|
|
3. Genstart containere for at ændringer kan træde i kraft
|
|
4. Adminpanelet vil vise aktuelle værdier, men kan ikke ændre dem
|
|
|
|
## Gmail & Google Kalender Integration
|
|
|
|
### Opret Google Cloud Projekt
|
|
|
|
1. Gå til [Google Cloud Console](https://console.cloud.google.com/)
|
|
2. Opret et nyt projekt eller vælg et eksisterende
|
|
3. Aktivér disse API'er:
|
|
|
|
- [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com)
|
|
- [Google Kalender API](https://console.cloud.google.com/apis/library/calendar-json.googleapis.com)
|
|
- [People API](https://console.cloud.google.com/apis/library/people.googleapis.com)
|
|
|
|
### Konfigurer OAuth
|
|
|
|
1. Gå til [Godkendelser](https://console.cloud.google.com/apis/credentials)
|
|
2. Opret OAuth 2.0 Klient ID
|
|
3. Tilføj disse omdirigerings-URI'er:
|
|
- `https://{your-domain}/auth/google/redirect` (for SSO)
|
|
- `https://{your-domain}/auth/google-apis/get-access-token` (for integrations)
|
|
|
|
### Konfigurer i Twenty
|
|
|
|
1. Gå til **Indstillinger → Admin Panel → Konfigurationsvariabler**
|
|
2. Find sektionen **Google Auth**
|
|
3. Indstil disse variabler:
|
|
- `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`
|
|
|
|
<Warning>
|
|
**Environment-only mode:** If you set `IS_CONFIG_VARIABLES_IN_DB_ENABLED=false`, add these variables to your `.env` file instead.
|
|
</Warning>
|
|
|
|
**Nødvendige scope** (automatisk konfigureret):
|
|
[Se relevant kildekode](https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/core-modules/auth/utils/get-google-apis-oauth-scopes.ts#L4-L10)
|
|
|
|
- `https://www.googleapis.com/auth/calendar.events`
|
|
- `https://www.googleapis.com/auth/gmail.readonly`
|
|
- `https://www.googleapis.com/auth/profile.emails.read`
|
|
|
|
### Hvis din app er i testtilstand
|
|
|
|
Hvis din app er i testtilstand, skal du tilføje testbrugere til dit projekt.
|
|
|
|
Under [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent), add your test users to the "Test users" section.
|
|
|
|
## Microsoft 365 Integration
|
|
|
|
<Warning>
|
|
Brugere skal have en [Microsoft 365 Licens](https://admin.microsoft.com/Adminportal/Home) for at kunne bruge Kalender- og Messaging-API. De vil ikke kunne synkronisere deres konto på Twenty uden en.
|
|
</Warning>
|
|
|
|
### Opret et projekt i Microsoft Azure
|
|
|
|
Du skal oprette et projekt i [Microsoft Azure](https://portal.azure.com/#view/Microsoft_AAD_IAM/AppGalleryBladeV2) og få legitimationsoplysningerne.
|
|
|
|
### Aktivér API'er
|
|
|
|
På Microsoft Azure-konsollen aktiver disse API'er i "Tilladelser":
|
|
|
|
- Microsoft Graph: Mail.ReadWrite
|
|
- Microsoft Graph: Mail.Send
|
|
- Microsoft Graph: Kalendere.Læs
|
|
- Microsoft Graph: Bruger.Læs
|
|
- Microsoft Graph: openid
|
|
- Microsoft Graph: email
|
|
- Microsoft Graph: profil
|
|
- Microsoft Graph: offline_access
|
|
|
|
Bemærk: "Mail.ReadWrite" og "Mail.Send" er kun obligatoriske, hvis du vil sende emails ved hjælp af vores workflow-handlinger. Du kan bruge "Mail.Read" i stedet, hvis du kun ønsker at modtage emails.
|
|
|
|
### Autoriserede omdirigerings-URI'er
|
|
|
|
Du skal tilføje følgende omdirigerings-URI'er til dit projekt:
|
|
|
|
- `https://{your-domain}/auth/microsoft/redirect` if you want to use Microsoft SSO
|
|
- `https://{your-domain}/auth/microsoft-apis/get-access-token`
|
|
|
|
### Konfigurer i Twenty
|
|
|
|
1. Gå til **Indstillinger → Admin Panel → Konfigurationsvariabler**
|
|
2. Find sektionen **Microsoft Auth**
|
|
3. Indstil disse variabler:
|
|
- `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`
|
|
|
|
<Warning>
|
|
**Environment-only mode:** If you set `IS_CONFIG_VARIABLES_IN_DB_ENABLED=false`, add these variables to your `.env` file instead.
|
|
</Warning>
|
|
|
|
### Configure scopes
|
|
|
|
[Se relevant kildekode](https://github.com/twentyhq/twenty/blob/main/packages/twenty-server/src/engine/core-modules/auth/utils/get-microsoft-apis-oauth-scopes.ts#L2-L9)
|
|
|
|
- 'openid'
|
|
- 'e-mail'
|
|
- 'profil'
|
|
- 'offline_access'
|
|
- 'Mail.ReadWrite'
|
|
- 'Mail.Send'
|
|
- 'Calendars.Read'
|
|
|
|
### Hvis din app er i testtilstand
|
|
|
|
Hvis din app er i testtilstand, skal du tilføje testbrugere til dit projekt.
|
|
|
|
Tilføj dine testbrugere i sektionen "Brugere og grupper".
|
|
|
|
## Baggrundsjob til Kalender & Messaging
|
|
|
|
Efter at have konfigureret Gmail, Google Kalender eller Microsoft 365 integrationer, skal du starte baggrundsjobbene, der synkroniserer data.
|
|
|
|
Registrer følgende tilbagevendende job i din arbejdskontainer:
|
|
|
|
```bash
|
|
# 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
|
|
```
|
|
|
|
## E-mail-konfiguration
|
|
|
|
1. Gå til **Indstillinger → Admin Panel → Konfigurationsvariabler**
|
|
2. Find sektionen **E-mail**
|
|
3. Konfigurer dine SMTP-indstillinger:
|
|
|
|
<ArticleTabs label1="Gmail" label2="Office365" label3="Smtp4dev">
|
|
|
|
<ArticleTab>
|
|
|
|
Du skal oprette en [App Adgangskode](https://support.google.com/accounts/answer/185833).
|
|
|
|
- EMAIL_DRIVER=smtp
|
|
- EMAIL_SMTP_HOST=smtp.gmail.com
|
|
- EMAIL_SMTP_PORT=465
|
|
- EMAIL_SMTP_USER=gmail_email_address
|
|
- EMAIL_SMTP_PASSWORD='gmail_app_password'
|
|
|
|
</ArticleTab>
|
|
|
|
<ArticleTab>
|
|
|
|
**smtp4dev** er en falsk SMTP-e-mailserver til udvikling og test.
|
|
|
|
- EMAIL_DRIVER=smtp
|
|
- EMAIL_SMTP_HOST=smtp.office365.com
|
|
- EMAIL_SMTP_PORT=587
|
|
- EMAIL_SMTP_USER=office365_email_address
|
|
- EMAIL_SMTP_PASSWORD='office365_password'
|
|
|
|
</ArticleTab>
|
|
|
|
<ArticleTab>
|
|
|
|
**smtp4dev** er en falsk SMTP-e-mailserver til udvikling og test.
|
|
|
|
- Kør smtp4dev-billedet: `docker run --rm -it -p 8090:80 -p 2525:25 rnwood/smtp4dev`
|
|
- Få adgang til smtp4dev brugerfladen her: [http://localhost:8090](http://localhost:8090)
|
|
- Indstil følgende variabler:
|
|
- EMAIL_DRIVER=smtp
|
|
- EMAIL_SMTP_HOST=localhost
|
|
- EMAIL_SMTP_PORT=2525
|
|
|
|
</ArticleTab>
|
|
|
|
</ArticleTabs>
|
|
|
|
<Warning>
|
|
**Environment-only mode:** If you set `IS_CONFIG_VARIABLES_IN_DB_ENABLED=false`, add these variables to your `.env` file instead.
|
|
</Warning> |