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

# S3

{% hint style="info" %}
이 문서는 Server CE와 Overleaf Pro에서 S3를 설정하는 방법을 다룹니다.  [별도의 가이드](/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>프로젝트 기록 블롭</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>filestore 서비스의 제한된 사용자의 액세스 키/사용자 이름입니다.</td></tr><tr><td><code>OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY</code></td><td>filestore 서비스의 제한된 사용자의 비밀 키/비밀번호입니다.</td></tr><tr><td><code>OVERLEAF_HISTORY_S3_ACCESS_KEY_ID</code></td><td>history 서비스의 제한된 사용자의 액세스 키/사용자 이름입니다.</td></tr><tr><td><code>OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY</code></td><td>history 서비스의 제한된 사용자의 비밀 키/비밀번호입니다.</td></tr></tbody></table>

Server CE와 Server Pro는 각 버킷에서 다음의 최소한의 권한만 필요로 합니다:

* 객체 생성
* 객체 가져오기
* 객체 삭제
* 버킷 목록 보기

### 액세스 정책

filestore 사용자에 대한 정책은 다음과 같이 보일 수 있습니다:

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

history 사용자에 대한 정책은 다음과 같이 보일 수 있습니다:

```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
# filestore에 대해 S3 백엔드 활성화
OVERLEAF_FILESTORE_BACKEND=s3

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

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

# filestore 사용자용 키
OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID=...

# filestore 사용자용 비밀값
OVERLEAF_FILESTORE_S3_SECRET_ACCESS_KEY=...

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

# history에 대해 S3 백엔드 활성화
OVERLEAF_HISTORY_BACKEND=s3

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

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

# history 사용자용 키
OVERLEAF_HISTORY_S3_ACCESS_KEY_ID=...

# history 사용자용 비밀값
OVERLEAF_HISTORY_S3_SECRET_ACCESS_KEY=...

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

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

```bash
# filestore에 대해 S3 백엔드 활성화
OVERLEAF_FILESTORE_BACKEND=s3

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

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

# filestore 사용자용 키
OVERLEAF_FILESTORE_S3_ACCESS_KEY_ID=...

# filestore 사용자용 비밀값
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=""

# history에 대해 S3 백엔드 활성화
OVERLEAF_HISTORY_BACKEND=s3

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

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

# history 사용자용 키
OVERLEAF_HISTORY_S3_ACCESS_KEY_ID=...

# history 사용자용 비밀값
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에 넣습니다.

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

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