Hi, the Storage settings documentation at https://forgejo.org/docs/latest/admin/storage/#s3-servers-compatibility has a dead link to https://codeberg.org/forgejo/forgejo/src/branch/forgejo/.forgejo/upgrades/test-upgrade.sh.
I'd also like to suggest adding a note indicating that MINIO_USE_SSL defaults to false, which is not indicated in forgejo's documentation, but is in gitea's documentation, and would have saved a lot of head-wall-interaction if noted. The below troubleshooting notes are so future me's can figure this out via SEO.
I was hitting a confusing error when trying to add Storj's S3 gateway to forgejo:
May 01 09:29:41 l forgejo[2419284]: 2024年05月01日 09:29:41 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at gateway.storjshare.io:bucket with base path attachments/
May 01 09:29:41 l forgejo[2419284]: 2024年05月01日 09:29:41 routers/init.go:61:mustInit() [F] code.gitea.io/gitea/modules/storage.Init failed: 302 Found
Couldn't track it down on search engines either. Turns out that I hadn't noticed that Gitea's MinIO integration assumes that SSL is not used by default. The below configuration works for Storj via S3:
[attachment]
MINIO_BASE_PATH = attachments/
STORAGE_TYPE = minio
SERVE_DIRECT = true
MINIO_USE_SSL = true
MINIO_ENDPOINT = gateway.storjshare.io
MINIO_LOCATION = unused
MINIO_ACCESS_KEY_ID =
MINIO_SECRET_ACCESS_KEY =
MINIO_BUCKET = bucket
Hi, the Storage settings documentation at https://forgejo.org/docs/latest/admin/storage/#s3-servers-compatibility has a dead link to https://codeberg.org/forgejo/forgejo/src/branch/forgejo/.forgejo/upgrades/test-upgrade.sh.
I'd also like to suggest adding a note indicating that MINIO_USE_SSL defaults to `false`, which is not indicated in forgejo's documentation, but is in gitea's documentation, and would have saved a lot of head-wall-interaction if noted. The below troubleshooting notes are so future me's can figure this out via SEO.
I was hitting a confusing error when trying to add Storj's S3 gateway to forgejo:
```
May 01 09:29:41 l forgejo[2419284]: 2024年05月01日 09:29:41 ...les/storage/minio.go:86:NewMinioStorage() [I] Creating Minio storage at gateway.storjshare.io:bucket with base path attachments/
May 01 09:29:41 l forgejo[2419284]: 2024年05月01日 09:29:41 routers/init.go:61:mustInit() [F] code.gitea.io/gitea/modules/storage.Init failed: 302 Found
```
Couldn't track it down on search engines either. Turns out that I hadn't noticed that Gitea's MinIO integration assumes that SSL is not used by default. The below configuration works for Storj via S3:
```
[attachment]
MINIO_BASE_PATH = attachments/
STORAGE_TYPE = minio
SERVE_DIRECT = true
MINIO_USE_SSL = true
MINIO_ENDPOINT = gateway.storjshare.io
MINIO_LOCATION = unused
MINIO_ACCESS_KEY_ID =
MINIO_SECRET_ACCESS_KEY =
MINIO_BUCKET = bucket
```