> 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/ko/configuration/overleaf-toolkit/s3.md).

# S3

{% hint style="info" %}
이 문서는 Server CE 및 Overleaf Pro에서 S3 설정을 다룹니다. A [별도의 가이드](/on-premises/ko/maintenance/s3-migration.md) 기존 데이터를 S3 호환 스토리지로 마이그레이션하는 방법은 별도 가이드에서 확인할 수 있습니다.
{% endhint %}

## 데이터 저장소로 S3를 고려해야 할 때

1000석 미만의 인스턴스에는 정기적인 [일관된 백업과 함께 로컬 디스크 저장소를 사용하는 것을 권장합니다.](https://docs.overleaf.com/on-premises/maintenance/data-and-backups#performing-a-consistent-backup).

1000석을 초과하고 로컬 저장소의 한계(크기 또는 처리량)에 도달하는 더 큰 인스턴스의 경우, NFS와 같은 다른 네트워크 기반 저장소 솔루션보다 S3 호환 오브젝트 스토리지 백엔드를 사용하는 것을 권장합니다.

## S3 호환 오브젝트 스토리지 옵션

다음은 S3 호환 오브젝트 스토리지의 가장 인기 있는 옵션입니다:

* [AWS S3](https://aws.amazon.com/s3/)관리형이며, AWS에서 Overleaf CE/Server Pro를 실행하는 경우 AWS S3를 선택하는 것을 권장합니다
* [MINIO](https://min.io/)자가 호스팅
* [Ceph](https://ceph.io/en/)자가 호스팅
* 다른 호스팅 제공업체들도 어떤 형태의 관리형 S3 호환 오브젝트 스토리지를 제공하므로, 이미 그런 제공업체에서 Overleaf CE/Server Pro를 실행 중이라면 직접 운영하는 대신 이러한 옵션을 사용하는 것이 좋습니다.

## S3 호환 오브젝트 스토리지를 선택할 때의 지연 시간 고려 사항

Server CE/Server Pro 인스턴스와 S3 호환 오브젝트 스토리지 간의 지연 시간은 마이그레이션 완료에 걸리는 시간에 큰 영향을 미칩니다. 지연 시간은 Server CE/Server Pro의 파일 업로드 성능에도 영향을 주며, 느린 파일 다운로드는 PDF 컴파일 시간에도 큰 영향을 미칠 수 있습니다. Server CE/Server Pro 인스턴스와 S3 호환 오브젝트 스토리지 사이의 지리적 거리를 최소화하는 것을 권장합니다. 관리형 환경에서는 같은 리전에 버킷을 프로비저닝하는 것을 의미하고, 온프레미스 솔루션에서는 두 시스템을 같은 캠퍼스에서 운영하는 것을 의미합니다.

## S3 설정

4개의 "버킷"과 2개의 제한된 사용자 계정이 필요합니다.

{% hint style="warning" %}
버킷은 **아니** 공개적으로 접근 가능해야 합니다
{% 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>버킷</td><td>사용법</td><td>서비스</td><td>이전에는 <code>/var/lib/overleaf/data</code></td></tr><tr><td><code>overleaf-user-files</code></td><td>프로젝트 사용자 파일</td><td>filestore</td><td><code>user_files</code></td></tr><tr><td><code>overleaf-template-files</code></td><td>템플릿 파일</td><td>filestore</td><td><code>template_files</code></td></tr><tr><td><code>overleaf-project-blobs</code></td><td>프로젝트 기록 blob</td><td>기록 및 읽기 전용 파일 저장소</td><td><code>history/overleaf-project-blobs</code></td></tr><tr><td><code>overleaf-chunks</code></td><td>기록 청크</td><td>history</td><td><code>history/overleaf-chunks</code></td></tr></tbody></table>

다른 이름을 선택해야 하거나 선택하고 싶을 수 있으므로, 모든 명령에서 사용자 지정 버킷을 반드시 사용하세요.

다음에는 실제 자격 증명 대신 자리 표시자를 사용합니다:

<table><thead><tr><th width="431">환경 변수</th><th>설명</th></tr></thead><tbody><tr><td><code>OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID</code></td><td>파일 저장소 서비스의 제한된 사용자의 액세스 키/사용자 이름입니다.</td></tr><tr><td><code>OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY</code></td><td>파일 저장소 서비스의 제한된 사용자의 비밀 키/비밀번호입니다.</td></tr><tr><td><code>OVERLEAF_HISTORY_S3_ACCESS_KEY_ID</code></td><td>기록 서비스의 제한된 사용자의 액세스 키/사용자 이름입니다.</td></tr><tr><td><code>OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY</code></td><td>기록 서비스의 제한된 사용자의 비밀 키/비밀번호입니다.</td></tr></tbody></table>

Server CE 및 Server Pro는 각 버킷에 대해 소수의 권한만 필요합니다:

* 객체 생성
* 객체 가져오기
* 객체 삭제
* 버킷 나열

### 액세스 정책

파일 저장소 사용자에 대한 정책은 다음과 같을 수 있습니다:

```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/*"
    }
  ]
}
```

기록 사용자에 대한 정책은 다음과 같을 수 있습니다:

```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/*"
    }
  ]
}
```

### 변수 개요

#### AWS S3를 사용할 때

```bash
# 파일 저장소용 S3 백엔드 활성화
OVERLEAF_FILESTORE_BACKEND=s3

# 프로젝트 파일용 버킷 이름
OVERLEAF_FILESTORE_USER_FILES_BUCKET_NAME=overleaf-user-files

# 템플릿 파일용 버킷 이름
OVERLEAF_FILESTORE_TEMPLATE_FILES_BUCKET_NAME=overleaf-template-files

# 파일 저장소 사용자용 키
OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID=...

# 파일 저장소 사용자용 비밀 키
OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY=...

# 버킷을 생성할 때 선택한 버킷 리전.
OVERLEAF_FILESTORE_S3_REGION=""

# 기록용 S3 백엔드 활성화
OVERLEAF_HISTORY_BACKEND=s3

# 프로젝트 기록 blob용 버킷 이름
OVERLEAF_HISTORY_PROJECT_BLOBS_BUCKET=overleaf-project-blobs

# 기록 청크용 버킷 이름
OVERLEAF_HISTORY_CHUNKS_BUCKET=overleaf-chunks

# 기록 사용자용 키
OVERLEAF_HISTORY_S3_ACCESS_KEY_ID=...

# 기록 사용자용 비밀 키
OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY=...

# 버킷을 생성할 때 선택한 버킷 리전.
OVERLEAF_HISTORY_S3_REGION=""
```

#### 자가 호스팅 옵션을 사용할 때

```bash
# 파일 저장소용 S3 백엔드 활성화
OVERLEAF_FILESTORE_BACKEND=s3

# 프로젝트 파일용 버킷 이름
OVERLEAF_FILESTORE_USER_FILES_BUCKET_NAME=overleaf-user-files

# 템플릿 파일용 버킷 이름
OVERLEAF_FILESTORE_TEMPLATE_FILES_BUCKET_NAME=overleaf-template-files

# 파일 저장소 사용자용 키
OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID=...

# 파일 저장소 사용자용 비밀 키
OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY=...

# S3 제공자 엔드포인트
OVERLEAF_FILESTORE_S3_ENDPOINT=http://10.10.10.10:9000

# 버킷의 경로 스타일 주소 지정입니다. 대부분의 경우 이를 "true"로 설정해야 합니다.
OVERLEAF_FILESTORE_S3_PATH_STYLE="true"

# 버킷 리전. 대부분의 경우 이 설정은 구성할 필요가 없습니다.
OVERLEAF_FILESTORE_S3_REGION=""

# 기록용 S3 백엔드 활성화
OVERLEAF_HISTORY_BACKEND=s3

# 프로젝트 기록 blob용 버킷 이름
OVERLEAF_HISTORY_PROJECT_BLOBS_BUCKET=overleaf-project-blobs

# 기록 청크용 버킷 이름
OVERLEAF_HISTORY_CHUNKS_BUCKET=overleaf-chunks

# 기록 사용자용 키
OVERLEAF_HISTORY_S3_ACCESS_KEY_ID=...

# 기록 사용자용 비밀 키
OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY=...

# S3 제공자 엔드포인트
OVERLEAF_HISTORY_S3_ENDPOINT=http://10.10.10.10:9000

# 버킷의 경로 스타일 주소 지정입니다. 대부분의 경우 이를 "true"로 설정해야 합니다.
OVERLEAF_HISTORY_S3_PATH_STYLE="true"

# 버킷 리전. 대부분의 경우 이 설정은 구성할 필요가 없습니다.
OVERLEAF_HISTORY_S3_REGION=""
```

### MINIO 설정

{% hint style="info" %}
`MINIO_ROOT_USER` 그리고 `MINIO_ROOT_PASSWORD` MINIO 인스턴스의 루트 자격 증명입니다.
{% endhint %}

다음을 따라 주세요 [공식 문서](https://min.io/docs/minio/linux/reference/minio-mc.html#quickstart) 의 사본을 얻으려면 `mc`.

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

# 이전 섹션의 정책 내용을 다음에 넣으세요
# 각 JSON 파일 policy-filestore.json 및 policy-history.json에 넣으세요.

# 알림: 버킷 이름과 자격 증명을 그에 맞게 바꾸세요.

# 파일 저장소 버킷, 사용자 및 정책
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

# 기록 버킷, 사용자 및 정책
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/ko/configuration/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.
