> For the complete documentation index, see [llms.txt](https://docs.elimity.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.elimity.com/gateways-nextcloud/step-by-step-deployment-guide.md).

# Step-by-step deployment guide

### Nextcloud

The Nextcloud connector for Elimity Insights fetches groups, team folders (Group Folders), the access rights that link them, and the shares that exist on your instance — so you can review which groups can reach which team folders and audit public and outbound sharing. Follow the instructions below to set up the connector.

#### 1. Which data is imported

The following entity types are imported:

* **Groups** — the admin-managed Nextcloud groups
* **Team Folders** — the Group Folders on your instance; file-level permissions are rolled up to the containing folder
* **Access Rights** — a single group's permission grant on a single team folder
* **Public Shares** — every in-scope share; federated shares are excluded

An Access Right is modelled as its own entity sitting between a Group and a Team folder. It carries what a plain link can't: the permissions the group holds on that folder (Read, Update, Create, Delete, Share), encoded in the entity's name. Public Shares are standalone — the owner, recipient, and shared file/folder are carried as attributes rather than links.

{% code overflow="wrap" %}

```mermaid
graph TD;Group[Group]; TeamFolder[Team folder]; AccessRight[Access Right]; PublicShare[Public Share];Group -->|HasAccess| AccessRight; AccessRight -->|AccessRightOn| TeamFolder;
```

{% endcode %}

Attributes imported per entity type:

**Group** — none (the group's display name is its entity name)

**Team Folder** — Type (kind of team folder)

**Access Right** — none (the granted permissions are encoded in the entity name: folder name + permissions, e.g. `Projects - Read- Update`)

**Public Share —** From (owner of the share), To (recipient), Type (kind of share), About (path of the shared file or folder)

#### 2. Choosing the connector account

As usual we recommend creating a dedicated account for this connector, with one caveat specific to this connector: **shares are user-scoped**, so the connector only imports shares owned by the account it authenticates as. A newly created account will own no shares.

#### 3. Generating an app password

The connector authenticates as the service account using an **app password** (a long-lived, separately revocable credential). Do **not** use the account's main login password.

1. Sign in as the account and go to **Personal Settings → Security**.
2. Scroll to **Devices & sessions**.
3. Under **Create new app password**, enter a recognisable name (e.g. `elimity-insights`) and click **Create new app password**.
4. Immediately note down the value (Nextcloud shows it only once).

Note down the **base URL** of your instance (e.g. `https://cloud.yourcompany.example.com`) and the account's **username** (uid) as well. You'll need all three values in step 5.<br>

#### 4. Enabling the required Nextcloud apps

The connector reads each entity type through a different Nextcloud API. Make sure the relevant apps are enabled under **Apps** in the admin area:

* `Files Sharing` — built-in and on by default; exposes the shares imported as Public Shares.
* `Group Folders` — enable if you use team folders; exposes the team folder → group access mappings.

The Provisioning API (groups) is part of Nextcloud core and is always available to an admin account, so no extra app is required for Groups.

#### 5. Creating a source in Elimity Insights

1. Go to **Sources** → **Add Source** → search **Custom** → **Set Up**.
2. Click **Set Up** again and name the source (e.g. `Nextcloud`).
3. Select **Upload export file**, click **Continue**, and upload `data-model-export.json`.
4. Open the **Config** tab, click **Edit**, set **Enable automatic imports via custom gateway** to `true`, and fill in the **Gateway URL**: [`https://nextcloud-gateway-1027270379075.europe-west1.run.app`](https://nextcloud-gateway-1027270379075.europe-west1.run.app).
5. Click **Add configuration value** and add the three entries below.
6. Click **Save and run**. Monitor the **Logs** tab as the connector imports groups, team folders with their access rights, and shares; the **Imports** tab shows the per-run summary.

   <br>

{% file src="/files/NaCVfN5Yz3MQJtlwGzYT" %}

| Configuration option | Key (type exactly this) | Description                                                                                  |
| -------------------- | ----------------------- | -------------------------------------------------------------------------------------------- |
| Base URL             | `base_url`              | Your nextcloud instance URL, e.g. <https://cloud.yourcompany.example.com> (no trailing path) |
| Username             | `username`              | The service account's login name (uid)                                                       |
| Password             | `password`              | The app password generated in step 3                                                         |

***

<br>


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.elimity.com/gateways-nextcloud/step-by-step-deployment-guide.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
