Skip to main content


If you need to use file storage services such as avatar upload, you need to set up a storage provider and apply it in your application.

Casdoor supports two types of storage, Local and Cloud. In this chapter you will learn how to add a storage provider to use these services.


  • Client ID
  • Client secret
  • Endpoint
  • Path perfix: Path prefix for the file location.

Default Path perfix is /. For example, when the Path perfix is empty, a default file path:

You can fill it with abcd/xxxx, and then you can store your avatar in:
  • Bucket
  • Domain: The custom domain name of CDN for your cloud storage.


With Local type, the only item that you need to configure is Domain field. Please follow the format:


For example,, are all allowed.

But is wrong.

The Client ID, Client secret, Endpoint and Bucket field are no longer needed, you can fill in it at will, and it cannot be empty.


Currently, we support AWS S3, Aliyun OSS, Tencent Cloud COS, MinIO and Azure Blob cloud vendors, and are adding more Cloud storage services.

Fill in the corresponding fields with Client ID, Client secret, Endpoint and Bucket obtained from your cloud vendor console.


With Non-local type, you probably don’t need the Domain field, which is used for custom domain.