Self-hosting compose files fail to deploy: `minio/minio` and `minio/mc` are gone from Docker Hub (+ Coolify generates a too-short `DATABASE_ENCRYPTION_KEY`)
メンテナーはふだん 1 日以内に返信
まだ誰も着手していません。
評価
- 難易度
- 4/5
- 見積もり時間
- 3〜5日
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- おおむね明確
- 活発さ
- 活発
- 技術スタック
- docker, docker-compose, typescript
- 領域
- devops, infrastructure, security
調査の方向性
Start with docker-compose.yml, docker-compose.coolify.yml, and docker-compose.template.yml, then inspect packages/database/crypto.ts and the listed encryption call sites. Run the compose deployment and health checks on the supported Coolify version, including the template-specific setup. Done means the images pull, services become healthy, and encryption-dependent features no longer reject the generated key.
索引モデルが issue の本文から書いたものです。
説明
Summary
Following the self-hosting guide on 2026-09-29 with docker-compose.coolify.yml (Coolify v4.3.23), I hit two problems. The first one is not Coolify-specific: docker-compose.yml uses the same images.
- The deployment fails at image pull because the MinIO images no longer exist on Docker Hub.
- After working around that, the Coolify template generates a
DATABASE_ENCRYPTION_KEYthat Cap rejects as the wrong length.
1. MinIO images no longer exist on Docker Hub
Pull log from Coolify:
Image minio/mc:latest Error pull access denied for minio/mc, repository does not exist or may require 'docker login'
Image minio/minio:latest Interrupted
The Docker Hub API returns object not found for both minio/minio and minio/mc. bitnami/minio, which docker-compose.template.yml uses, has 0 tags left.
Affected files:
docker-compose.yml(minio/minio:latest,minio/mc:latest)docker-compose.coolify.yml(minio/minio:latest,minio/mc:latest)docker-compose.template.yml(bitnami/minio:latest)
Related: #1770 (MinIO repository archival). That issue raises the long-term concern; this one is the concrete breakage it led to.
2. SERVICE_HEX_32_* now yields a 16-byte key on Coolify
packages/database/crypto.ts requires DATABASE_ENCRYPTION_KEY to decode to exactly 32 bytes (KEY_LENGTH = 32, Buffer.from(key, "hex")), which is 64 hex characters.
Since Coolify 4.3.1 (coollabsio/coolify#9820), SERVICE_HEX_32_* generates 32 hex characters (16 bytes) instead of 64. On Coolify v4.3.23 the generated SERVICE_HEX_32_DATABASEENCRYPTIONKEY is 32 characters long, so ENCRYPTION_KEY() throws Invalid encryption key format: Encryption key must be 32 bytes (64 hex characters).
Every feature that encrypts data then fails, including password-protected videos (lib/password-cookie.ts), custom S3 storage (actions/organization/storage.ts, Storage/StorageRepo.ts), developer apps and API keys (actions/developers/*), integrations (lib/integrations/installations.ts) and the Google Drive storage quota.
NEXTAUTH_SECRET and MEDIA_SERVER_WEBHOOK_SECRET have no length requirement, so they are fine as they are.
Proposed fix
- Replace the MinIO images with
pgsty/minioandpgsty/mc. Silo is the community-maintained MinIO fork published by Pigsty (AGPLv3, about 1M pulls, updated in 2026). It is a drop-in replacement:- The image ships the
miniobinary with the samedocker-entrypoint.sh, socommand: server /data ...is unchanged. - It bundles
mcli, symlinked asmc, so themc ready localhealthcheck keeps working. - It uses the same
MINIO_ROOT_USER/MINIO_ROOT_PASSWORDvariables and the same on-disk format.
- The image ships the
- In
docker-compose.coolify.yml, useSERVICE_HEX_64_DATABASEENCRYPTIONKEYso that current Coolify generates 64 hex characters.
I tested this on Coolify v4.3.23: all services report healthy, Let's Encrypt certificates are issued for the web app and the S3 domain, and Google sign-in works.
diff --git a/docker-compose.coolify.yml b/docker-compose.coolify.yml
--- a/docker-compose.coolify.yml
+++ b/docker-compose.coolify.yml
@@ -13,7 +13,7 @@ services:
DATABASE_URL: 'mysql://cap:${SERVICE_PASSWORD_MYSQL}@mysql:3306/cap'
WEB_URL: '${SERVICE_URL_CAP_WEB}'
NEXTAUTH_URL: '${SERVICE_URL_CAP_WEB}'
- DATABASE_ENCRYPTION_KEY: '${SERVICE_HEX_32_DATABASEENCRYPTIONKEY}'
+ DATABASE_ENCRYPTION_KEY: '${SERVICE_HEX_64_DATABASEENCRYPTIONKEY}'
NEXTAUTH_SECRET: '${SERVICE_HEX_32_NEXTAUTHSECRET}'
CAP_AWS_ACCESS_KEY: capadmin
CAP_AWS_SECRET_KEY: '${SERVICE_PASSWORD_MINIO}'
@@ -88,7 +88,7 @@ services:
retries: 10
start_period: 30s
minio:
- image: 'minio/minio:latest'
+ image: 'pgsty/minio:latest'
restart: unless-stopped
command: 'server /data --console-address ":9001"'
environment:
@@ -109,7 +109,7 @@ services:
start_period: 10s
minio-setup:
container_name: cap-minio-setup
- image: 'minio/mc:latest'
+ image: 'pgsty/mc:latest'
exclude_from_hc: true
depends_on:
minio:
diff --git a/docker-compose.yml b/docker-compose.yml
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -88,7 +88,7 @@ services:
minio:
container_name: cap-minio
- image: minio/minio:latest
+ image: pgsty/minio:latest
restart: unless-stopped
command: server /data --console-address ":9001"
environment:
@@ -110,7 +110,7 @@ services:
minio-setup:
container_name: cap-minio-setup
- image: minio/mc:latest
+ image: pgsty/mc:latest
depends_on:
minio:
condition: service_healthy
Caveats for maintainers
-
Coolify < 4.3.1: on these versions
SERVICE_HEX_64_*produces 128 characters, which would also be rejected. Two options:- document Coolify ≥ 4.3.1 as the minimum version;
- or make
crypto.tstolerant: when the key is not 64 hex characters, derive 32 bytes from it with SHA-256. Valid existing keys keep their current behaviour, so this change is backward compatible.
-
Existing Coolify deployments: changing the variable name generates a new key. Installs on Coolify ≥ 4.3.1 never had a valid key, so nothing was encrypted and nothing is lost. Installs on older Coolify had a valid 64-character key, and should keep their current value.
-
docker-compose.template.yml: moving frombitnami/miniotopgsty/minioneeds more than an image swap:- replace the Bitnami-specific
MINIO_API_PORT_NUMBER/MINIO_CONSOLE_PORT_NUMBERwithcommand: server /data --address ":3902" --console-address ":3903" --certs-dir /certs; - mount the data volume at
/datainstead of/bitnami/minio/data.
I left this file out of the diff above.
- replace the Bitnami-specific
- 主要言語
- Rust
- スター
- 22.8k
- フォーク
- 2k
- 平均マージ
- 10時間 44分
- マージ済み PR(30日)
- 88
環境構築
- Dockerfile または Docker Compose ファイルあり
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
CapSoftware/Cap のほかの issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CapSoftware/Cap#2384 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
CapSoftware/Cap#2305 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
CapSoftware/Cap#1714 · コメント 3 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 4/5 3〜5日 初心者へのやさしさ 45/100
CapSoftware/Cap#2386 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
bug
難易度 3/5 1〜2日 初心者へのやさしさ 68/100
CapSoftware/Cap#2367 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
CapSoftware/Cap の issue をすべて見る
似ている issue
-
難易度 2/5 1〜3時間 初心者へのやさしさ 88/100
aws-samples/sample-pacer#76 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 68/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 86/100
axodotdev/cargo-dist#2523 ·
メンテナーはふだん 2 日以内に返信