---
title: Mount Data Directories
description: How to make files available to Pinchy agents by mounting directories into the container.
---

Pinchy agents can only access files inside the `/data/` directory in the container. To make your documents available, you mount host directories into subdirectories of `/data/` using Docker volumes.

## The `/data/` convention

![Agent permissions with directory picker — select which directories each agent can access](/screenshots/agent-settings-permissions.png)

All agent-accessible files live under `/data/` inside the **OpenClaw** container. Pinchy's `pinchy-files` plugin runs inside OpenClaw and reads files from that path. The `pinchy-data` named volume is mounted there by default, but you can bind-mount additional host directories as subdirectories.

This convention provides a clear boundary: anything under `/data/` is potentially accessible to agents (depending on their permissions), and nothing outside `/data/` is.

## Adding volumes in `docker-compose.yml`

To mount a local folder, add a bind mount under the **`openclaw`** service's `volumes` section:

```yaml
services:
  openclaw:
    volumes:
      - openclaw-config:/root/.openclaw
      - pinchy-workspaces:/root/.openclaw/workspaces
      - openclaw-extensions:/root/.openclaw/extensions
      - pinchy-data:/data
      - pinchy-pdf-cache:/var/cache/pinchy-files
      # Add your data directories here:
      - /path/on/host/hr-policies:/data/hr-policies:ro
      - /path/on/host/engineering-docs:/data/engineering-docs:ro
```

The `:ro` suffix mounts the directory as read-only, which is recommended since agents only need to read files.

After updating `docker-compose.yml`, restart the OpenClaw container:

```bash
docker compose up -d --no-deps openclaw
```

## Examples

### Local folder

Mount a folder from your host machine:

```yaml
volumes:
  - /home/admin/company-docs:/data/company-docs:ro
```

### NAS or network drive

If your NAS is mounted on the host at `/mnt/nas/shared`, mount a subdirectory:

```yaml
volumes:
  - /mnt/nas/shared/legal:/data/legal:ro
  - /mnt/nas/shared/finance:/data/finance:ro
```

### Multiple directories

You can mount as many directories as you need:

```yaml
volumes:
  - /srv/docs/hr:/data/hr:ro
  - /srv/docs/engineering:/data/engineering:ro
  - /srv/docs/compliance:/data/compliance:ro
```

Each mounted directory appears as a separate selectable option in the Permissions tab when configuring an agent.

## How directories appear in the UI

When you configure an agent's permissions in the **Permissions tab** of Agent Settings, Pinchy scans `/data/` for subdirectories and displays them as selectable options. Each mounted directory shows up by name — for example, `/data/hr-policies` appears as "hr-policies".

Only top-level subdirectories of `/data/` are listed. Nested directories within those are accessible to the agent but are not listed separately in the directory picker.

## Verifying your mounts

To check that your directories are correctly mounted, you can exec into the running container:

```bash
docker compose exec openclaw ls /data/
```

You should see your mounted directories listed.

## Supported file types

Knowledge Base agents can read text files, Markdown, and **PDF documents** — including scanned PDFs, which are analyzed using the configured model's vision capabilities. See [Create a Knowledge Base Agent — PDF support](/guides/create-knowledge-base-agent/#pdf-support) for details.

## Knowledge Base vs. workspace files

Directories mounted under `/data/` are **admin-curated and read-only for agents** — they hold your organization's reference documents and are not writable by agents under any configuration.

This is intentional: it keeps your authoritative documents separate from anything an agent might generate or derive. An agent that has the **Write files** permission saves results to its own `uploads/` workspace, not to `/data/`. See [Agent Permissions](/concepts/agent-permissions/) for details on the workspace write capability.
