From 4eb9090ce5b0098b5dd638cb792628c92021956c Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Fri, 27 Mar 2026 15:46:36 +0100 Subject: [PATCH] fix(ente): add MinIO object storage for photo uploads Museum requires an S3-compatible object storage backend for file uploads. The install script had dummy S3 credentials pointing to localhost:3200 but no service was running there, causing HTTP 500 on /files/upload-url. - Install MinIO binary with random password - Create required buckets (b2-eu-cen, wasabi-eu-central-2-v3, scw-eu-fr-v3) - Configure museum.yaml with proper S3 credentials and bucket names - MinIO runs on port 3200 (API) and 3201 (console) --- install/ente-install.sh | 57 ++++++++++++++++++++++++++++++++++++++--- 1 file changed, 53 insertions(+), 4 deletions(-) diff --git a/install/ente-install.sh b/install/ente-install.sh index d861863e..968c6b1b 100644 --- a/install/ente-install.sh +++ b/install/ente-install.sh @@ -75,6 +75,42 @@ SECRET_HASH=$(go run tools/gen-random-keys/main.go 2>/dev/null | grep "hash" | a SECRET_JWT=$(go run tools/gen-random-keys/main.go 2>/dev/null | grep "jwt" | awk '{print $2}') msg_ok "Generated Secrets" +msg_info "Installing MinIO" +MINIO_PASS=$(openssl rand -base64 18) +curl -fsSL https://dl.min.io/server/minio/release/linux-amd64/minio -o /usr/local/bin/minio +chmod +x /usr/local/bin/minio +curl -fsSL https://dl.min.io/client/mc/release/linux-amd64/mc -o /usr/local/bin/mc +chmod +x /usr/local/bin/mc +mkdir -p /opt/minio/data +cat </etc/default/minio +MINIO_ROOT_USER=minioadmin +MINIO_ROOT_PASSWORD=${MINIO_PASS} +MINIO_VOLUMES=/opt/minio/data +MINIO_OPTS="--address :3200 --console-address :3201" +EOF +cat <<'EOF' >/etc/systemd/system/minio.service +[Unit] +Description=MinIO Object Storage +After=network.target + +[Service] +Type=simple +EnvironmentFile=/etc/default/minio +ExecStart=/usr/local/bin/minio server $MINIO_VOLUMES $MINIO_OPTS +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target +EOF +systemctl enable -q --now minio +sleep 3 +$STD mc alias set local http://localhost:3200 minioadmin "${MINIO_PASS}" +$STD mc mb --ignore-existing local/b2-eu-cen +$STD mc mb --ignore-existing local/wasabi-eu-central-2-v3 +$STD mc mb --ignore-existing local/scw-eu-fr-v3 +msg_ok "Installed MinIO" + msg_info "Creating museum.yaml" cat </opt/ente/server/museum.yaml db: @@ -87,12 +123,25 @@ db: s3: are_local_buckets: true use_path_style_urls: true - local-dev: - key: dummy - secret: dummy + b2-eu-cen: + key: minioadmin + secret: $MINIO_PASS endpoint: localhost:3200 region: eu-central-2 - bucket: ente-dev + bucket: b2-eu-cen + wasabi-eu-central-2-v3: + key: minioadmin + secret: $MINIO_PASS + endpoint: localhost:3200 + region: eu-central-2 + bucket: wasabi-eu-central-2-v3 + compliance: false + scw-eu-fr-v3: + key: minioadmin + secret: $MINIO_PASS + endpoint: localhost:3200 + region: eu-central-2 + bucket: scw-eu-fr-v3 apps: public-albums: http://${LOCAL_IP}:3002