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
9.2 KiB
Plaintext
251 lines
9.2 KiB
Plaintext
---
|
|
title: Oppsett
|
|
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'
|
|
|
|
# Konfigurasjonsstyring
|
|
|
|
<Warning>
|
|
**First time installing?** Follow the [Docker Compose installation guide](https://docs.twenty.com/l/no/developers/self-hosting/docker-compose) to get Twenty running, then return here for configuration.
|
|
</Warning>
|
|
|
|
Twenty tilbyr **to konfigurasjonsmoduser** for å passe forskjellige distribusjonsbehov:
|
|
|
|
**Admin panel tilgang:** Bare brukere med administratortillatelser (`canAccessFullAdminPanel: true`) kan få tilgang til konfigurasjonsgrensesnittet.
|
|
|
|
## 1. Konfigurasjon av administrasjonspanel (Standard)
|
|
|
|
```bash
|
|
IS_CONFIG_VARIABLES_IN_DB_ENABLED=true # default
|
|
```
|
|
|
|
**Det meste av konfigurasjonen skjer via UI** etter installasjon:
|
|
|
|
1. Tilgang til din Twenty instans (vanligvis `http://localhost:3000`)
|
|
2. Gå til **Innstillinger / Admin Panel / Konfigurasjonsvariabler**
|
|
3. Konfigurer integrasjoner, e-post, lagring og mer
|
|
4. Endringer trer i kraft umiddelbart (innen 15 sekunder for flerbeholderdistribusjoner)
|
|
|
|
<Warning>
|
|
**Flerbeholderdistribusjoner:** Når du bruker databasekonfigurasjon (`IS_CONFIG_VARIABLES_IN_DB_ENABLED=true`), leser både server- og arbeidstakerbeholdere fra samme database. Endringer i administrasjonspanelet påvirker begge automatisk, og eliminerer behovet for å duplisere miljøvariabler mellom containere (unntatt for infrastrukturvariabler).
|
|
</Warning>
|
|
|
|
**Hva du kan konfigurere via administrasjonspanelet:**
|
|
|
|
- **Autentisering** - Google/Microsoft OAuth, passordinnstillinger
|
|
- **E-post** - SMTP-innstillinger, maler, verifisering
|
|
- **Lagring** - S3-konfigurasjon, lokale lagringsstier
|
|
- **Integrasjoner** - Gmail, Google Kalender, Microsoft-tjenester
|
|
- **Arbeidsflyt & Fartbegrensning** - Utførelsesbegrensninger, API-throttling
|
|
- **Og mye mer...**
|
|
|
|

|
|
|
|
<Warning>
|
|
Hver variabel er dokumentert med beskrivelser i ditt admin panel under **Innstillinger → Admin Panel → Konfigurasjonsvariabler**.
|
|
Some infrastructure settings like database connections (`PG_DATABASE_URL`), server URLs (`SERVER_URL`), and app secrets (`APP_SECRET`) can only be configured via `.env` file.
|
|
|
|
[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økonfigurasjon
|
|
|
|
```bash
|
|
IS_CONFIG_VARIABLES_IN_DB_ENABLED=false
|
|
```
|
|
|
|
**All konfigurasjon håndtert gjennom `.env`-filer:**
|
|
|
|
1. Sett `IS_CONFIG_VARIABLES_IN_DB_ENABLED=false` i din `.env`-fil
|
|
2. Legg til alle konfigurasjonsvariabler i din `.env`-fil
|
|
3. Start containere på nytt for at endringer skal tre i kraft
|
|
4. Admin panel vil vise gjeldende verdier, men kan ikke modifisere dem
|
|
|
|
## Gmail & Google Kalender Integrasjon
|
|
|
|
### Opprett Google Cloud Prosjekt
|
|
|
|
1. Gå til [Google Cloud Console](https://console.cloud.google.com/)
|
|
2. Opprett et nytt prosjekt eller velg et eksisterende
|
|
3. Aktiver disse API-ene:
|
|
|
|
- [Gmail API](https://console.cloud.google.com/apis/library/gmail.googleapis.com)
|
|
- [Google Calendar 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 [Credentials](https://console.cloud.google.com/apis/credentials)
|
|
2. Opprett OAuth 2.0 Klient-ID
|
|
3. Legg til disse omdirigerings-URI-ene:
|
|
- `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 **Innstillinger → Admin Panel → Konfigurasjonsvariabler**
|
|
2. Finn seksjonen **Google Auth**
|
|
3. Angi disse variablene:
|
|
- `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>
|
|
|
|
**Påkrevde omfang** (automatisk konfigurert):
|
|
[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 appen din er i testmodus
|
|
|
|
Hvis appen din er i testmodus, må du legge til testbrukere til prosjektet ditt.
|
|
|
|
Under [OAuth consent screen](https://console.cloud.google.com/apis/credentials/consent), add your test users to the "Test users" section.
|
|
|
|
## Microsoft 365 Integrasjon
|
|
|
|
<Warning>
|
|
Brukere må ha en [Microsoft 365 Lisens](https://admin.microsoft.com/Adminportal/Home) for å kunne bruke Kalender og Meldings API. De vil ikke kunne synkronisere sin konto på Twenty uten en.
|
|
</Warning>
|
|
|
|
### Opprett et prosjekt i Microsoft Azure
|
|
|
|
Du må opprette et prosjekt i [Microsoft Azure](https://portal.azure.com/#view/Microsoft_AAD_IAM/AppGalleryBladeV2) og få legitimasjonen.
|
|
|
|
### Aktiver API-er
|
|
|
|
På Microsoft Azure Console aktiver følgende API-er i "Tillatelser":
|
|
|
|
- Microsoft Graph: Mail.ReadWrite
|
|
- Microsoft Graph: Mail.Send
|
|
- Microsoft Graph: Calendars.Read
|
|
- Microsoft Graph: User.Read
|
|
- Microsoft Graph: openid
|
|
- Microsoft Graph: email
|
|
- Microsoft Graph: profil
|
|
- Microsoft Graph: offline_access
|
|
|
|
Merk: "Mail.ReadWrite" og "Mail.Send" er bare obligatorisk hvis du vil sende e-poster med våre arbeidsflyt handlinger. Du kan bruke "Mail.Read" i stedet hvis du bare vil motta e-poster.
|
|
|
|
### Autoriserte omdirigerings-URI-er
|
|
|
|
Du må legge til følgende omdirigerings-URI-er i prosjektet ditt:
|
|
|
|
- `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 **Innstillinger → Admin Panel → Konfigurasjonsvariabler**
|
|
2. Finn seksjonen **Microsoft Auth**
|
|
3. Angi disse variablene:
|
|
- `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>
|
|
|
|
### Konfigurer omfang
|
|
|
|
[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-post'
|
|
- 'profil'
|
|
- 'offline_access'
|
|
- 'Mail.ReadWrite'
|
|
- 'Mail.Send'
|
|
- 'Calendars.Read'
|
|
|
|
### Hvis appen din er i testmodus
|
|
|
|
Hvis appen din er i testmodus, må du legge til testbrukere til prosjektet ditt.
|
|
|
|
Legg til testbrukerne dine i seksjonen "Brukere og grupper".
|
|
|
|
## Bakgrunnsjobber for Kalender & Meldinger
|
|
|
|
Etter å ha konfigurert Gmail, Google Kalender eller Microsoft 365-integrasjoner, må du starte bakgrunnsjobbene som synkroniserer data.
|
|
|
|
Registrer de følgende gjentakende jobbene i din arbeiderbeholder:
|
|
|
|
```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-postkonfigurasjon
|
|
|
|
1. Gå til **Innstillinger → Admin Panel → Konfigurasjonsvariabler**
|
|
2. Finn seksjonen **E-post**
|
|
3. Konfigurer dine SMTP-innstillinger:
|
|
|
|
<ArticleTabs label1="Gmail" label2="Office365" label3="Smtp4dev">
|
|
|
|
<ArticleTab>
|
|
|
|
Du må skaffe et [App Password](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-postserver for utvikling og testing.
|
|
|
|
- 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-postserver for utvikling og testing.
|
|
|
|
- Kjør smtp4dev-bildet: `docker run --rm -it -p 8090:80 -p 2525:25 rnwood/smtp4dev`
|
|
- Tilgang til smtp4dev ui her: [http://localhost:8090](http://localhost:8090)
|
|
- Sett de følgende variablene:
|
|
- 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> |