> For the complete documentation index, see [llms.txt](https://overleaf-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://overleaf-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 [aparte handleiding](/on-premises/nl/onderhoud/s3-migration.md) is te vinden over het migreren van bestaande gegevens naar S3-compatibele opslag.
{% endhint %}

## Wanneer u moet overwegen S3 te gebruiken 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 objectopslagbackend 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, raden we aan AWS S3 te kiezen wanneer u Overleaf CE/Server Pro op AWS draait
* [MINIO](https://min.io/), zelfgehost
* [Ceph](https://ceph.io/en/), zelfgehost
* Andere hostingproviders hebben ook een of andere vorm van beheerde S3-compatibele objectopslag; mogelijk wilt u die gebruiken in plaats van er zelf een te draaien wanneer u Overleaf CE/Server Pro al bij zo'n provider draait.

## Latency-overwegingen bij het kiezen van een S3-compatibele objectopslag

De latency tussen de Server CE/Server Pro-instantie en uw S3-compatibele objectopslag is een grote factor in de tijd die nodig is om de migratie te voltooien. De latency heeft ook invloed op de prestaties bij het uploaden van bestanden in Server CE/Server Pro, en langzame bestandsdownloads kunnen ook een grote impact hebben op de 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 betekent dit dat u een bucket in dezelfde regio inricht, en voor een on-premises oplossing dat u beide 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>Eerder 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>projectgeschiedenis-blobs</td><td>geschiedenis- en alleen-lezen filestore</td><td><code>history/overleaf-project-blobs</code></td></tr><tr><td><code>overleaf-chunks</code></td><td>geschiedenis-chunks</td><td>history</td><td><code>history/overleaf-chunks</code></td></tr></tbody></table>

Mogelijk wilt/moet u een andere naam kiezen; zorg ervoor dat u de aangepaste buckets in alle opdrachten gebruikt.

Het volgende gebruikt placeholders voor 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/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/wachtwoord van de beperkte gebruiker van de history-service.</td></tr></tbody></table>

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

* object aanmaken
* object ophalen
* object verwijderen
* bucket opsommen

### Toegangsbeleidsregels

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

#### Wanneer u AWS S3 gebruikt

```bash
# Schakel S3-backend in voor filestore
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 in voor history
OVERLEAF_HISTORY_BACKEND=s3

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

# Bucketnaam voor geschiedenis-chunks
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=""
```

#### Wanneer u een zelfgehoste optie gebruikt

```bash
# Schakel S3-backend in voor filestore
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=...

# Eindpunt van de S3-provider
OVERLEAF_FILESTORE_S3_ENDPOINT=http://10.10.10.10:9000

# Path-style adressering van buckets. Waarschijnlijk moet u dit op "true" instellen.
OVERLEAF_FILESTORE_S3_PATH_STYLE="true"

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

# Schakel S3-backend in voor history
OVERLEAF_HISTORY_BACKEND=s3

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

# Bucketnaam voor geschiedenis-chunks
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=...

# Eindpunt van de S3-provider
OVERLEAF_HISTORY_S3_ENDPOINT=http://10.10.10.10:9000

# Path-style adressering van buckets. Waarschijnlijk moet u dit op "true" instellen.
OVERLEAF_HISTORY_S3_PATH_STYLE="true"

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

### MINIO-instelling

{% 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 de vorige sectie in het
# respectievelijke 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

# geschiedenis-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://overleaf-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.
