OpenParable
Skip to content
← Back to skills

Logto Local Storage

DevOps & Security
logto-local-storage

Logto Local Storage is an Agent Skill for devops & security published in the logto-io/logto repository on GitHub: a SKILL.md instruction file an AI agent can load to do this task.

Configure local object storage for Logto user-asset uploads (MinIO as S3). Use when you see storage.not_configured, avatar upload, POST user-assets/avatar, Console image upload, collect user profile avatar field, or need MinIO/S3 for dev.

View on GitHub ↗
QUICK START

How to use this skill

Bring this guide into your coding agent with a prompt tailored to the tool you use.

  1. Open your project in Codex.
  2. Copy and paste the prompt below.
  3. Review files and risks before approving any action.
Prompt to paste
Inspect the Agent Skill at https://github.com/logto-io/logto/blob/HEAD/.agents/skills/logto-local-storage/SKILL.md and all supporting files. Report provenance, permissions, scripts, dependencies, and security risks. Propose an exact installation into .agents/skills/logto-local-storage, but wait for my approval before writing files or running scripts.

Copying this prompt does not install or run the skill. Review third-party files before use.

Logto local storage (user assets)

When to use

  • Avatar upload during sign-up (collect user profile) or Account Center
  • Console / Management API POST …/user-assets
  • GET /api/user-assets/service-status returns not_configured
  • Console blocks adding the avatar built-in collect-profile field

Not needed for ordinary API or UI work that does not upload files.

Prerequisites

Quick path

  1. Read MinIO setup commands and run them.
  2. Restart pnpm start:dev (Core loads systems.storageProvider only at startup).
  3. Verify: curl -s -H 'development-user-id: dev' http://localhost:3001/api/user-assets/service-status → "status":"ready".

How it works

  • Config lives in PostgreSQL systems table, key = 'storageProvider' (JSON).
  • Runtime: SystemContext → buildUploadFile() → Azure / GCS / S3 (packages/core/src/utils/storage/).
  • There is no in-process mock; CI usually asserts storage.not_configured only.

Providers

providerUse case
S3StorageAWS S3 or S3-compatible (MinIO for local dev)
AzureStorageAzure Blob
GoogleStorageGCS

If screenshots need a specific sign-in experience, configure SIE via logto-dev-environment separately.

Troubleshooting

SymptomCheck
Still not_configured after SQLRestarted core? Correct DB_URL / tenant DB?
Upload 500MinIO running? Bucket exists? forcePathStyle: true for MinIO?
Image URL 404 in browserpublicUrl must be reachable from the browser host (not only from Core)

Full commands and JSON template: references/minio-setup.md.