# WebDAV home Source: https://selfstore.dev/docs/webdav Back up to Nextcloud, ownCloud or any WebDAV server the user controls with one call - store.connectWebdav - self-hosted durable storage. WebDAV is the self-hoster's durable home: a Nextcloud or ownCloud instance, a NAS, any server speaking the protocol. The user brings a URL and credentials; the store re-writes one encrypted backup file there. For an audience that already refuses Big-Tech clouds, this is the home that makes your app feel built for them. ## One call ```ts const outcome = await store.connectWebdav({ url: 'https://cloud.example.com/remote.php/dav/files/ada/backups/my-app.zip', username: 'ada', password: appPassword, }); // 'started' | 'merged' | 'manual' | 'cancelled' ``` Two distinct passwords can be in play, worth naming clearly in your UI: the **server credential** above (how the store reaches WebDAV), and the **backup password** that encrypts the file itself (`store.protect(...)`, or `connectWebdav(config, { password })` for an already-encrypted file). Users may set either, both, or neither. ## Security posture - **https is enforced.** Basic-auth credentials over plain `http` are refused outright (loopback aside), so a misconfigured URL fails fast instead of leaking a credential. - **Credentials are sealed at rest.** The server config persists locally under a non-extractable device key, which defeats casual inspection of IndexedDB (not code running in your origin). The [threat model](https://github.com/selfstoredev/selfstore/blob/main/THREAT-MODEL.md) states both halves. - **Prefer app passwords.** Nextcloud and ownCloud issue per-application passwords (Settings, Security); recommend those over the account password. ## Sharing: a read-only link as a sync input A WebDAV share link can also act as a **peer**: another person publishes their copy read-only, you attach it, and the merge folds their changes in. That is how a small group shares a store read-write without anyone granting write access, and without Google. The [peers guide](https://selfstore.dev/docs/peers) has the model; the helper is `webdavTarget.peer({ url })` from `selfstore/advanced`. ## On the advanced store Driving [`createLocalStore`](https://selfstore.dev/docs/advanced) yourself: ```ts import { webdavTarget } from 'selfstore/advanced'; const target = await webdavTarget.connect({ kv: cache.kv, config: { url, username, password }, }); await store.attachTarget(target, { password: backupPassword }); ``` Map of this site for a model: https://selfstore.dev/llms.txt Every page in one file: https://selfstore.dev/llms-full.txt