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

# Block Storage

> Configure local filesystem or S3-compatible block storage

Block storage holds the content behind TinyCloud values. Choose the backend that matches your deployment size and operational model.

## Backends

| Backend          | Best for                                      |
| ---------------- | --------------------------------------------- |
| Local filesystem | Development and small single-node deployments |
| S3-compatible    | Production and multi-node storage             |

## Local filesystem

```toml theme={null}
[storage.blocks]
type = "Local"
path = "./data/blocks"
```

```bash theme={null}
TINYCLOUD_STORAGE__BLOCKS__TYPE=Local
TINYCLOUD_STORAGE__BLOCKS__PATH=./data/blocks
```

## S3-compatible storage

```toml theme={null}
[storage.blocks]
type = "S3"
bucket = "tinycloud-blocks"
endpoint = "https://s3.amazonaws.com"
```

```bash theme={null}
TINYCLOUD_STORAGE__BLOCKS__TYPE=S3
TINYCLOUD_STORAGE__BLOCKS__BUCKET=tinycloud-blocks
TINYCLOUD_STORAGE__BLOCKS__ENDPOINT=https://s3.amazonaws.com
AWS_ACCESS_KEY_ID=...
AWS_SECRET_ACCESS_KEY=...
AWS_DEFAULT_REGION=us-east-1
```

## Staging storage

Staging buffers uploads before they are written to block storage.

```toml theme={null}
[storage.staging]
type = "Memory"
```

Use `FileSystem` when you need a disk-backed staging area.

## Data directory

If you leave paths unset, the node resolves them under `storage.datadir` and creates the local directories it needs.

<Tip>
  Use the local backend for quick setup, then move to S3-compatible storage when you need a durable shared backend.
</Tip>
