# Obsidian WebDAV server This Rust/Actix service provides authenticated WebDAV for Obsidian clients. Obsidian's built-in Sync is not a WebDAV client; Remotely Save is the compatibility target for WebDAV syncing. The WebDAV root maps to `/storage/`, which should be mounted as a persistent Docker volume. Paths are accessed through a capability-rooted filesystem so WebDAV paths and symlinks cannot escape that directory. ## Configure Remotely Save Install the **Remotely Save** community plugin, select **WebDAV**, set the server address to the WebDAV root (for example, `https://your-host/` when using an HTTPS reverse proxy), and enter the configured username and password. Its remote base directory defaults to the vault name, so files are stored below `/storage//`. The service enables browser CORS for `app://obsidian.md`, `capacitor://localhost`, and `http://localhost` to support Obsidian mobile clients. Browsers from other origins cannot read responses; CORS is not authentication, and all actual DAV requests still require Basic auth. Custom DAV properties and WebDAV locks are process-local and clear on restart; note files and directories remain persistent in `/storage/`. The current compatibility checks exercise the documented Remotely Save HTTP/WebDAV request sequence, but do not run the plugin inside Obsidian. App-level interoperability has not yet been verified. ## Run locally with Docker ```sh docker build -t obsidian-sync . docker run --rm --name obsidian-sync \ --cap-drop=ALL --cap-add=NET_BIND_SERVICE \ -p 80:80 \ -e DAV_USERNAME=your-user \ -e DAV_PASSWORD=your-password \ -v /path/to/your/vault:/storage \ obsidian-sync ``` The container runs as UID/GID `10001:10001`. The host directory mounted at `/storage/` must be writable by that identity. For a new dedicated directory, one option is `sudo chown 10001:10001 /path/to/your/vault`; for an existing vault, use an ACL or another permission policy that preserves its current owner rather than recursively changing ownership without review. The image grants the binary only the low-port bind capability, and its `/up` endpoint is configured as a Docker health check. The WebDAV root is `http://localhost/`. `/up` is an unauthenticated health endpoint. ```sh curl -i http://localhost/up curl -i -u your-user:your-password -T ./note.md http://localhost/note.md curl -i -u your-user:your-password http://localhost/note.md ``` Basic authentication over plain HTTP is not safe on an untrusted network. Terminate HTTPS at a trusted reverse proxy before exposing the service beyond a trusted network.