---
title: "Local disk"
description: "Store books on a mounted directory — no bucket, no credentials."
---

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

# Local disk

The default driver, and the simplest option for a single-machine setup.
Bookhoarder writes directly to a directory, so mount a volume (or a
`PersistentVolumeClaim` on Kubernetes) to persist it across restarts.

1. **Leave STORAGE_DRIVER unset, or set it to local**

   It's the default.
2. **Mount a volume at /app/.data**

   Or set `LOCAL_STORAGE_PATH` to mount somewhere else.
3. **Start the container**

   Books persist across restarts as long as the volume does.

## Configuration

| Variable | Required | Notes |
| --- | --- | --- |
| `STORAGE_DRIVER` | Yes | `local` — also the default if unset |
| `LOCAL_STORAGE_PATH` | No | Defaults to `./.data`, resolved against `/app` — leave it as-is and mount `/app/.data` |

## Docker

```sh
docker run -d \
  --name bookhoard \
  -p 3000:3000 \
  -v bookhoard_data:/app/.data \
  -e STORAGE_DRIVER=local \
  ghcr.io/bookhoard/bookhoarder:latest
```

> **Mount the volume**
>
> Skip the `-v` flag and every book disappears the next time the container
> is recreated — the writable layer isn't persisted.

## When not to use it

The local driver ties book data to one container's (or pod's) filesystem —
there's no way for a second instance to see the same files. That rules it
out for:

- Cloudflare Workers, which have no writable filesystem at all — use
  [Cloudflare R2](/storage/cloudflare-r2) instead
- Any deployment you want to scale past one replica — use
  [S3](/storage/s3) or [R2](/storage/cloudflare-r2), which every instance
  can read and write concurrently

See [Deploy with Docker](/deployment/docker) for how this fits into a full
container setup, or [Deploy on Kubernetes](/deployment/kubernetes) for the
`PersistentVolumeClaim` version.

Source: https://docs.bookhoarder.dev/storage/local/index.mdx
