(Answer required) 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.
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.
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.
Configuration Strategy: Minimal vs. Full
To simplify deployments, it is recommended to build your .env file based on your needs:
Configuration Reference
Service Configuration
These settings control the core behavior, identification, and scheduling of the synchronization instances.
Parameter | Meaning & Usage | Example | Applies To |
| Meaning: Dictates if this instance is the primary synchronization coordinator.
|
| Docker, Binary |
| Meaning: Specifies the hosting method.
|
| Docker, Binary |
| 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. |
| Binary |
| Meaning: The unique identifier for the instance. Usage: Used in logs and database tracking to identify which worker processed a task. |
| Docker, Binary |
| Meaning: Maximum number of elements per EWS request.
|
| Docker, Binary |
| Meaning: The sleep interval between global application runs.
|
| Docker, Binary |
| Meaning: The standard cooldown delay before a specific user is scheduled for their next sync.
|
| Docker, Binary |
| Meaning: The retry delay for users whose synchronization failed.
|
| Docker, Binary |
| Meaning: Database transaction chunk size.
|
| Docker, Binary |
| Meaning: Defines the day that marks the start of the weekend. Usage: Used in calendar logic (1 = Monday, 6 = Saturday, 7 = Sunday). |
| Docker, Binary |
| Meaning: Declares which data entities are synchronized.
|
| Docker, Binary |
| Meaning: Level of detail for synchronization.
|
| Docker, Binary |
Database Configuration
These settings connect the application to your storage backend.
Parameter | Meaning & Usage | Example | Applies To |
| Meaning: Selects the database provider.
|
| Docker, Binary |
| Meaning: Secret key for encrypting sensitive data.
|
| Docker, Binary |
| Meaning: The connection string to reach the database.
|
| Docker, Binary |
Nextcloud Configuration
These settings connect the application to the Nextcloud frontend.
Warning: Shared Secret Mismatch
Your Service__NextcloudConfiguration__SharedSecret value must exactly match the shared secret generated in the Sendent Sync app within your Nextcloud web interface.
Parameter | Meaning & Usage | Example | Applies To |
| Meaning: The Base URL of your Nextcloud instance.
|
| Docker, Binary |
| Meaning: Username of the Nextcloud service account.
|
| Docker, Binary |
| Meaning: Password of the Nextcloud service account.
|
| Docker, Binary |
| Meaning: Cryptographic shared secret.
|
| Docker, Binary |
Exchange Server Configuration
These settings define how the application authenticates and connects to Microsoft Exchange.
Warning: Avoid Raw Exchange Credentials
We strongly discourage using the Service__ExchangeConfiguration__ExchangeAdminRaw parameter. Escaping quotes and slashes within the .env file breaks the parser. Always use the ExchangeAdminFile approach.
Parameter | Meaning & Usage | Example | Applies To |
| Meaning: Selects the Exchange environment architecture.
|
| Docker, Binary |
| Meaning: The EWS endpoint URL.
|
| Docker, Binary |
| Meaning: The domain name for Exchange.
|
| Docker, Binary |
| Meaning: The ADFS authority URL.
|
| Docker, Binary |
| Meaning: Microsoft Tenant ID. Usage: Required only if using Cloud (M365) connection type. |
| Docker, Binary |
| Meaning: Path to your JSON file containing Exchange service accounts.
|
| Docker, Binary |
Concurrency Configuration
These settings control the application's throughput and scaling behavior.
Parameter | Meaning & Usage | Example | Applies To |
| Meaning: Global limit of concurrent users processed per instance.
|
| Docker, Binary |
| Meaning: Maximum users processed concurrently by a single Exchange service account.
|
| Docker, Binary |
| Meaning: The number of secondary containers to deploy automatically.
|
| Docker |
Specific Synchronization Configurations
Parameter | Meaning & Usage | Example | Applies To |
| Meaning: Allows or disallows processing of attachments.
|
| Docker, Binary |
| Meaning: Custom title applied to events in Exchange.
|
| Docker, Binary |
| Meaning: Custom category tag applied to events.
|
| Docker, Binary |
Logging & 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 & Usage | Example | Applies To |
| Meaning: The global log verbosity level.
|
| Docker, Binary |
| Meaning: Determines where logs are stored (Bitwise).
|
| Docker, Binary |
| Meaning: Name of the folder where file logs are saved.
|
| Docker, Binary |
| Meaning: Maximum size of a single log file.
|
| Docker, Binary |
| Meaning: Maximum number of log files to retain.
|
| Docker, Binary |
| Meaning: Internal URL used to push logs to Loki.
|
| Docker |
| Meaning: Custom administrator credentials for Grafana.
|
| Docker |
Example Configurations
Minimal Config for Docker deployment (Single Instance)
# Service ConfigurationService__StartWeekend=6# Synchronization Modes: None(0), Calendars(1), Contacts(2), Tasks(4)# You can combine modes, just place sum of necessary numbers in this propertyService__SyncMode=1# Synchronization Types: Full(0), Sensitive(1)Service__SyncType=0 # Database Configuration# Allowed Database types: Postgres(0), SqlServer(1), MariaDB(2), MySql(3)DatabaseConfiguration__DatabaseType=2DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!DatabaseConfiguration__ConnectionString=Server=maria_db;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Postgres Example: Host=postgres_db;Port=5432;Database=SendentDB;Username=postgres;Password=YourStrong!Pass123# SqlServer Example: Server=mssql_db;Database=SendentDB;User Id=sa;Password=YourStrong!Pass123;Encrypt=False;# MariaDB Example: Server=maria_db;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123# MySql Example: Server=mysql_db;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Nextcloud ConfigurationService__NextcloudConfiguration__NextcloudBaseUrl=your-nextcloud-base-urlService__NextcloudConfiguration__NextcloudServiceUsername=your-nextcloud-adminService__NextcloudConfiguration__NextcloudServicePassword=your-nextcloud-passwordService__NextcloudConfiguration__SharedSecret=your-shared-secret # Exchange Configuration# Allowed Exchange Types: Cloud(1), OnPremKerberos(2), OnPremBasicAuth(3), OnPremADFS(4)Service__ExchangeConfiguration__ExchangeType=1Service__ExchangeConfiguration__ExchangeOnPremUrl=https://outlook.office365.com/EWS/Exchange.asmxService__ExchangeConfiguration__ExchangeOnPremDomain=your-domainService__ExchangeConfiguration__ExchangeOnPremAdfsAuthorityUrl=your-adfs-authority-urlService__ExchangeConfiguration__ExchangeTenantId=yor-exchange-tenant-id # Fill in your administrator's credentials in the property below using necessary template for filling in# Cloud: "[{\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}, {\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}]"# OnPrem(Kerberos/BasicAuth): "[{\"User\":\"Admin1\", \"Pass\":\"Password1\"}, {\"User\":\"Admin2\", \"Pass\":\"Password2\"}]"# OnPremADFS: "[{\"ClientId\":\"ClientId1\", \"ClientSecret\":\"Secret1\" }, {\"ClientId\":\"ClientId2\", \"ClientSecret\":\"Secret2\"}]"# or configure and use json files# Default: simple file admins.json in exchangeAdmins folder# Custom Example:# Service__ExchangeConfiguration__ExchangeAdminFile=administrators/myAdmins/myAdmin.json # Service__ExchangeConfiguration__ExchangeAdminRaw="[{\"AppId\":\"your-app-id\", \"ClientSecret\":\"your-client-Secret\"}]"# Service__ExchangeConfiguration__ExchangeAdminFile=# Service__ExchangeConfiguration__ExchangeAdminRaw=# Service__ExchangeConfiguration__ExchangeAdminFile=administrators/myAdmins/myAdmin.jsonService__ExchangeConfiguration__ExchangeAdminRaw=Service__ExchangeConfiguration__ExchangeAdminFile= # Full Synchronization ConfigurationService__FullSyncConfiguration__ProcessAttachments=true # Sensitive Synchronization ConfigurationService__SensitiveSyncConfiguration__SensitiveTitle="Busy"Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync" # Logging (Serilog & Loki)# Change global Log level: Information, DebugSerilog__MinimumLevel__Default=Information#Change Logs output: None(0), Console(1), Database(2), File(4), Grafana(8)# You can combine outputs, just place sum of necessary numbers in this propertyService__LoggingConfiguration__LogsOutput=3Service__LoggingConfiguration__LogDirectoryPath=# For Limiting log's file size in MBService__LoggingConfiguration__LogFileSizeLimit=50# For Limiting amount of log filesService__LoggingConfiguration__LogFileAmountLimit=20Service__LoggingConfiguration__LokiInternalUrl=http://loki:3100 # Grafana ConfigurationGRAFANA_USER="YourAdminLogin"GRAFANA_PASSWORD="YourAdminPassword"
Full Config for Docker deployment (Multi-Instance)
# Service ConfigurationService__IsPrimary=true# Deployment Types: Docker(0), Binary(1)Service__DeploymentType=0Service__DefaultWorkerName="SendentWorker"Service__BatchLimit=50Service__WorkerIntervalSeconds=60Service__SyncIntervalInSeconds=60Service__CriticalSyncIntervalInSeconds=100Service__BatchSaveSize=100Service__StartWeekend=6# Synchronization Modes: None(0), Calendars(1), Contacts(2), Tasks(4)# You can combine modes, just place sum of necessary numbers in this propertyService__SyncMode=1# Synchronization Types: Full(0), Sensitive(1)Service__SyncType=0 # Database Configuration# Allowed Database types: Postgres(0), SqlServer(1), MariaDB(2), MySql(3)DatabaseConfiguration__DatabaseType=2DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!DatabaseConfiguration__ConnectionString=Server=maria_db;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Postgres Example: Host=postgres_db;Port=5432;Database=SendentDB;Username=postgres;Password=YourStrong!Pass123# SqlServer Example: Server=mssql_db;Database=SendentDB;User Id=sa;Password=YourStrong!Pass123;Encrypt=False;# MariaDB Example: Server=maria_db;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123# MySql Example: Server=mysql_db;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Nextcloud ConfigurationService__NextcloudConfiguration__NextcloudBaseUrl=your-nextcloud-base-urlService__NextcloudConfiguration__NextcloudServiceUsername=your-nextcloud-adminService__NextcloudConfiguration__NextcloudServicePassword=your-nextcloud-passwordService__NextcloudConfiguration__SharedSecret=your-shared-secret # Exchange Configuration# Allowed Exchange Types: Cloud(1), OnPremKerberos(2), OnPremBasicAuth(3), OnPremADFS(4)Service__ExchangeConfiguration__ExchangeType=1Service__ExchangeConfiguration__ExchangeOnPremUrl=https://outlook.office365.com/EWS/Exchange.asmxService__ExchangeConfiguration__ExchangeOnPremDomain=your-domainService__ExchangeConfiguration__ExchangeOnPremAdfsAuthorityUrl=your-adfs-authority-urlService__ExchangeConfiguration__ExchangeTenantId=yor-exchange-tenant-id # Fill in your administrator's credentials in the property below using necessary template for filling in# Cloud: "[{\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}, {\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}]"# OnPrem(Kerberos/BasicAuth): "[{\"User\":\"Admin1\", \"Pass\":\"Password1\"}, {\"User\":\"Admin2\", \"Pass\":\"Password2\"}]"# OnPremADFS: "[{\"ClientId\":\"ClientId1\", \"ClientSecret\":\"Secret1\" }, {\"ClientId\":\"ClientId2\", \"ClientSecret\":\"Secret2\"}]"# or configure and use json files # Default: simple file admins.json in exchangeAdmins folder# Custom Example:# Service__ExchangeConfiguration__ExchangeAdminFile=administrators/myAdmins/myAdmin.json # Service__ExchangeConfiguration__ExchangeAdminRaw="[{\"AppId\":\"your-app-id\", \"ClientSecret\":\"your-client-Secret\"}]"# Service__ExchangeConfiguration__ExchangeAdminFile=# Service__ExchangeConfiguration__ExchangeAdminRaw=# Service__ExchangeConfiguration__ExchangeAdminFile=administrators/myAdmins/myAdmin.jsonService__ExchangeConfiguration__ExchangeAdminRaw=Service__ExchangeConfiguration__ExchangeAdminFile= # Concurrency ConfigurationService__ConcurrencyConfiguration__MaxParallelProcessingUsers=100Service__ConcurrencyConfiguration__MaxUsersPerAdmin=100Secondary_Replicas_Amount=2 # Full Synchronization ConfigurationService__FullSyncConfiguration__ProcessAttachments=true # Sensitive Synchronization ConfigurationService__SensitiveSyncConfiguration__SensitiveTitle="Busy"Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync" # Logging (Serilog & Loki)# Change global Log level: Information, DebugSerilog__MinimumLevel__Default=Information#Change Logs output: None(0), Console(1), Database(2), File(4), Grafana(8)# You can combine outputs, just place sum of necessary numbers in this propertyService__LoggingConfiguration__LogsOutput=5Service__LoggingConfiguration__LogDirectoryPath=# For Limiting log's file size in MBService__LoggingConfiguration__LogFileSizeLimit=50# For Limiting amount of log filesService__LoggingConfiguration__LogFileAmountLimit=20Service__LoggingConfiguration__LokiInternalUrl=http://loki:3100 # Grafana ConfigurationGRAFANA_USER="YourAdminLogin"GRAFANA_PASSWORD="YourAdminPassword"
Minimal Config for Binary deployment (Single Instance)
# Service ConfigurationService__IsPrimary=true# Deployment Types: Docker(0), Binary(1)Service__DeploymentType=1Service__AspNetCoreUrl="http://localhost:5001"Service__DefaultWorkerName="SendentWorker-1"Service__StartWeekend=6# Synchronization Modes: None(0), Calendars(1), Contacts(2), Tasks(4)# You can combine modes, just place sum of necessary numbers in this propertyService__SyncMode=1# Synchronization Types: Full(0), Sensitive(1)Service__SyncType=0 # Database Configuration# Allowed Database types: Postgres(0), SqlServer(1), MariaDB(2), MySql(3)DatabaseConfiguration__DatabaseType=2DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!DatabaseConfiguration__ConnectionString=Server=localhost;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Postgres Example: Host=localhost;Port=5432;Database=SendentDB;Username=postgres;Password=YourStrong!Pass123# SqlServer Example: Server=localhost;Database=SendentDB;User Id=sa;Password=YourStrong!Pass123;Encrypt=False;# MariaDB Example: Server=localhost;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123# MySql Example: Server=localhost;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Nextcloud ConfigurationService__NextcloudConfiguration__NextcloudBaseUrl=your-nextcloud-base-urlService__NextcloudConfiguration__NextcloudServiceUsername=your-nextcloud-adminService__NextcloudConfiguration__NextcloudServicePassword=your-nextcloud-passwordService__NextcloudConfiguration__SharedSecret=your-shared-secret # Exchange Configuration# Allowed Exchange Types: Cloud(1), OnPremKerberos(2), OnPremBasicAuth(3), OnPremADFS(4)Service__ExchangeConfiguration__ExchangeType=1Service__ExchangeConfiguration__ExchangeOnPremUrl=your-exchange-on-prem-urlService__ExchangeConfiguration__ExchangeOnPremDomain=your-domainService__ExchangeConfiguration__ExchangeOnPremAdfsAuthorityUrl=your-adfs-authority-urlService__ExchangeConfiguration__ExchangeTenantId=yor-exchange-tenant-id # Fill in your administrator's credentials in the property below using necessary template for filling in# Cloud: "[{\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}, {\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}]"# OnPrem(Kerberos/BasicAuth): "[{\"User\":\"Admin1\", \"Pass\":\"Password1\"}, {\"User\":\"Admin2\", \"Pass\":\"Password2\"}]"# OnPremADFS: "[{\"ClientId\":\"ClientId1\", \"ClientSecret\":\"Secret1\" }, {\"ClientId\":\"ClientId2\", \"ClientSecret\":\"Secret2\"}]"# or configure and use json files# Default: simple file admins.json in exchangeAdmins folder# Custom Example:# Service__ExchangeConfiguration__ExchangeAdminFile=administrators/myAdmins/myAdmin.json # Service__ExchangeConfiguration__ExchangeAdminRaw="[{\"AppId\":\"your-app-id\", \"ClientSecret\":\"your-client-Secret\"}]"# Service__ExchangeConfiguration__ExchangeAdminFile=# Service__ExchangeConfiguration__ExchangeAdminRaw=# Service__ExchangeConfiguration__ExchangeAdminFile=administrators/myAdmins/myAdmin.jsonService__ExchangeConfiguration__ExchangeAdminRaw=Service__ExchangeConfiguration__ExchangeAdminFile= # Full Synchronization ConfigurationService__FullSyncConfiguration__ProcessAttachments=true # Sensitive Synchronization ConfigurationService__SensitiveSyncConfiguration__SensitiveTitle="Busy"Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync" # Logging (Serilog)# Change global Log level: Information, DebugSerilog__MinimumLevel__Default=Information#Change Logs output: None(0), Console(1), Database(2), File(4), Grafana(8)# You can combine outputs, just place sum of necessary numbers in this propertyService__LoggingConfiguration__LogsOutput=3Service__LoggingConfiguration__LogDirectoryPath=# For Limiting log's file size in MBService__LoggingConfiguration__LogFileSizeLimit=50# For Limiting amount of log filesService__LoggingConfiguration__LogFileAmountLimit=20
Full Config for Binary deployment (Multi-Instance)
# Service ConfigurationService__IsPrimary=true# Deployment Types: Docker(0), Binary(1)Service__DeploymentType=1Service__AspNetCoreUrl="http://localhost:5001"Service__DefaultWorkerName="SendentWorker-1"Service__BatchLimit=50Service__WorkerIntervalSeconds=60Service__SyncIntervalInSeconds=60Service__CriticalSyncIntervalInSeconds=100Service__BatchSaveSize=100Service__StartWeekend=6# Synchronization Modes: None(0), Calendars(1), Contacts(2), Tasks(4)# You can combine modes, just place sum of necessary numbers in this propertyService__SyncMode=1# Synchronization Types: Full(0), Sensitive(1)Service__SyncType=0 # Database Configuration# Allowed Database types: Postgres(0), SqlServer(1), MariaDB(2), MySql(3)DatabaseConfiguration__DatabaseType=2DatabaseConfiguration__DatabaseEncryptionKey=YourSuperSecretKey123!DatabaseConfiguration__ConnectionString=Server=localhost;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Postgres Example: Host=localhost;Port=5432;Database=SendentDB;Username=postgres;Password=YourStrong!Pass123# SqlServer Example: Server=localhost;Database=SendentDB;User Id=sa;Password=YourStrong!Pass123;Encrypt=False;# MariaDB Example: Server=localhost;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123# MySql Example: Server=localhost;Port=3306;Database=SendentDB;Uid=root;Pwd=YourStrong!Pass123 # Nextcloud ConfigurationService__NextcloudConfiguration__NextcloudBaseUrl=your-nextcloud-base-urlService__NextcloudConfiguration__NextcloudServiceUsername=your-nextcloud-adminService__NextcloudConfiguration__NextcloudServicePassword=your-nextcloud-passwordService__NextcloudConfiguration__SharedSecret=your-shared-secret # Exchange Configuration# Allowed Exchange Types: Cloud(1), OnPremKerberos(2), OnPremBasicAuth(3), OnPremADFS(4)Service__ExchangeConfiguration__ExchangeType=1Service__ExchangeConfiguration__ExchangeOnPremUrl=your-exchange-on-prem-urlService__ExchangeConfiguration__ExchangeOnPremDomain=your-domainService__ExchangeConfiguration__ExchangeOnPremAdfsAuthorityUrl=your-adfs-authority-urlService__ExchangeConfiguration__ExchangeTenantId=yor-exchange-tenant-id # Admin credentials - use a JSON file (recommended) or inline JSON# File path to admin credentials JSON (e.g., /app/settings/admins.json). See Demo files/admins.json.exampleService__ExchangeConfiguration__ExchangeAdminFile=# Inline JSON fallback (used when ExchangeAdminFile is not set)# Cloud Example: "[{\"AppId\":\"AppId1\", \"ClientSecret\":\"Secret1\"}, {\"AppId\":\"AppId2\", \"ClientSecret\":\"Secret2\"}]"# OnPrem(Kerberos/BasicAuth) Example: "[{\"User\":\"Admin1\", \"Pass\":\"Password1\"}, {\"User\":\"Admin2\", \"Pass\":\"Password2\"}]"# OnPremADFS Example: "[{\"ClientId\":\"ClientId1\", \"ClientSecret\":\"Secret1\"}, {\"ClientId\":\"ClientId2\", \"ClientSecret\":\"Secret2\"}]"Service__ExchangeConfiguration__ExchangeAdminRaw="[{}]" # Concurrency ConfigurationService__ConcurrencyConfiguration__MaxParallelProcessingUsers=1000Service__ConcurrencyConfiguration__MaxUsersPerAdmin=100 # Full Synchronization ConfigurationService__FullSyncConfiguration__ProcessAttachments=true # Sensitive Synchronization ConfigurationService__SensitiveSyncConfiguration__SensitiveTitle="Busy"Service__SensitiveSyncConfiguration__SensitiveCategory="Nextcloud Sync" # Logging (Serilog)# Change global Log level: Information, DebugSerilog__MinimumLevel__Default=Information#Change Logs output: None(0), Console(1), Database(2), File(4), Grafana(8)# You can combine outputs, just place sum of necessary numbers in this propertyService__LoggingConfiguration__LogsOutput=3Service__LoggingConfiguration__LogDirectoryPath=# For Limiting log's file size in MBService__LoggingConfiguration__LogFileSizeLimit=50# For Limiting amount of log filesService__LoggingConfiguration__LogFileAmountLimit=20