# Configuring the .env File

Source: https://help.sendent.com/sendent-nextcloud-workspace/nextcloud-for-exchange/configuring-the-env-file

The **Nextcloud Exchange Connector** is entirely configuration-driven. This reference guide explains every parameter available to customize the synchronization behavior, performance limits, and connectivity of your application.

**Tip:** This configuration guide is extensive. To quickly find a specific parameter from your `.env` file, use your browser's search function (**Ctrl + F** or **Cmd + F**) and enter the variable name.



**Warning: Strict File Naming**

Your configuration file must be named exactly **“.env”** (an empty filename with an `.env` extension). Naming the file `settings.env` or anything else will cause the application to fail to read the configuration.



**Warning: Escaping Special Characters in Docker**

When configuring passwords, connection strings, or secrets in your `.env` file, be aware of Docker's character constraints. Specifically, the dollar sign `$`) is reserved for variable interpolation. If your actual password contains a literal `$`, you **must** escape it by doubling the character (e.g., a password of `Pa$word` must be written as `Pa$$word` in the `.env` file).

**Failure to escape this will cause Docker to drop the character, resulting in severe authentication errors.**



### Configuration Strategy: Minimal vs. Full

To simplify deployments, it is recommended to build your `.env` file based on your needs:

- [**Minimal Config for Docker deployment (Single Instance)**](#min-docker-env-example)
- [**Full Config for Docker deployment (Multi-Instance)**](#full-docker-env-example)
- [**Minimal Config for Binary deployment (Single Instance)**](#min-binary-env-example)
- [**Full Config for Binary deployment (Multi-Instance)**](#full-binary-env-example)

## Configuration Reference

### Service Configuration

These settings control the core behavior, identification, and scheduling of the synchronization instances.

| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `Service__IsPrimary` | **Meaning:** Dictates if this instance is the primary synchronization coordinator.     **Usage:** Exactly one instance must be set to `true`. All secondary replicas or workers must be `false`. | `true` | Docker, Binary |
| `Service__DeploymentType` | **Meaning:** Specifies the hosting method.     **Usage:** Set to `0` for Docker or `1` for Binary deployments. | `0` | Docker, Binary |
| `Service__AspNetCoreUrl` | **Meaning:** The internal port and URL for the application.  **Usage:** Must be unique for every instance running on the same host to prevent port collisions. | `http://localhost:5001` | Binary |
| `Service__DefaultWorkerName` | **Meaning:** The unique identifier for the instance.  **Usage:** Used in logs and database tracking to identify which worker processed a task. | `"SendentWorker-1"` | Docker, Binary |
| `Service__BatchLimit` | **Meaning:** Maximum number of elements per EWS request.     **Usage:** Prevents overloading the Exchange server with excessively large single payloads. | `50` | Docker, Binary |
| `Service__WorkerIntervalSeconds` | **Meaning:** The sleep interval between global application runs.     **Usage:** Determines how often the application checks the database for new users to process. | `120` | Docker, Binary |
| `Service__SyncIntervalInSeconds` | **Meaning:** The standard cooldown delay before a specific user is scheduled for their next sync.     **Usage:** Prevents continuous looping on the same user. | `60` | Docker, Binary |
| `Service__CriticalSyncIntervalInSeconds` | **Meaning:** The retry delay for users whose synchronization failed.     **Usage:** Gives the system time to recover before retrying a broken sync. | `100` | Docker, Binary |
| `Service__BatchSaveSize` | **Meaning:** Database transaction chunk size.     **Usage:** Maximum number of objects saved to the database in a single transaction. | `100` | Docker, Binary |
| `Service__StartWeekend` | **Meaning:** Defines the day that marks the start of the weekend.  **Usage:** Used in calendar logic (1 = Monday, 6 = Saturday, 7 = Sunday). | `6` | Docker, Binary |
| `Service__SyncMode` | **Meaning:** Declares which data entities are synchronized.     **Usage:** Bitwise value (`1`=Calendars, `2`=Contacts). Sum them up to combine (e.g., `3` for Calendars + Contacts). | `1` | Docker, Binary |
| `Service__SyncType` | **Meaning:** Level of detail for synchronization.     **Usage:** Set to `0` for Full sync (all data), or `1` for Sensitive sync (hides confidential details). | `1` | Docker, Binary |

**What is the difference between Full and Sensitive Sync?**

Synchronization modes determine the level of data privacy when transferring between calendars.

**Full Synchronization:**

- Absolutely everything is synced.
- NextCloud and Exchange fully map events, creating the missing entities on both servers.
- The comparison mechanism uses hash codes and modification dates to make update decisions.

**Sensitive Synchronization:**

*Nextcloud —&gt; Exchange:*

- All data related to identification is completely "scrubbed".
- Only the following data is kept: datetime, timezone, length, and reminder.
- Events are displayed in Exchange as empty slots ("dummies") for time booking without revealing details.

*Exchange —&gt; Nextcloud:*

- All event data is synced; however, the recipients list is forced into the appointment body.
- Events are marked in red for visual distinction.

In Sensitive Sync mode, **attachments are not synced** in either direction.



#### Pro Tip

When using Sensitive Sync, modifying events is only allowed in their **"native"** calendars. Any attempt to change the description or status of a NextCloud event via Exchange will be rejected, and the application will revert it to its original empty state. Similarly, attempts to modify Exchange events via NextCloud are blocked and reverted.





### Database Configuration

These settings connect the application to your storage backend.

| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `DatabaseConfiguration__DatabaseType` | **Meaning:** Selects the database provider.     **Usage:** `0`=Postgres, `1`=SqlServer, `2`=MariaDB, `3`=MySql. | `0` | Docker, Binary |
| `DatabaseConfiguration__DatabaseEncryptionKey` | **Meaning:** Secret key for encrypting sensitive data.     **Usage:** Used to encrypt Nextcloud app-tokens stored in the database. | `YourSuperSecretKey123!` | Docker, Binary |
| `DatabaseConfiguration__ConnectionString` | **Meaning:** The connection string to reach the database.     **Usage:** Format strictly depends on your chosen database provider. | `Host=postgres_db;Port=5432;...` | Docker, Binary |

### Nextcloud Configuration

These settings belong on the DAV sync client (Provider=Dav). They must match the Nextcloud URL, service account, and Shared Secret from the Sendent Sync app.

**Warning: Shared Secret Mismatch**

Your `EventSyncClients__1__Settings__SharedSecret` value **must exactly match** the shared secret generated in the Sendent Sync app within your Nextcloud web interface.



| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `EventSyncClients__1__Settings__BaseUrl` | **Meaning:** The Base URL of your Nextcloud instance.     **Usage:** Must include the protocol (http/https). | `https://cloud.example.com/` | Docker, Binary |
| `EventSyncClients__1__Settings__ServiceUsername` | **Meaning:** Username of the Nextcloud service account.     **Usage:** Used to authenticate API calls to Nextcloud. | `serviceAdmin` | Docker, Binary |
| `EventSyncClients__1__Settings__ServicePassword` | **Meaning:** Password of the Nextcloud service account.     **Usage:** Plaintext password or app-password for the admin. | `SecurePass123` | Docker, Binary |
| `EventSyncClients__1__Settings__SharedSecret` | **Meaning:** Cryptographic shared secret.     **Usage:** Used to securely transfer user consent tokens from Nextcloud to the connector. | `"my_secure_secret"` | Docker, Binary |

### Exchange Server Configuration

Optional admin-pool settings. The Exchange connection itself is configured on `EventSyncClients` in the next section.

| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `Service__ExchangeConfiguration__ExchangeTenantId` | **Meaning:** Microsoft tenant ID for the webhook path.  **Usage:** Optional. Calendar sync reads `TenantId` from the EWS/Graph client, not from this key. | `xxxx-xxxx-xxxx-xxxx` | Docker, Binary |
| `Service__ExchangeConfiguration__ExchangeAdminFile` | **Meaning:** Path to a JSON file of extra Exchange admin accounts.  **Usage:** Optional. Use only for an admin pool. Connection settings stay on `EventSyncClients`. | `admins.json` | Docker, Binary |
| Service\_\_ExchangeConfiguration\_\_ExchangeAdminRaw | **Meaning:** Same admin list as a JSON array in `.env`.  **Usage:** Optional alternative to `ExchangeAdminFile`. Do not put this key under `EventSyncClients__*__Settings`. | `[{"AppId":"...","ClientSecret":"..."}]` | Docker, Binary |

### Sync Clients

The connector syncs a pair of clients: one Exchange-side (`Ews` or `Graph`) and one Nextcloud-side (`Dav`). `Identifier` values must match `EventSync__Pairs`.

Indexes in the examples: `__0__` = Exchange (EWS or Graph), `__1__` = DAV.

Warning: `EventSyncClients__*__Settings__ExchangeOnPremUrl` and `ExchangeOnPremDomain` are invalid. On an on-premise EWS client the keys are `OnPremUrl` and `OnPremDomain`.



| Parameter | Meaning &amp; Usage | Example | Applies To |
|---|---|---|---|
| `EventSyncClients__0__Identifier` | **Meaning:** Name of the Exchange-side client.  **Usage:** Referenced by `EventSync__Pairs`. Use `ews` or `graph`. | `ews` | Docker, Binary |
| `EventSyncClients__0__Provider` | Meaning: Exchange-side stack. Usage: `Ews` or `Graph`. | `Ews` | Docker, Binary |
| `EventSyncClients__1__Identifier` | Meaning: Name of the Nextcloud client. Usage: Must match the pair target. | `dav` | Docker, Binary |
| `EventSyncClients__1__Provider` | Meaning: Nextcloud stack. Usage: Always `Dav`. | `Dav` | Docker, Binary |
| `EventSync__Pairs__0__SourceClientId` | Meaning: The Exchange-side client in the pair. Usage: Must match `EventSyncClients__0__Identifier`. | `ews` | Docker, Binary |
| `EventSync__Pairs__0__TargetClientId` | Meaning: The Nextcloud-side client in the pair. Usage: Must match `EventSyncClients__1__Identifier`. | `dav` | Docker, Binary |
| `EventSync__CalendarPriorityOrder__0` | Meaning: Highest-priority calendar source on conflict. Usage: Usually the same Identifier as the Exchange client. | `ews` | Docker, Binary |
| `EventSync__CalendarPriorityOrder__1` | Meaning: Fallback calendar source on conflict. Usage: Usually the DAV Identifier. | `dav` | Docker, Binary |

### Concurrency Configuration

These settings control the application's throughput and scaling behavior.

| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `Service__ConcurrencyConfiguration__MaxParallelProcessingUsers` | **Meaning:** Global limit of concurrent users processed per instance.     **Usage:** Prevents a single worker node from running out of RAM. | `10` | Docker, Binary |
| `Service__ConcurrencyConfiguration__MaxUsersPerAdmin` | **Meaning:** Maximum users processed concurrently by a single Exchange service account.     **Usage:** Prevents Microsoft Exchange from throttling your connections. | `10` | Docker, Binary |
| `Secondary_Replicas_Amount` | **Meaning:** The number of secondary containers to deploy automatically.     **Usage:** Scales your synchronization power. Ignored in Binary deployments. | `2` | Docker |

### EWS settings (`Provider=Ews`)

| Parameter | Meaning &amp; Usage | Example | Applies To |
|---|---|---|---|
| `EventSyncClients__0__Settings__ExchangeType` | **Meaning:** EWS environment.  **Usage:** `1`=Cloud (M365), `2`=OnPremKerberos, `3`=OnPremBasicAuth, `4`=OnPremADFS. Graph has no `ExchangeType`. | `1` | Docker, Binary |
| `EventSyncClients__0__Settings__TenantId` | **Meaning:** Microsoft Entra tenant ID.  **Usage:** EWS Cloud (`ExchangeType=1`) only. | `xxxx-xxxx-xxxx-xxxx` | Docker, Binary |
| `EventSyncClients__0__Settings__AppId` | **Meaning:** Entra application (client) ID.  **Usage:** EWS Cloud only. | `your-app-id` | Docker, Binary |
| `EventSyncClients__0__Settings__ClientSecret` | **Meaning:**  Entra client secret. Usage: EWS Cloud, or ADFS (`ExchangeType=4`). | `your-client-secret` | Docker, Binary |
| `EventSyncClients__0__Settings__OnPremUrl` | **Meaning:**  EWS endpoint URL.  **Usage:** On-premise EWS only (`ExchangeType=2/3/4`). Not `ExchangeOnPremUrl`. | `https://exchange.example.com/EWS/Exchange.asmx` | Docker, Binary |
| `EventSyncClients__0__Settings__OnPremDomain` | **Meaning:**  Active Directory domain of the service account.  **Usage:** Kerberos and BasicAuth (`ExchangeType=2/3`) only. | `example.com` | Docker, Binary |
| `EventSyncClients__0__Settings__UserName` | **Meaning:**  On-premise service account.  **Usage:** Kerberos and BasicAuth only. | `sync-admin` | Docker, Binary |
| `EventSyncClients__0__Settings__Password` | **Meaning:**  Password for that service account.  **Usage:** Kerberos and BasicAuth only. | `SecurePass123` | Docker, Binary |
| `EventSyncClients__0__Settings__OnPremAdfsAuthorityUrl` | **Meaning:**  ADFS authority URL.  **Usage:** ADFS (`ExchangeType=4`) only. | `https://adfs.example.com/adfs` | Docker, Binary |
| `EventSyncClients__0__Settings__ClientId` | **Meaning:**  ADFS client ID.  **Usage:** ADFS only. | `your-adfs-client-id` | Docker, Binary |

### Graph settings (`Provider=Graph`)

Use these instead of the EWS settings when the Exchange-side client is Graph. Do not set `ExchangeType`, `OnPremUrl`, or `OnPremDomain`.

| Parameter | Meaning &amp; Usage | Example | Applies To |
|---|---|---|---|
| `EventSyncClients__0__Settings__TenantId` | **Meaning:**  Microsoft Entra tenant ID.  **Usage:** Required for Graph. | `xxxx-xxxx-xxxx-xxxx` | Docker, Binary |
| `EventSyncClients__0__Settings__AppId` | **Meaning:**  Graph application (client) ID.  **Usage:**The Graph app registration, not the old EWS app. | `your-graph-app-id` | Docker, Binary |
| `EventSyncClients__0__Settings__ClientSecret` | **Meaning:** Graph client secret.  **Usage:** Required for Graph. | `your-graph-client-secret` | Docker, Binary |
| `EventSyncClients__0__Settings__OutlookTimeZone` | **Meaning:**  Timezone Graph uses for event start/end.  **Usage:** Optional. | `W. Europe Standard Time` | Docker, Binary |

DAV keys are in the Nextcloud Configuration table above.

### Specific Synchronization Configurations

| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `Service__FullSyncConfiguration__ProcessAttachments` | **Meaning:** Allows or disallows processing of attachments.     **Usage:** Applicable only when `Service__SyncType=0` (Full Sync). | `true` | Docker, Binary |
| `Service__SensitiveSyncConfiguration__SensitiveTitle` | **Meaning:** Custom title applied to events in Exchange.     **Usage:** Hides meeting details when `Service__SyncType=1` (Sensitive Sync). | `"Busy"` | Docker, Binary |
| `Service__SensitiveSyncConfiguration__SensitiveCategory` | **Meaning:** Custom category tag applied to events.     **Usage:** Categorizes events originating from Nextcloud in the user's Exchange calendar. | `"Nextcloud Sync"` | Docker, Binary |

### Logging &amp; Monitoring Configuration

These settings control how and where the application outputs health and debug data.

**Warning: Grafana Security**

If you choose to enable Grafana logging (`Service__LoggingConfiguration__LogsOutput` includes value `8`), be aware that the Grafana web interface is designed to run securely within the **local host machine only**.

It is intentionally not exposed or forwarded to external networks.



| **Parameter** | **Meaning &amp; Usage** | **Example** | **Applies To** |
|---|---|---|---|
| `Serilog__MinimumLevel__Default` | **Meaning:** The global log verbosity level.     **Usage:** Acceptable values are `Debug`, `Information`,`Warning`, `Error`.  The default value is `In`. Change to `Debug` only if requested by Sendent Support. | `Error` | Docker, Binary |
| `Service__LoggingConfiguration__LogsOutput` | **Meaning:** Determines where logs are stored (Bitwise).     **Usage:** `1`=Console, `2`=Database, `4`=File, `8`=Grafana. Combine by summing (e.g., `5` = Console + File). | `5` | Docker, Binary |
| `Service__LoggingConfiguration__LogDirectoryPath` | **Meaning:** Name of the folder where file logs are saved.     **Usage:** A directory will be automatically created with this name. | `SendentLogs` | Docker, Binary |
| `Service__LoggingConfiguration__LogFileSizeLimit` | **Meaning:** Maximum size of a single log file.     **Usage:** Expressed in Megabytes (MB). Controls log rotation. | `50` | Docker, Binary |
| `Service__LoggingConfiguration__LogFileAmountLimit` | **Meaning:** Maximum number of log files to retain.     **Usage:** Older files are automatically deleted to save disk space. | `20` | Docker, Binary |
| `Service__LoggingConfiguration__LokiInternalUrl` | **Meaning:** Internal URL used to push logs to Loki.     **Usage:** Required only if Grafana log output is enabled. | `http://loki:3100` | Docker |
| `GRAFANA_USER` / `GRAFANA_PASSWORD` | **Meaning:** Custom administrator credentials for Grafana.     **Usage:** Used to log into the Grafana UI. | `SuperAdmin` | Docker |

## Example Configurations

### Minimal Config for Docker deployment (Single Instance)

```bash
# Service Configuration
Service__StartWeekend=6
Service__SyncMode=1
Service__SyncType=0

# Database Configuration
DatabaseConfiguration__DatabaseType=2
DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!
DatabaseConfiguration__ConnectionString=YourDatabaseConnectionString

# Exchange Configuration
Service__ExchangeConfiguration__ExchangeAdminFile=

# Sync Clients — REQUIRED
# For Graph, set Identifier/Provider to graph and drop ExchangeType.
# For on-premise Kerberos, set ExchangeType=2 and use OnPremUrl / OnPremDomain / UserName / Password (not ExchangeOnPremUrl).
EventSyncClients__0__Identifier=ews
EventSyncClients__0__Provider=Ews
EventSyncClients__0__Settings__ExchangeType=1
EventSyncClients__0__Settings__TenantId=yor-exchange-tenant-id
EventSyncClients__0__Settings__AppId=your-app-id
EventSyncClients__0__Settings__ClientSecret=your-client-secret

EventSyncClients__1__Identifier=dav
EventSyncClients__1__Provider=Dav
EventSyncClients__1__Settings__BaseUrl=your-nextcloud-base-url
EventSyncClients__1__Settings__ServiceUsername=your-nextcloud-admin
EventSyncClients__1__Settings__ServicePassword=your-nextcloud-password
EventSyncClients__1__Settings__SharedSecret=your-shared-secret

EventSync__Pairs__0__SourceClientId=ews
EventSync__Pairs__0__TargetClientId=dav
EventSync__CalendarPriorityOrder__0=ews
EventSync__CalendarPriorityOrder__1=dav

# Full Synchronization Configuration
Service__FullSyncConfiguration__ProcessAttachments=true

# Sensitive Synchronization Configuration
Service__SensitiveSyncConfiguration__SensitiveTitle="Busy"
Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync"

# Logging (Serilog & Loki)
Serilog__MinimumLevel__Default=Error
Service__LoggingConfiguration__LogsOutput=3
Service__LoggingConfiguration__LogDirectoryPath=
Service__LoggingConfiguration__LogFileSizeLimit=50
Service__LoggingConfiguration__LogFileAmountLimit=20
Service__LoggingConfiguration__LokiInternalUrl=http://loki:3100

# Grafana Configuration
GRAFANA_USER="YourAdminLogin"
GRAFANA_PASSWORD="YourAdminPassword"
```

### Full Config for Docker deployment (Multi-Instance)

```bash
# Service Configuration
Service__IsPrimary=true
Service__DeploymentType=0
Service__DefaultWorkerName="SendentWorker"

# NOTE: these four are real settings, but are NOT in the default docker-compose.yml
# environment: allowlist yet — add their names there before they take effect.
Service__BatchLimit=50
Service__WorkerIntervalSeconds=60
Service__BatchSaveSize=100
Service__StartWeekend=6

Service__SyncMode=1
Service__SyncType=0

# Database Configuration
DatabaseConfiguration__DatabaseType=2
DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!
DatabaseConfiguration__ConnectionString=YourDatabaseConnectionString

# Exchange Configuration
Service__ExchangeConfiguration__ExchangeAdminFile=

# Sync Clients — REQUIRED
# For Graph, set Identifier/Provider to graph and drop ExchangeType.
# For on-premise Kerberos, set ExchangeType=2 and use OnPremUrl / OnPremDomain / UserName / Password (not ExchangeOnPremUrl).
EventSyncClients__0__Identifier=ews
EventSyncClients__0__Provider=Ews
EventSyncClients__0__Settings__ExchangeType=1
EventSyncClients__0__Settings__TenantId=yor-exchange-tenant-id
EventSyncClients__0__Settings__AppId=your-app-id
EventSyncClients__0__Settings__ClientSecret=your-client-secret

EventSyncClients__1__Identifier=dav
EventSyncClients__1__Provider=Dav
EventSyncClients__1__Settings__BaseUrl=your-nextcloud-base-url
EventSyncClients__1__Settings__ServiceUsername=your-nextcloud-admin
EventSyncClients__1__Settings__ServicePassword=your-nextcloud-password
EventSyncClients__1__Settings__SharedSecret=your-shared-secret

EventSync__Pairs__0__SourceClientId=ews
EventSync__Pairs__0__TargetClientId=dav
EventSync__CalendarPriorityOrder__0=ews
EventSync__CalendarPriorityOrder__1=dav

# Concurrency Configuration
Service__ConcurrencyConfiguration__MaxParallelProcessingUsers=100
Service__ConcurrencyConfiguration__MaxUsersPerAdmin=100
Secondary_Replicas_Amount=2

# Full Synchronization Configuration
Service__FullSyncConfiguration__ProcessAttachments=true

# Sensitive Synchronization Configuration
Service__SensitiveSyncConfiguration__SensitiveTitle="Busy"
Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync"

# Logging (Serilog & Loki)
Serilog__MinimumLevel__Default=Error
Service__LoggingConfiguration__LogsOutput=9
Service__LoggingConfiguration__LogDirectoryPath=
Service__LoggingConfiguration__LogFileSizeLimit=50
Service__LoggingConfiguration__LogFileAmountLimit=20
Service__LoggingConfiguration__LokiInternalUrl=http://loki:3100

# Grafana Configuration
GRAFANA_USER="YourAdminLogin"
GRAFANA_PASSWORD="YourAdminPassword"
```

### Minimal Config for Binary deployment (Single Instance)

```bash
# Service Configuration
Service__IsPrimary=true
Service__DeploymentType=1
Service__AspNetCoreUrl="http://localhost:5001"
Service__DefaultWorkerName="SendentWorker-1"
Service__StartWeekend=6
Service__SyncMode=1
Service__SyncType=0

# Database Configuration
DatabaseConfiguration__DatabaseType=2
DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!
DatabaseConfiguration__ConnectionString=YourDatabaseConnectionString

# Exchange Configuration
Service__ExchangeConfiguration__ExchangeAdminFile=

# Sync Clients — REQUIRED
# For Graph, set Identifier/Provider to graph and drop ExchangeType.
# For on-premise Kerberos, set ExchangeType=2 and use OnPremUrl / OnPremDomain / UserName / Password (not ExchangeOnPremUrl).
EventSyncClients__0__Identifier=ews
EventSyncClients__0__Provider=Ews
EventSyncClients__0__Settings__ExchangeType=1
EventSyncClients__0__Settings__TenantId=yor-exchange-tenant-id
EventSyncClients__0__Settings__AppId=your-app-id
EventSyncClients__0__Settings__ClientSecret=your-client-secret

EventSyncClients__1__Identifier=dav
EventSyncClients__1__Provider=Dav
EventSyncClients__1__Settings__BaseUrl=your-nextcloud-base-url
EventSyncClients__1__Settings__ServiceUsername=your-nextcloud-admin
EventSyncClients__1__Settings__ServicePassword=your-nextcloud-password
EventSyncClients__1__Settings__SharedSecret=your-shared-secret

EventSync__Pairs__0__SourceClientId=ews
EventSync__Pairs__0__TargetClientId=dav
EventSync__CalendarPriorityOrder__0=ews
EventSync__CalendarPriorityOrder__1=dav

# Full Synchronization Configuration
Service__FullSyncConfiguration__ProcessAttachments=true

# Sensitive Synchronization Configuration
Service__SensitiveSyncConfiguration__SensitiveTitle="Busy"
Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync"

# Logging (Serilog)
Serilog__MinimumLevel__Default=Error
Service__LoggingConfiguration__LogsOutput=3
Service__LoggingConfiguration__LogDirectoryPath=
Service__LoggingConfiguration__LogFileSizeLimit=50
Service__LoggingConfiguration__LogFileAmountLimit=20
```

### Full Config for Binary deployment (Multi-Instance)

```bash
# Service Configuration — edit these three per-instance
Service__IsPrimary=true
Service__DeploymentType=1
Service__AspNetCoreUrl="http://localhost:5001"
Service__DefaultWorkerName="SendentWorker-1"

Service__BatchLimit=50
Service__WorkerIntervalSeconds=60
Service__BatchSaveSize=100
Service__StartWeekend=6

Service__SyncMode=1
Service__SyncType=0

# Database Configuration
DatabaseConfiguration__DatabaseType=2
DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!
DatabaseConfiguration__ConnectionString=YourDatabaseConnectionString

# Exchange Configuration
Service__ExchangeConfiguration__ExchangeAdminFile=

# Sync Clients — REQUIRED
# For Graph, set Identifier/Provider to graph and drop ExchangeType.
# For on-premise Kerberos, set ExchangeType=2 and use OnPremUrl / OnPremDomain / UserName / Password (not ExchangeOnPremUrl).
EventSyncClients__0__Identifier=ews
EventSyncClients__0__Provider=Ews
EventSyncClients__0__Settings__ExchangeType=1
EventSyncClients__0__Settings__TenantId=yor-exchange-tenant-id
EventSyncClients__0__Settings__AppId=your-app-id
EventSyncClients__0__Settings__ClientSecret=your-client-secret

EventSyncClients__1__Identifier=dav
EventSyncClients__1__Provider=Dav
EventSyncClients__1__Settings__BaseUrl=your-nextcloud-base-url
EventSyncClients__1__Settings__ServiceUsername=your-nextcloud-admin
EventSyncClients__1__Settings__ServicePassword=your-nextcloud-password
EventSyncClients__1__Settings__SharedSecret=your-shared-secret

EventSync__Pairs__0__SourceClientId=ews
EventSync__Pairs__0__TargetClientId=dav
EventSync__CalendarPriorityOrder__0=ews
EventSync__CalendarPriorityOrder__1=dav

# Concurrency Configuration
Service__ConcurrencyConfiguration__MaxParallelProcessingUsers=1000
Service__ConcurrencyConfiguration__MaxUsersPerAdmin=100

# Full Synchronization Configuration
Service__FullSyncConfiguration__ProcessAttachments=true

# Sensitive Synchronization Configuration
Service__SensitiveSyncConfiguration__SensitiveTitle="Busy"
Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync"

# Logging (Serilog)
Serilog__MinimumLevel__Default=Error
Service__LoggingConfiguration__LogsOutput=5
Service__LoggingConfiguration__LogDirectoryPath=
Service__LoggingConfiguration__LogFileSizeLimit=50
Service__LoggingConfiguration__LogFileAmountLimit=20
```

## Next Step

[Deploying via Docker (Single Instance)](https://help.sendent.com/sendent-nextcloud-workspace/nextcloud-for-exchange/deploying-via-docker-single-instance)
