Setup CKAN file storage first if not already configured.
Install and enable the plugin:
ckan.plugins = stats cloudstorage
Required configuration (all case-sensitive):
Cloud storage driver name (see libcloud Provider Constant column)
ckanext.cloudstorage.driver = AZURE_BLOBS
Container/bucket name
ckanext.cloudstorage.container_name = demo
Driver-specific options (Python dict with provider credentials):
For most providers (key/secret authentication):
ckanext.cloudstorage.driver_options = {“key”: “”, “secret”: “”}
Optional secure URLs configuration:
Enable secure URLs for private resources (default: disabled)
ckanext.cloudstorage.use_secure_urls = 1
Run database migration when enabling secure URLs:
ckan db upgrade -p cloudstorage
Secure URL TTL in seconds (default: 3600 = 1 hour)
ckanext.cloudstorage.secure_ttl = 60
Max multipart upload lifetime in days (default: 7)
ckanext.cloudstorage.max_multipart_lifetime = 7
Migrate existing FileStorage resources to cloud:
paster cloudstorage migrate -c ../ckan/development.ini
Path should be ckan.storage_path + /resources
Fix CORS rules for your domains (required for DataViews):
paster cloudstorage fix-cors -c=
Clean old multipart uploads (sysadmin action):
Call cloudstorage_clean_multipart action to abort uploads >7 days old
Provider-specific notes:
- Azure: Requires azure-storage installed for secure URLs
- AWS S3: Requires boto installed and ‘host’ key in driver_options for secure URLs
- Rackspace: Secure URLs not available
Find driver names: https://libcloud.readthedocs.io/en/latest/storage/supported_providers.html