> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kiwifs.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Alternate protocols

> Mount and integrate KiwiFS over NFS, S3, WebDAV, and FUSE alongside REST and MCP.

Every access path flows through the **same storage layer**: atomic write → git commit → search index → SSE broadcast.

## Quick comparison

| Protocol | Port            | Best for                                 |
| -------- | --------------- | ---------------------------------------- |
| REST     | `3333`          | Web UI, curl, CI scripts                 |
| MCP      | stdio or `8181` | Claude, Cursor, custom agents            |
| NFS      | `2049`          | Docker / Kubernetes mounts               |
| S3       | `3334`          | Backup tools, ETL, S3-compatible clients |
| WebDAV   | `3335`          | Desktop sync, mapped drives              |
| FUSE     | —               | Developer workstation remote mount       |

## Enable on serve

```bash theme={null}
kiwifs serve --root ./knowledge \
  --nfs --nfs-allow 10.0.0.0/8 \
  --s3 \
  --webdav
```

<AccordionGroup>
  <Accordion title="NFS" icon="hard-drive">
    Mount from Linux or Kubernetes:

    ```bash theme={null}
    sudo mount -t nfs -o vers=3 localhost:/ /mnt/kiwi
    ```

    Agents use normal shell tools:

    ```bash theme={null}
    cat /mnt/kiwi/pages/auth.md
    grep -r "timeout" /mnt/kiwi/
    echo "# Note" >> /mnt/kiwi/episodes/session.md
    ```

    NFS supports symlinks, open-then-delete semantics, and advisory locks. Internal dirs (`.git`, `.kiwi`) are hidden from listings.

    <Note>
      Restrict access with `--nfs-allow <CIDR>` in production.
    </Note>
  </Accordion>

  <Accordion title="S3-compatible API" icon="bucket">
    Point any S3 client at `http://localhost:3334`:

    ```bash theme={null}
    aws s3 sync s3://knowledge/ /backup/ --endpoint-url http://localhost:3334
    ```

    Useful for `aws s3 sync` backups or S3-compatible ETL pipelines.
  </Accordion>

  <Accordion title="WebDAV" icon="desktop">
    Connect from macOS **Finder → Connect to Server** or Windows mapped drive:

    ```
    http://localhost:3335/
    ```

    WebDAV uses buffered writes with spill-to-disk for large uploads.
  </Accordion>

  <Accordion title="FUSE remote mount" icon="folder-open">
    Mount a **remote** KiwiFS as a local folder:

    ```bash theme={null}
    kiwifs mount --remote http://host:3333 --mountpoint ~/kiwi-mount
    ```

    Optional auth:

    ```bash theme={null}
    export KIWIFS_API_KEY=my-secret
    kiwifs mount --remote http://host:3333 --mountpoint ~/kiwi-mount
    ```

    FUSE reports sub-second mtime and supports symlinks. **mmap** is not available (HTTP-backed I/O).
  </Accordion>
</AccordionGroup>

## POSIX semantics

| Access path          | POSIX level            |
| -------------------- | ---------------------- |
| Local knowledge root | Full                   |
| NFS mount            | Near-full              |
| FUSE mount           | Near-full (no mmap)    |
| WebDAV               | Partial                |
| REST / S3 / MCP      | HTTP or tool semantics |

See [POSIX guide](/guides/posix) for the full matrix.

<Warning>
  Run alternate protocol ports behind a firewall in production. NFS, S3, and WebDAV endpoints are sensitive network surfaces.
</Warning>

## Related documentation

<CardGroup cols={2}>
  <Card title="Agent interface" icon="robot" href="/concepts/agent-interface">
    Protocol overview.
  </Card>

  <Card title="CLI serve flags" icon="terminal" href="/cli/commands">
    Full `kiwifs serve` reference.
  </Card>

  <Card title="POSIX" icon="file-code" href="/guides/posix">
    Compliance details.
  </Card>

  <Card title="Real-time events" icon="bolt" href="/concepts/real-time-events">
    SSE broadcast.
  </Card>
</CardGroup>
