# Configuring Nextcloud

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

This guide covers all the necessary configurations you must perform within your Nextcloud environment **before** you deploy the connector application.

To configure your license, refer to the [Configuring Your License](https://help.sendent.com/sendent-nextcloud-workspace/nextcloud-for-exchange/configuring-your-license) article.

**Note:**

The **Nextcloud Exchange Connector** operates as an external microservice (daemon). To successfully synchronize calendars and contacts, the connector must securely authenticate and communicate with your Nextcloud instance via its APIs.



## Pre-requirements

**Email Address Consistency:** The email address associated with a user's Nextcloud account **must perfectly match** their primary SMTP email address in Microsoft Exchange.

## Step 1. Create a Nextcloud Service Account

**Warning:**   
  
While you could use your primary Nextcloud administrator account, it is a **strong security best practice** to create a dedicated service account specifically for the connector.



1. Log in to Nextcloud with an administrator account.
2. Click on your profile picture in the top right corner and select **Accounts**.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774971637_69cbeaf5ccbe2.png)

3. Select **New account**.

![1774971895&#95;69cbebf75144c.jpg](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1775428814_69d2e4ced3c25.jpg)

4. Create a dedicated account (e.g., `sync-admin`) and ensure you assign it to the `admin` group as a member.

![1774972487&#95;69cbee475721b.jpg](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1775428936_69d2e5484daba.jpg)

5. Log in as this new `sync-admin` user.
6. Navigate to **Personal Settings**.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774972631_69cbeed704577.png)

7. Navigate to **Security.**
8. Under **Devices &amp; sessions**, enter an app name (e.g., `Exchange Connector`) and click **Create new app password**.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774972731_69cbef3becc1b.png)

9. Securely copy the generated credentials. You will use this instead of the standard login password.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774973100_69cbf0ac69bca.png)

## Step 2. Install the Sendent Sync App

This Nextcloud application exposes the specific API endpoints the external connector needs to communicate with **Nextcloud**. It also provides the User Consent UI, allowing individual Nextcloud users to opt-in or opt-out of synchronization.



1. Log in to your Nextcloud instance as an administrator.
2. Click on your profile picture in the top right corner and select **Apps**.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774971391_69cbe9ffc5983.png)

3. Navigate to the **Office &amp; Text** category or use the search bar to find the **Sendent Exchange Sync** app.
4. Click **Download and enable**.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774971255_69cbe9777dd60.png)

## Step 3. Configure the Shared Secret

1. Navigate to your Nextcloud **Administration settings**.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774973363_69cbf1b3ad91d.png)

2. Locate the **Sendent Sync** configuration section in the left sidebar.
3. Find the **Shared Secret** field.
4. Generate or input a strong, random cryptographic string (e.g., a 32-character alphanumeric string).
5. Securely copy the **Shared Secret**. You will use it later on.
6. Changes will be applied automatically.

![image.png](https://cdn.eniston.com/bases/0f220f4b-6749-49a9-8420-4a32e6d205f7/attachments/1774973650_69cbf2d21c765.png)

**Warning: Shared Secret Mismatch**

A mismatched shared secret is the most common cause of authentication errors and failed deployments. The exact string you enter in this Nextcloud UI field must perfectly match EventSyncClients\_\_1\_\_Settings\_\_SharedSecret in your .env file.

If your generated secret contains a dollar sign (`$`), remember to escape it as `$$` when copying it into your Docker `.env` file later.

If there is even a single character difference, the connector will not start the synchronization process.



## Step 4. Save Credentials for Installation

You have successfully prepared your Nextcloud environment. Put them on the DAV sync client in your .env file.

Configuration mapping cheat sheet

`BaseUrl` must include the protocol (`http`/`https`) and a trailing slash.

This is only the Nextcloud client. The Exchange-side client (`ews` or `graph`) and the pair are configured in the Microsoft 365 EWS, Graph API, or On-Premise article.

```bash
EventSyncClients__1__Identifier=dav
EventSyncClients__1__Provider=Dav
EventSyncClients__1__Settings__BaseUrl=https://cloud.example.com/
EventSyncClients__1__Settings__ServiceUsername=sync-admin
EventSyncClients__1__Settings__ServicePassword=your_generated_app_password
EventSyncClients__1__Settings__SharedSecret="your_secure_shared_secret_string"
```



## Sendent Sync app settings

Beyond the core security configurations, the Sendent Sync app provides several UI parameters that dictate how your users interact with the consent flow and whether IMAP synchronization is offered.

![](https://s3-eu-central-1.amazonaws.com/euc-cdn.freshdesk.com/data/helpdesk/attachments/production/80320142503/original/0zx6CELRo1Z-C5-LMhxrPhYDkCT517vQHQ.png?1708765834)

While still in the **Sendent Sync** section of your Nextcloud Administration settings, you can fine-tune the behavior of the application.

### Configuration parameters

| **Setting** | **Description** |
|---|---|
| `Enable IMAP synchronization` | If enabled, it triggers an additional step in the consent flow to configure Nextcloud Mail. If Autodiscover is set up on your Exchange server, Nextcloud Mail configures automatically. |
| `Email domain` | If your users have multiple email aliases, define your primary domain here (e.g., `example.com`) to ensure the connector resolves the correct routing address. |
| `Reminder Type` | Determines how the system prompts users to enable synchronization. Supported values: **Modal Dialog** (popup overlay), **Standard notifications** (Nextcloud bell icon), or both. |
| `Application to show modal dialog on` | Scopes the **Modal Dialog** visibility. You can restrict the pop-up to specific apps (e.g., Calendar or Contacts) or display it globally across the platform. |
| `Notifications interval in days` | Defines the cooldown period. If a user dismisses the prompt, the system will wait this number of days before triggering the reminder again. |

## Next Step

[Managing Exchange Service Accounts (admins.json)](https://help.sendent.com/sendent-nextcloud-workspace/nextcloud-for-exchange/managing-exchange-service-accounts)
