Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add documentation for the S3_KEY_PREFIX environment variable #1438

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Add documentation for the S3_KEY_PREFIX environment variable
  • Loading branch information
S0yKaf committed May 5, 2024
commit 3beb730c57b4a3650f8a0ea861a70dfd9c265200
4 changes: 3 additions & 1 deletion content/en/admin/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -571,6 +571,8 @@ The bucket must support access control lists (ACLs). For AWS S3, this means sett

#### `S3_BUCKET`

#### `S3_KEY_PREFIX`

#### `AWS_ACCESS_KEY_ID`

#### `AWS_SECRET_ACCESS_KEY`
Expand Down Expand Up @@ -821,7 +823,7 @@ It is important to use a supported file format (JPEG or PNG, not SVG).

## Limits {#limits}

### Anti Spam / Abuse
### Anti Spam / Abuse

#### `HCAPTCHA_SITE_KEY`
#### `HCAPTCHA_SECRET_KEY`
Expand Down
7 changes: 7 additions & 0 deletions content/en/admin/optional/object-storage.md
Original file line number Diff line number Diff line change
Expand Up @@ -192,6 +192,13 @@ During batch delete operations, S3 providers may perodically fail or
timeout while processing deletion requests. Mastodon will back off and
retry the request up to this maximum number of times.

### `S3_KEY_PREFIX`

Default: none
S0yKaf marked this conversation as resolved.
Show resolved Hide resolved

Prefix added to all S3 object keys. Useful for hosting multiple instances on the
same bucket. Object path will become: '/<S3_KEY_PREFIX>/\<object path\>'

S0yKaf marked this conversation as resolved.
Show resolved Hide resolved
### MinIO

MinIO is an open-source implementation of an S3 object provider. This section does not cover how to install it, but how to configure a bucket for use in Mastodon.
Expand Down
9 changes: 5 additions & 4 deletions content/zh-cn/admin/config.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ Mastodon使用环境变量作为其的配置。
#### `AUTHORIZED_FETCH` {#authorized_fetch}

当设置为 `true` 时,Mastodon将停止内联签名活动,并要求远程服务器在拉取公开(public)和不公开(unlisted)的嘟文时进行身份验证。

这可以阻止被屏蔽的域名拉取你的公开嘟文,但代价是可能增加计算量,并与不支持附带签名的拉取请求的软件不兼容(如低于3.0版本的Mastodon)。

请注意:这个模式并不能保证你的公开嘟文(public、unlisted)不被恶意操作者获取,这仅仅是增加了一点难度。

#### `WHITELIST_MODE` {#whitelist_mode}

当设置为 `true` 时,Mastodon将仅与白名单内的服务器互联,同时关闭公开页面和一些客户端API。
白名单模式会启用 authorized fetch 模式。

当一个现存实例站点切换至白名单模式,以下命令可以被用来移除非白名单站点的数据:
```
tootctl domain purge --whitelist-mode
```

请注意:虽然Mastodon 3.0 版本便引入了白名单模式 `WHITELIST_MODE`,但在Mastodon 3.0和3.0.1版中并没有正确实现。

### 密钥 {#secrets}
Expand Down Expand Up @@ -141,6 +141,7 @@ Mastodon使用环境变量作为其的配置。

* `S3_ENABLED`
* `S3_BUCKET`
* `S3_KEY_PREFIX`
* `AWS_ACCESS_KEY_ID`
* `AWS_SECRET_ACCESS_KEY`
* `S3_REGION`
Expand Down