waldur-site-agent-nextcloud
Nextcloud plugin for Waldur Site Agent.
Users purchase storage plans in Waldur and automatically receive access to a shared Nextcloud Group Folder. Login is via Keycloak OIDC.
How it works
- Each Waldur resource → a Nextcloud Group + Group Folder (with quota from the plan)
- Users added to the resource → added to the Nextcloud group → can access the folder
- Usage is reported as Group Folder bytes used
Prerequisites
Install and enable in Nextcloud admin:
- User OIDC app (user_oidc) — configure to point at your Keycloak realm
- Group Folders app (groupfolders)
In the OIDC provider settings, set the user ID attribute to preferred_username
(matches the Keycloak username that the site-agent uses when calling the OCS API).
Configuration example
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 | |
Backend settings reference
| Key | Default | Description |
|---|---|---|
nextcloud_url |
(required) | Base URL of the Nextcloud instance |
admin_username |
(required) | Admin account for OCS API calls |
admin_password |
(required) | Admin password (use env var substitution) |
group_prefix |
"waldur-" |
Prefix prepended to every auto-created group name |
default_storage_quota_gb |
25 |
Fallback quota (GiB) when the Waldur plan has no storage limit |
allow_resharing |
false |
If false, group members cannot reshare folder contents |
STOMP settings reference
| Key | Default | Description |
|---|---|---|
stomp_enabled |
false |
Enable STOMP event-driven processing |
stomp_membership_sync_enabled |
null |
Inherits stomp_enabled. Set false to keep HTTP polling for membership. |
team_fetch_attempts (backend-level, non-configurable)
The Nextcloud backend sets team_fetch_attempts = 4 internally.
On order-processing paths (including STOMP create-order events) the event can
arrive before Waldur has committed the initial team membership row. The agent
retries the team-member fetch up to 4 times (with a 3 s delay between
attempts) if the list comes back empty. Other backends default to 1 (no
retry); this higher value is specific to Nextcloud's create-order path.
Note: the retry only helps when the team is entirely absent. A non-empty but stale team (new member not yet committed) breaks on the first attempt.