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.


With Local type, the Client ID, Client secret, Endpoint and Bucket field is no longer needed, you can fill in it at will, and it cannot be empty.

The only item that you need to configure is Domain field, please follow the format:


For example,, are all allowed.

But is wrong.


Currently we support AWS S3 and Aliyun OSS 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.



Here, I use Aliyun OSS as an example

The AccessKey is your key to access Aliyun API, with full account permissions.

So created AccessKey in Aliyun workbench.

Then create OSS service:

Create OSS

Fill the necessary information in Casdoor and save:


Then you can use Aliyun cloud storage services in your application.