aerogramme.deuxfleurs.fr/content/documentation/cookbook/single-node-garage-storage.md

53 lines
1.6 KiB
Markdown
Raw Normal View History

2024-01-22 10:01:47 +00:00
+++
title = "Local storage"
2024-01-23 11:08:50 +00:00
weight = 5
2024-01-22 10:01:47 +00:00
+++
2024-01-23 11:08:50 +00:00
Currently, Aerogramme does not support local storage (ie. storing emails
on your filesystem directly). It might support this feature in the future,
but no ETA is announced yet. In the mean time, we will deploy a single-node
Garage cluster to store the data.
2024-01-22 10:01:47 +00:00
2024-01-23 11:08:50 +00:00
Start by following the [Garage Quickstart](https://garagehq.deuxfleurs.fr/documentation/quick-start/) up to "Creating a cluster layout" (included).
## Setup your storage
Create one key per user:
```bash
garage key create aerogramme
# ...
```
*Do not forget to note the key, it will be needed later.*
Create an Aerogramme bucket for each user:
```bash
garage bucket create aerogramme-alice
garage bucket create aerogramme-bob
garage bucket create aerogramme-charlie
# ...
```
*Having one bucket per user is an opinionated design choice made to support Aerogramme [Per-user storage, per-user encryption](@/documentation/design/per-user-encryption.md) goal.*
And then allow the aerogramme key on each bucket:
```bash
garage bucket allow --read --write --key aerogramme aerogramme-alice
garage bucket allow --read --write --key aerogramme aerogramme-bob
garage bucket allow --read --write --key aerogramme aerogramme-charlie
# ...
```
## Automating it
You can automate this by using the [Garage Admin API](https://garagehq.deuxfleurs.fr/documentation/reference-manual/admin-api/) and the [S3 API](https://garagehq.deuxfleurs.fr/documentation/reference-manual/s3-compatibility/).
## Quota
You can use Garage per-bucket quota to limit the amount of space a user can
use, but such data is not reported on the IMAP side.