Skip to content

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Repository files navigation

WebDAV Sync — a Cortex App

Sync folders from any WebDAV server into the Cortex knowledge graph — on demand or on a schedule, fully server-side. One protocol, dozens of providers.

Supported platforms (verified July 2026)

Provider WebDAV URL Auth
Nextcloud (incl. Hetzner Storage Share, Telekom MagentaCLOUD, many white-labels) https://SERVER/remote.php/dav/files/USERNAME app password (required with 2FA)
ownCloud 10 / oCIS https://SERVER/remote.php/dav/files/USERNAME app password / app token
Synology NAS https://NAS:5006/SHARED-FOLDER DSM account (install WebDAV Server package)
QNAP NAS https://NAS:PORT/SHARED-FOLDER NAS account (enable in Control Panel)
Koofr https://app.koofr.net/dav/Koofr app password (main password rejected)
pCloud (paid plans) https://webdav.pcloud.com (EU: ewebdav.pcloud.com) account email + password
GMX / WEB.DE https://webdav.mc.gmx.net / https://webdav.smartdrive.web.de app-specific password
HiDrive (Strato / IONOS) https://webdav.hidrive.strato.com / https://webdav.hidrive.ionos.com enable protocol access first
Infomaniak kDrive (paid plans) https://KDRIVE-ID.connect.kdrive.infomaniak.com application password
Fastmail Files https://myfiles.fastmail.com app password with Files scope
Yandex Disk (paid plans since 06/2026) https://webdav.yandex.ru app-specific password
Hetzner Storage Box https://uXXXXXX.your-storagebox.de enable WebDAV in the console
Seafile https://SERVER/seafdav/ enable SeafDAV first
4shared, OpenDrive, CloudMe provider docs account password
Self-hosted: rclone serve webdav, dufs, SFTPGo, Pydio Cells, Apache mod_dav your server your choice

No WebDAV (don't try): Dropbox, Google Drive, OneDrive, and paperless-ngx have dedicated Cortex apps — use those. Box killed WebDAV in 2019, Icedrive in April 2026; Proton Drive, Sync.com, Tresorit, Jottacloud, and Zoho WorkDrive never had it.

iCloud Drive has no native WebDAV and no official API. Power users can bridge it with rclone's experimental iclouddrive backend + rclone serve webdav, but be honest with yourself about what that is: reverse-engineered web-session auth, interactive 2FA with a trust token that expires roughly monthly, and Apple breaks it every few months. A scheduled one-way rclone sync into a folder served by a normal WebDAV server degrades more gracefully. Neither is a supported integration.

Pick folders in a built-in browser; Cortex lists them with PROPFIND, detects new and edited files by ETag, downloads the originals (PDF, Office, markdown, images, …) server-side and runs its normal ingestion pipeline on each. Edited files replace their previous Cortex document instead of duplicating it.

Built from cortex-app-template. Type: platform — the sync itself runs inside Cortex as a declarative platform task, not in your browser. Close the tab and it keeps going; give it a schedule and it becomes a standing sync daemon with no browser anywhere.

Requires a Cortex instance with the webdav task step and binary passthrough upload (cortex-app ≥ 2.1 / July 2026 platform extensions). Servers without stable file ids get a deterministic href-derived id, so dedup works everywhere (renames re-sync as new files on such servers).

Install

  1. npm install && npm run package → webdav-sync-{version}.zip
  2. Cortex admin → Settings → Apps → Install, upload the zip. (Requires ENABLE_APPS=true on the instance.)
  3. Configure the app (Settings → Apps → Configure):
    • WEBDAV_URL — the full collection URL including its base path, e.g. https://app.koofr.net/dav/Koofr, https://u123.your-storagebox.de, https://cloud.example.com/remote.php/webdav
    • WEBDAV_USERNAME / WEBDAV_PASSWORD — pasted as-is; many providers issue app-specific WebDAV passwords. Basic auth is assembled and base64-encoded server-side; credentials are stored encrypted and never reach the browser. The server needs no CORS setup.
  4. Open the app (/apps → WebDAV Sync), select folders, pick a schedule (or stay manual) and a target collection, and hit Sync.

How the sync works

Identical engine to Nextcloud Sync (this app is its generic sibling):

  • setup — one webdav PROPFIND (depth 1, files only) per synced folder; the folder list is your selected roots plus all sub-folders discovered at submit time (capped at 40).
  • per file — listings concatenated and deduped against app storage (synced/{fileId}:{etag} — the ETag is the change cursor); optional documents-only MIME filter and a ~19 MB size cap; a binary passthrough upload streams the file from WebDAV into POST /api/upload (source=webdav-sync). Edited files replace their Cortex document in place: the upload carries a stable source_key plus the previous document id (docmap/{fileId}), so the document keeps its id and Cortex re-extracts only the parts that changed. On a Cortex backend without in-place replace, the app falls back to the old behaviour (new document, then the previous one is deleted).

v1 limitations

  • Deleting a file on the server does not delete it in Cortex.
  • On servers without stable file ids, renames create a new document (the old one stays); Nextcloud/ownCloud ids handle renames properly.
  • New sub-folders under a synced root are discovered on re-submit (Sync now), not mid-schedule.
  • Files larger than ~19 MB are skipped (platform transfer cap).

Manifest notes

  • keyScope: read_write; endpoints: ["upload", "documents", "collections"]
  • capabilities: http (host-allowlisted to ${WEBDAV_URL}, Basic auth injected server-side via the base64(...) template), tasks, storage

Dev loop

cp .env.example .env   # CORTEX_DEV_URL + a cortex_rw_… key
npm run dev

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages