> For the complete documentation index, see [llms.txt](https://ayakaleaf-pro.ayaka.space/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ayakaleaf-pro.ayaka.space/on-premises/nl/configuratie/overleaf-toolkit/s3.md).

# S3

{% hint style="info" %}
Dit document behandelt de configuratie van S3 in Server CE en Overleaf Pro. Een [afzonderlijke handleiding](/on-premises/nl/onderhoud/s3-migration.md) kan worden gevonden voor het migreren van bestaande gegevens naar S3-compatibele opslag.
{% endhint %}

## Wanneer S3 te overwegen voor gegevensopslag

Voor instanties met minder dan 1000 seats raden we aan lokale schijfopslag te gebruiken met regelmatige [consistente back-ups](https://docs.overleaf.com/on-premises/maintenance/data-and-backups#performing-a-consistent-backup).

Voor grotere instanties met meer dan 1000 seats die de limieten van hun lokale opslag bereiken (grootte of doorvoer), raden we aan een S3-compatibele objectopslagback-end te gebruiken in plaats van andere netwerkgebaseerde opslagoplossingen zoals NFS.

## S3-compatibele objectopslagopties

Hier zijn de populairste opties voor S3-compatibele objectopslag:

* [AWS S3](https://aws.amazon.com/s3/), beheerd, we raden aan AWS S3 te kiezen wanneer u Overleaf CE/Server Pro op AWS gebruikt
* [MINIO](https://min.io/), zelf-gehost
* [Ceph](https://ceph.io/en/), zelf-gehost
* Andere hostingproviders hebben ook een vorm van beheerde S3-compatibele objectopslag; u kunt deze gebruiken in plaats van zelf iets te draaien wanneer u Overleaf CE/Server Pro al bij zo'n provider draait.

## Latentieoverwegingen bij het kiezen van een S3-compatibele objectopslag

De latentie tussen de Server CE/Server Pro-instantie en uw S3-compatibele objectopslag draagt in grote mate bij aan de tijd die nodig is om de migratie te voltooien. De latentie heeft ook invloed op de prestaties van bestandsuploads in Server CE/Server Pro en trage bestandsdownloads kunnen ook een grote invloed hebben op PDF-compilatietijden. We raden aan de geografische afstand tussen uw Server CE/Server Pro-instantie en de S3-compatibele objectopslag zo klein mogelijk te houden. In een beheerde omgeving zou dit betekenen dat u een bucket in dezelfde regio inricht, en voor een on-premise oplossing dat u de twee op dezelfde campus draait.

## S3-configuratie

We hebben vier "buckets" en twee beperkte gebruikersaccounts nodig.

{% hint style="warning" %}
Buckets moeten **niet** publiek toegankelijk zijn
{% endhint %}

<table data-header-hidden><thead><tr><th width="279"></th><th width="152"></th><th width="97"></th><th></th></tr></thead><tbody><tr><td>Bucket</td><td>Gebruik</td><td>Service</td><td>Voorheen in <code>/var/lib/overleaf/data</code></td></tr><tr><td><code>overleaf-user-files</code></td><td>projectgebruikersbestanden</td><td>filestore</td><td><code>user_files</code></td></tr><tr><td><code>overleaf-template-files</code></td><td>sjabloonbestanden</td><td>filestore</td><td><code>template_files</code></td></tr><tr><td><code>overleaf-project-blobs</code></td><td>projecthistorie-blobs</td><td>historie en filestore met alleen-lezen toegang</td><td><code>history/overleaf-project-blobs</code></td></tr><tr><td><code>overleaf-chunks</code></td><td>historiechunks</td><td>history</td><td><code>history/overleaf-chunks</code></td></tr></tbody></table>

U kunt mogelijk een andere naam kiezen; zorg ervoor dat u de aangepaste buckets in alle opdrachten gebruikt.

Het volgende gebruikt placeholders voor de daadwerkelijke inloggegevens:

<table><thead><tr><th width="431">Omgevingsvariabele</th><th>Beschrijving</th></tr></thead><tbody><tr><td><code>OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID</code></td><td>De toegangssleutel/gebruikersnaam van de beperkte gebruiker van de filestore-service.</td></tr><tr><td><code>OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY</code></td><td>De geheime sleutel/het wachtwoord van de beperkte gebruiker van de filestore-service.</td></tr><tr><td><code>OVERLEAF_HISTORY_S3_ACCESS_KEY_ID</code></td><td>De toegangssleutel/gebruikersnaam van de beperkte gebruiker van de history-service.</td></tr><tr><td><code>OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY</code></td><td>De geheime sleutel/het wachtwoord van de beperkte gebruiker van de history-service.</td></tr></tbody></table>

Server CE en Server Pro hebben slechts een kleine set machtigingen nodig op elke bucket:

* object aanmaken
* object ophalen
* object verwijderen
* bucket weergeven

### Toegangsbeleid

Zo kan een beleid voor de filestore-gebruiker eruitzien:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": "arn:aws:s3:::overleaf-user-files"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::overleaf-user-files/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:GetObject",
      ],
      "Resource": "arn:aws:s3:::overleaf-project-blobs/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": "arn:aws:s3:::overleaf-template-files"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::overleaf-template-files/*"
    }
  ]
}
```

Zo kan een beleid voor de history-gebruiker eruitzien:

```json
{
  "Version": "2012-10-17",
  "Statement": [
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": "arn:aws:s3:::overleaf-project-blobs"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::overleaf-project-blobs/*"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:ListBucket"
      ],
      "Resource": "arn:aws:s3:::overleaf-chunks"
    },
    {
      "Effect": "Allow",
      "Action": [
        "s3:PutObject",
        "s3:GetObject",
        "s3:DeleteObject"
      ],
      "Resource": "arn:aws:s3:::overleaf-chunks/*"
    }
  ]
}
```

### Overzicht van variabelen

#### Bij gebruik van AWS S3

```bash
# Schakel S3-backend voor filestore in
OVERLEAF_FILESTORE_BACKEND=s3

# Bucketnaam voor projectbestanden
OVERLEAF_FILESTORE_USER_FILES_BUCKET_NAME=overleaf-user-files

# Bucketnaam voor sjabloonbestanden
OVERLEAF_FILESTORE_TEMPLATE_FILES_BUCKET_NAME=overleaf-template-files

# Sleutel voor filestore-gebruiker
OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID=...

# Geheim voor filestore-gebruiker
OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY=...

# Bucketregio die u hebt gekozen bij het aanmaken van de buckets.
OVERLEAF_FILESTORE_S3_REGION=""

# Schakel S3-backend voor history in
OVERLEAF_HISTORY_BACKEND=s3

# Bucketnaam voor projecthistorie-blobs
OVERLEAF_HISTORY_PROJECT_BLOBS_BUCKET=overleaf-project-blobs

# Bucketnaam voor historiechunks
OVERLEAF_HISTORY_CHUNKS_BUCKET=overleaf-chunks

# Sleutel voor history-gebruiker
OVERLEAF_HISTORY_S3_ACCESS_KEY_ID=...

# Geheim voor history-gebruiker
OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY=...

# Bucketregio die u hebt gekozen bij het aanmaken van de buckets.
OVERLEAF_HISTORY_S3_REGION=""
```

#### Bij gebruik van een zelf-gehoste optie

```bash
# Schakel S3-backend voor filestore in
OVERLEAF_FILESTORE_BACKEND=s3

# Bucketnaam voor projectbestanden
OVERLEAF_FILESTORE_USER_FILES_BUCKET_NAME=overleaf-user-files

# Bucketnaam voor sjabloonbestanden
OVERLEAF_FILESTORE_TEMPLATE_FILES_BUCKET_NAME=overleaf-template-files

# Sleutel voor filestore-gebruiker
OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID=...

# Geheim voor filestore-gebruiker
OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY=...

# S3-provider-eindpunt
OVERLEAF_FILESTORE_S3_ENDPOINT=http://10.10.10.10:9000

# Padstijladressering van buckets. Waarschijnlijk moet u dit op "true" zetten.
OVERLEAF_FILESTORE_S3_PATH_STYLE="true"

# Bucketregio. Waarschijnlijk hoeft u dit niet te configureren.
OVERLEAF_FILESTORE_S3_REGION=""

# Schakel S3-backend voor history in
OVERLEAF_HISTORY_BACKEND=s3

# Bucketnaam voor projecthistorie-blobs
OVERLEAF_HISTORY_PROJECT_BLOBS_BUCKET=overleaf-project-blobs

# Bucketnaam voor historiechunks
OVERLEAF_HISTORY_CHUNKS_BUCKET=overleaf-chunks

# Sleutel voor history-gebruiker
OVERLEAF_HISTORY_S3_ACCESS_KEY_ID=...

# Geheim voor history-gebruiker
OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY=...

# S3-provider-eindpunt
OVERLEAF_HISTORY_S3_ENDPOINT=http://10.10.10.10:9000

# Padstijladressering van buckets. Waarschijnlijk moet u dit op "true" zetten.
OVERLEAF_HISTORY_S3_PATH_STYLE="true"

# Bucketregio. Waarschijnlijk hoeft u dit niet te configureren.
OVERLEAF_HISTORY_S3_REGION=""
```

### MINIO-configuratie

{% hint style="info" %}
`MINIO_ROOT_USER` en `MINIO_ROOT_PASSWORD` zijn de root-inloggegevens van de MINIO-instantie.
{% endhint %}

Volg alstublieft de [officiële documentatie](https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart) voor het verkrijgen van een kopie van `mc`.

```bash
mc alias set s3 http://10.10.10.10:9000 MINIO_ROOT_USER MINIO_ROOT_PASSWORD

# Plaats de inhoud van de beleidsregels uit het vorige gedeelte in de
# respectieve json-bestanden policy-filestore.json en policy-history.json.

# Herinnering: vervang de bucketnamen en inloggegevens dienovereenkomstig.

# filestore-buckets, gebruiker en beleid
mc mb --ignore-existing s3/overleaf-user-files
mc mb --ignore-existing s3/overleaf-template-files
mc admin user add s3 \
  OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID \
  OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY
mc admin policy create s3 overleaf-filestore policy-filestore.json
mc admin policy attach s3 overleaf-filestore \
  --user=OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID

# history-buckets, gebruiker en beleid
mc mb --ignore-existing s3/overleaf-project-blobs
mc mb --ignore-existing s3/overleaf-chunks
mc admin user add s3 \
  OVERLEAF_HISTORY_S3_ACCESS_KEY_ID \
  OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY
mc admin policy create s3 overleaf-history policy-history.json
mc admin policy attach s3 overleaf-history \
  --user=OVERLEAF_HISTORY_S3_ACCESS_KEY_ID
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ayakaleaf-pro.ayaka.space/on-premises/nl/configuratie/overleaf-toolkit/s3.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
