Passer au contenu principal

Store files in MinIO

This guide explains how to store the uploaded files of Casdoor, such as avatars, in MinIO, an S3-compatible object store.


Learning outcomes​

  • Prepare MinIO with an access key and a bucket.
  • Add MinIO as a storage provider in Casdoor.

What you need​

  • A MinIO deployment with TLS
  • Administrator access to the Casdoor admin console

Prepare MinIO​

  1. Deploy MinIO with TLS and note its API address.

    MinIO console

  2. In the MinIO console, create an access key and a secret key.

    Access key creation in MinIO

  3. Create a bucket.

    Bucket creation in MinIO

Add the provider in Casdoor​

  1. In the Casdoor admin console, go to Identity > Providers and add a provider.

  2. Set Category to Storage and Type to MinIO.

  3. Fill in the fields:

    Casdoor fieldValue from MinIO
    Client IDAccess Key
    Client secretSecret Key
    EndpointAPI address
    BucketBucket name

    MinIO provider in Casdoor

  4. Save the provider.

Verify the result​

Add the provider to your application and upload a file, for example an avatar. The file appears in the MinIO bucket.

See also​