Custom [Node-RED](https://nodered.org/) Docker image with **16 palette nodes** that call Nextcloud APIs (OCS, WebDAV, and app-specific endpoints), plus a companion [Nextcloud app](../nodered-embed/) that embeds the editor in the Nextcloud UI.
See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) for implementation details.
## Requirements
- Linux host (or VM) with Docker
- Nextcloud 25+ (tested with modern OCS v2 APIs)
- **`network_mode: host`** on Linux so the container can reach Nextcloud on the same machine (avoids `127.0.0.1` / `/etc/hosts` issues inside the container)
- Nextcloud **app password** per user (Settings → Security → Devices & sessions)
In **Administration → Node-RED Embed**, set the Node-RED URL (e.g. `http://192.168.1.26:1880`). See [nodered-embed README](../nodered-embed/README.md).
## First-time setup in Node-RED
1. Drag a **nextcloud config** node onto the canvas (any Nextcloud node will prompt you).
2. Set **Nextcloud URL** to your instance, e.g. `https://cloud.example.com` (no trailing slash).
3. Set **Username** and **App password** (not your login password).
4. Deploy and test with **ocs-api** → operation `GET` on `/ocs/v2.php/cloud/user`.
| `provisioning` | nextcloud | User/group provisioning API |
| `filesharing` | nextcloud | File sharing OCS |
| `userstatus` | nextcloud | User status |
| `settings` | nextcloud | User/admin settings |
Full operation lists: [docs/NODES.md](docs/NODES.md).
### Runtime overrides
Most nodes accept `msg` overrides:
| Property | Effect |
|----------|--------|
| `msg.operation` | Operation id (e.g. `collective:list`) |
| `msg.endpoint` | **ocs-api only** — API path |
| `msg.method` | **ocs-api only** — HTTP method |
| `msg.body` | JSON request body |
| `msg.headers` | Extra HTTP headers |
| Path params | `msg.collectiveId`, `msg.pageId`, `msg.userId`, etc. |
## Updating nodes after code changes
The image bakes nodes under `/opt/nextcloud-nodes/`. At **every container start**, `entrypoint.sh` copies them into the **`/data` volume** (Node-RED `userDir`). To pick up new node files: