Storing CKAN resource files on Amazon S3 or S3-compatible storage

CKAN ships only a local filesystem storage adapter, so moving resource files to S3 or an S3-compatible store means adding the ckanext-file-keeper-cloud adapter and configuring CKAN 2.12 storage correctly. This page covers the setup sequence, download permissions, upload limits and the failure points that appear after cutover.

On this page

How CKAN S3 storage moves resource files off local disk

If your uploaded resource files sit on the web host's disk and you need them in Amazon S3 or an S3-compatible bucket, start by confirming where the storage code comes from. CKAN ships only a filesystem storage adapter, and the S3 adapter (ckan:s3) comes from the ckanext-file-keeper-cloud extension. That makes the extension a dependency of your move, with its own install, configuration and upgrade path. The first decision is scope. A move can cover new uploads, existing files already on disk, or the backups that hold copies of both. Each one needs its own steps, its own owner and its own verification, so write them as separate items in the plan.

From CKAN 2.12, a storage is defined with ckan.files.storage.default.type and the options that belong to that storage type. This replaces the classic setting ckan.storage_path, which the CKAN FileStore documentation says will eventually be replaced. CKAN 2.12.0 was released on August 26, 2026, so a portal still on an earlier minor version will need a different configuration path, and the change should be planned alongside any version upgrade. Check your running version before you copy any example configuration. Record the exact type name and option keys that your adapter version documents, and keep bucket credentials out of the main configuration file where possible.

Before a plan is signed off, confirm with the ckanext-file-keeper-cloud maintainers that the adapter supports CKAN 2.12 and the storage type you intend to use. Ask them which CKAN versions they test against, which S3 API features they rely on, and how they handle existing files that remain on local disk. Then test the move on a copy of the portal: upload a new resource, open an older resource, and restore one backup into a staging instance, recording what each step produced. Your quote should name which of the three scope items are included, who runs the bucket and credential setup, and who confirms the backups can be restored. Until those answers are in writing, the plan has not been checked against your portal.

What a CKAN S3 storage project needs before configuration

Five items need decisions before anyone edits a CKAN configuration file. The cards cover the CKAN release and its prerequisites, the bucket and access principal, network and TLS trust, the matching extension version, and the backup and rollback plan. Work through them in order, because the test instance and the rollback plan both depend on the release you choose.

Confirm the CKAN release

CKAN 2.12 introduces the storage settings that replace the classic storage path, so the target release decides which configuration you write. The install-from-source docs list Python 3.10 or newer, PostgreSQL 12 or newer, Solr 9 (recommended) or Solr 8, and Redis, with uWSGI and Nginx recommended for production. Confirm the 2.12 requirements against the release notes before you pin any versions, and record which install method your team will use.

Install from source docs

Bucket, account and access principal

Decide whether the store is Amazon S3 or an S3-compatible endpoint, and confirm who in your organization can create buckets in that account. CKAN should use a dedicated access principal whose rights cover only the bucket it needs, so credentials can be rotated without touching other systems. Record the region or endpoint URL now, because the storage settings depend on it. Ask the storage team who owns the key lifecycle and where the secret will be held.

Network reach and TLS trust

Every CKAN web process and background worker must reach the storage endpoint, so check egress rules from each host, including any proxy path. If the endpoint presents a certificate issued by a private certificate authority, install that authority's chain on every CKAN host and worker image. Test trust from the same runtime CKAN uses, not from an administrator shell, and get the firewall and DNS changes approved before the test instance is built.

Matching extension version

The S3 adapter comes from the ckanext-file-keeper-cloud extension, which CKAN core does not ship, so the extension release must match the CKAN release you run. Install the matching extension version on a test instance built from the same CKAN version and configuration as production. Upload, download and delete a test resource, then keep the tested versions in your change record. Ask the extension maintainers which CKAN releases each version supports before you upgrade either side.

FileStore docs

Backup and rollback plan

Take a database backup and copy the existing local resource files before any configuration change, then verify that both can be restored. Keep the local files in place until the retention window you agree on has passed, so CKAN can return to filesystem storage if uploads fail after cutover. Write the cutover and rollback steps as a runbook with a named owner and a go or no-go check for each step.

Uploads reach the bucket through one adapter, and downloads take one of two paths

The diagram starts at the user browser, which sends uploads to the CKAN web application. The web application saves dataset and resource metadata in the PostgreSQL metadata database and hands the file to the ckanext-file-keeper-cloud adapter, which writes it to the S3 or S3-compatible endpoint using an access credential. That credential is what crosses the trust boundary between the CKAN host and the object store network. Downloads take one of two paths: a storage marked public lets the browser fetch the object directly, with no permission check, while a registered file goes through file.download, which runs the permission_download_file auth function before the adapter reads the file. Confirm which path each resource uses before publishing.

Upload and download paths across the CKAN host and object store trust boundaries.

Configuring the S3 adapter in CKAN, step by step

This sequence moves a CKAN 2.12 test instance from local file storage to an S3 or S3-compatible bucket, then into production. Each step ends with a check that shows it worked, so problems are caught on the test instance before live resource files are affected. Keep the local copy until the rollback window closes.

  1. Baseline an upload on local storage

    On the CKAN 2.12 test instance, with the classic local filestore still active, the CKAN administrator uploads a resource file as a user with edit rights on a dataset. Record the dataset ID, resource ID, stored path on disk, file size and a SHA-256 checksum of the file. Download it once through the browser and confirm the bytes match the original. Keep this record, because the migration check in a later step compares against it. The step is done when you have a written baseline for at least one small file and one larger file.

  2. Provision and test the bucket

    The platform team creates a bucket for resource files and a dedicated access principal that can read and write only that bucket. Enable versioning if your retention plan needs previous object versions or Object Lock, since Object Lock works only in versioned buckets. If the target is MinIO, check the current maintenance status of the project before choosing it. Then run rclone or the AWS CLI with that principal to put, get, list and delete a test object. Confirm that the same principal cannot reach other buckets. The step is done when the test object round-trips and the out-of-scope bucket returns an access denied response.

  3. Install the adapter and enable the plugin

    Install ckanext-file-keeper-cloud into the same virtual environment that runs CKAN 2.12, using your existing install method and pinning the version you tested. This extension supplies the S3 adapter, named ckan:s3 in configuration. Confirm its compatibility with CKAN 2.12 in its repository before pinning. Add the plugin to the plugins list in the CKAN configuration file, keeping the existing entries, then restart the web and background worker processes. The step is done when CKAN starts without plugin errors and the logs show the extension loaded.

  4. Define the S3 storage in CKAN

    Set ckan.files.storage.default.type to the S3 adapter, then add the options the adapter requires, such as endpoint, bucket, region and credentials, using the exact option names from the adapter documentation. Keep secrets out of the configuration file by sourcing them from environment variables or your secrets manager where your deployment supports it. Leave ckan.storage_path in place for now, because existing resources still need the local path for reads. Confirm how CKAN 2.12 behaves when both settings are present on the test instance. The step is done when a new upload writes an object to the bucket and no new file appears under the old path.

  5. Match upload limits on CKAN and the proxy

    Set the CKAN upload size limit in the configuration file, confirming the exact key name in the CKAN 2.12 configuration reference. Then set the matching maximum request body size on the reverse proxy in front of CKAN. Nginx is the reverse proxy the CKAN install guide recommends for production. Check any load balancer in front of the proxy, since each layer can impose its own limit. Test with one file just under the limit and one just over it. The step is done when the file under the limit uploads and the file over the limit fails with a clear error in the CKAN and proxy logs.

  6. Test public and permission-checked downloads

    Test uploads and downloads as three users: a sysadmin, an organization editor and a user with no permission on the dataset. Public storages serve files without permission checks, so confirm exactly which resources use one before any sensitive file goes there. Registered files download through file.download, which checks the permission_download_file auth function, so the user without permission should be refused. Run the same tests on a private dataset. The step is done when the user without permission is refused on registered files and every result matches the expected policy in a written test table.

  7. Migrate and verify existing resource files

    Before copying anything, the team must confirm how existing resource records refer to stored paths, and whether the migration must rewrite those references or keep them valid. Copy the files with rclone or a scripted copy, preserving the object key structure your records expect. Compare the object count with the local file count, then check every checksum against the source, using rclone check or an equivalent tool. Run a download of the baseline files from the first step. The step is done when counts match, all checksums match and the baseline downloads return the same bytes.

  8. Cut over and keep the rollback window

    Agree the cutover date with the business owners, pause uploads if your process requires it, run a final incremental copy, and switch the production default storage to the S3 adapter. Keep the local copy and ckan.storage_path in place for the rollback window agreed in writing, and retire the local path only after that window closes. Document how to revert the configuration, including restoring ckan.storage_path. The step is done when new production uploads land in the bucket, the download test table passes, and the rollback procedure has been rehearsed on the test instance.

Public versus permission-checked downloads, and where upload limits apply

The storage setting decides who can download a file, so choose it before the first upload. A storage marked public serves files without CKAN permission checks, which means anyone who holds the file URL can fetch the object, whether or not the dataset is private. Registered files take a different route: CKAN serves them through file.download, which checks the permission_download_file auth function, so the dataset and organization roles that govern the web page also govern the file. For private datasets, use a storage that is not marked public and keep the bucket closed to anonymous reads. If a private dataset's file lands in a public storage, the file is exposed to anyone who obtains its URL, and marking the dataset private in CKAN does not change that. Check the CKAN FileStore documentation for the current storage options.

Bucket policies do not replace CKAN's roles. A bucket policy knows about buckets, prefixes and cloud identities, but it cannot see that a dataset is private, which organization owns it or whether a user is a collaborator. Those rules live in CKAN's dataset visibility, organization roles and collaborators. Any storage-side grant that lets an account read objects works for anyone holding those credentials, including people already removed from the organization in CKAN. Review access in both places, and confirm with your security team which control is the record for each class of dataset. Then test the case that matters most: remove a user from an organization in CKAN, and confirm they cannot still fetch the object with a direct URL or a storage credential they were issued.

Upload size limits apply at several layers, and the failure shows up at the lowest layer that rejects the request. CKAN has its own upload size setting, enforced by the application. Ahead of CKAN, the web server or reverse proxy, commonly Nginx in front of uWSGI, applies a request body limit such as client_max_body_size, and it can return an error before CKAN sees the upload at all. A load balancer, ingress controller or the object store can impose a further limit, and multipart upload behavior differs between stores. Raising CKAN's setting alone will not fix a large upload that a proxy is rejecting. Test each layer with files just under and just over the intended maximum, sent through the same path users take, and record which component returns the error. Confirm each limit value in the documentation for the versions you run.

Mapping CKAN storage settings to bucket and credential settings

This table compares each CKAN storage concept with the bucket, endpoint and credential setting it depends on, and lists what to check before live uploads move. Option names come from the ckanext-file-keeper-cloud documentation, so confirm each one in a test run against your CKAN version. The main takeaway is that bucket hardening protects the storage layer only, while CKAN's organization and dataset roles still decide who can download a registered file.

CKAN setting or conceptMatching S3 or S3-compatible settingWhat to verify before cutover
Storage definition and optionsStorage set with ckan.files.storage.default.type, using the cloud adapter's S3 type and its optionsConfirm each option name in the ckanext-file-keeper-cloud docs, then run a test upload and download
Endpoint and regionService endpoint URL and region for AWS S3 or the S3-compatible service's endpointTest an upload from the CKAN host using the exact endpoint and region the adapter expects
Bucket and key prefixA dedicated bucket per portal environment, with a key prefix for CKAN uploadsConfirm new objects land under the prefix and no other application shares the bucket
Access key scopeCredential limited to the bucket and prefix, with only the object actions the adapter usesTest that the key fails outside the bucket and prefix, and keep it out of config files in version control
Public access settingBucket public access blocked, and CKAN storage not marked public for registered resourcesStorages marked public serve files without permission checks, so confirm the public flag is off
VersioningBucket versioning enabled if you need recoverable overwrites, and required for S3 Object LockTest a resource delete and replace, then confirm how old versions are kept or expired
Default encryptionDefault server-side encryption on the bucket, matched to the adapter's encryption optionCheck the encryption status of a test object and confirm the adapter does not override it
Resource record pathEach dataset resource record in CKAN points to its stored object key in the bucketPick sample resources and confirm each record resolves to the expected key before any migration
Permission checksDownloads follow CKAN organization and dataset roles, since bucket permissions alone do not decide accessTest as an outsider, a member and a sysadmin that private dataset files download only for allowed roles

Securing the S3 credentials and download paths CKAN relies on

CKAN reads and writes resource files through one storage principal, so the bucket's credentials, access settings, encryption, retention and logs together decide who can reach uploaded data. Work through these five controls before the storage goes live, and confirm each one against your provider's current documentation. Several depend on the backend, so check them separately for AWS, MinIO or your chosen S3-compatible store.

Least-privilege keys and config access

Create a dedicated storage principal whose policy covers only the CKAN bucket and the object actions CKAN needs. Keep its access key out of the plain CKAN configuration file, and store it in a secrets manager that supplies it at runtime. Set a rotation schedule your team can run, and test that CKAN keeps working after each rotation. Restrict read access to the configuration file on web and worker hosts to the service accounts that need it, since anyone who can read the file can read the key.

Blocking anonymous reads

Turn on the provider's public access block for the bucket so objects cannot be read anonymously through bucket policies or ACLs. A public storage serves files without permission checks, so use one only for data you have already decided to publish. Private resources should download through CKAN's file.download route, which checks the download permission before it serves a file, so the bucket itself should not be a public entry point. Test this with an anonymous request to a private resource's object location and confirm it is refused.

TLS and encryption at rest

Require TLS for every connection from CKAN and its workers to the storage endpoint, and make sure the CA certificate they use is trusted so verification is never switched off. Confirm the encryption at rest options for each backend, because AWS, MinIO, Ceph and other S3-compatible stores differ in the server-side encryption modes and key management they offer. Decide who holds the encryption keys, the provider or your own key service, and record that decision alongside the data classification for the portal.

Object Lock and recovery copies

Object Lock stores objects in a write-once-read-many model with governance and compliance retention modes, plus legal holds. It works only in versioned buckets, so enable versioning first, and confirm with your provider how each mode allows retention to be changed or removed. Keep a separate recovery copy in an isolated location that the CKAN credentials cannot delete, which addresses the isolated recovery data expected under CIS Controls Safeguard 11.4. Test a restore from that copy on a schedule.

Object Lock guide

Audit logging of bucket access

Turn on the provider's access logging or audit trail for the bucket so reads, writes and deletes by the CKAN principal are recorded with a time and a caller identity. Logs nobody reviews do not help an investigation, so name who reviews them, how often, and which events trigger an alert, such as bulk deletes or access from unexpected networks. Confirm the log retention period with your provider, and decide whether logs must be copied to your own store for longer. Add a check that logging stays enabled after bucket policy changes.

Choosing an S3 backend: Amazon S3, MinIO or another compatible store

Amazon S3 is the managed option with the least operational work for the storage layer itself. Your team pays AWS for storage, requests and data transfer, and keeps ownership of bucket policies, encryption keys, lifecycle rules and access design. The storage class you choose sets the durability and availability terms.

  • Durability and availability: S3 Standard is designed for 99.999999999% durability and 99.99% availability, storing data across at least three Availability Zones, according to the Amazon S3 storage classes documentation.
  • Object Lock: It provides write-once-read-many retention with governance and compliance modes and legal holds, but only in versioned buckets. Cohasset Associates has assessed it for SEC 17a-4, CFTC and FINRA environments. That assessment does not make your retention design compliant, so your auditors must confirm it.
  • Cost drivers: Stored volume, request counts from CKAN uploads and downloads, and data transfer out shape the bill. Ask for a quote that models each separately.
  • Region and residency: Confirm the Region, and confirm that any replication stays within your approved jurisdiction.

Test the adapter's upload, download, multipart and delete calls in your own account, because this page does not verify S3 compatibility on your behalf.

Why S3-backed uploads and downloads fail after cutover

This table pairs each failure seen after moving CKAN resource files to S3 or an S3-compatible store with its most likely cause and the fix to try first. Read it from the symptom column down, and confirm each cause in your own environment before changing settings. The main takeaway is that most failures trace to endpoint, permission, storage policy or configuration mismatches, so check those before changing CKAN code.

SymptomLikely causeFix
Large uploads fail while small uploads succeedA reverse proxy or CKAN upload limit is set lower than the file sizeRaise the proxy body size limit and CKAN's upload limit together, then retest with a file near the target size
Uploads return access deniedWrong endpoint or region in the storage settings, or the access key lacks write rights on the bucketConfirm the endpoint and region with your provider, then grant the principal write and list permissions on the bucket
Downloads return not found after migrationResource records still point to old local paths, or the object key prefix differs from the uploaded keysCompare resource URLs with object keys in the bucket, then update the records or align the prefix and copy the files again
Private dataset files reachable by direct URLThe storage is marked public, so it serves files without permission checksMark the storage as not public for private content, then test a direct link to a private resource while logged out
Authorized users refused downloadsThe user's organization role or the permission_download_file check denies access to that datasetReview the user's organization role and the permission_download_file check for the dataset, then test as that user
Certificate errors against a private endpointThe CKAN host does not trust the certificate authority that signed the storage endpoint's certificateInstall the internal certificate authority on every CKAN and worker host, then restart the services that call the endpoint
Deletes or overwrites blockedObject Lock retention is in effect on the bucket or objects, in governance or compliance modeCheck retention settings and legal holds with the bucket owner before changing them, and do not assume CKAN can override them
Object Lock enabled on an unversioned bucketObject Lock works only in versioned buckets, so the bucket setup is incompleteEnable versioning on the bucket before applying Object Lock, and confirm the setup against the storage provider's documentation
Archived MinIO deployment cannot take upstream fixesThe minio/minio community repository is archived and distributed as source only, with no new binariesPlan a move to a maintained S3-compatible store or the vendor's commercial successor product, and confirm terms with the vendor

What an S3 storage move costs and what it needs from your team

What are the main cost components of moving CKAN files to S3?

The cost has two parts: one-time project work and recurring storage charges. The one-time part is paid to your team or a partner under a written scope. It covers configuring the storage in CKAN, validating the chosen extension against your CKAN release, migrating existing files, and testing downloads and permissions. The recurring part is billed by your storage provider: stored data, request charges and egress when users download files. Recurring charges grow with the number of files and how often they are read, so your dataset inventory drives both figures. Ask any quote to list one-time and recurring items separately, and to name the pricing basis for each storage charge. DeployOpen does not publish a price list. A quote follows from the written scope.

How long does it take to move CKAN files to S3?

The duration depends on four drivers, so no single figure applies to every portal. The first is the number and total size of existing resource files, since copying them usually dominates the migration window. The second is the number of storages, such as separate stores for public and private resources. The third is whether migration runs live while users upload and download, or during a paused window, which adds synchronization and verification work. The fourth is extension compatibility with your chosen CKAN release, which can require staging work before production. Change windows set the calendar on top of these. Ask for a timeline that states the assumption behind each driver and the staging test that must pass before production.

Can our internal team move CKAN storage to S3 without a partner?

Yes, if the team has CKAN operations skills and can run a staging instance first. Storage is defined in CKAN 2.12 through configuration settings, and the S3 adapter comes from the ckanext-file-keeper-cloud extension, so much of the effort goes into planning and verification. Three parts need the most care. Credential scoping means the CKAN host holds only the access the bucket requires. Permission testing confirms that private resources stay behind the permission-checked download path. Migration verification confirms that each migrated file matches its source before old copies are retired. A partner mainly adds value where your team lacks experience with one of these three steps. Confirm the extension's support for your CKAN release before committing.

Is MinIO still a sound choice for CKAN file storage?

It depends on your support model and license obligations, and both need confirmation before you choose it. The minio/minio repository is archived and no longer maintained. The community server is distributed as source only, with no new pre-compiled binaries, and its last tagged release is from October 2025. Support for the community software is best effort through GitHub and Slack. SLA-backed support is available only through the vendor's commercial AIStor products. The community server is licensed under AGPLv3, so any network-facing or proprietary use needs review against that license. Confirm the license position with counsel and the support terms in writing with the vendor. Compare the result against other S3-compatible options, such as Ceph's RADOS Gateway, under the same review.

Does S3 durability replace the need for CKAN backups?

No. Durability and backups protect against different failures. Amazon S3 Standard is designed for very high durability and stores data across at least three Availability Zones, which protects against losing hardware. It does not protect against a user, script or misconfigured job deleting or overwriting objects, and it does not stop corruption that gets copied faithfully. The CKAN database holds the metadata that points to those files, so a restore needs both. Keep a separate recovery copy in an isolated account or location, which matches the intent of control 11.4 in CIS Controls v8.1. Where retention rules apply, use versioning or S3 Object Lock, which works only in versioned buckets. Test restores of the database and the files together.

What does our team need to provide for an S3 storage move?

Five inputs must be ready before work starts:

  • Access to the CKAN host and a staging instance that matches the production CKAN release and extensions.
  • Ownership of the bucket account, with an administrator who can create scoped credentials.
  • A dataset inventory that flags private resources, public resources and any files that must not move.
  • A change window agreed with operations and the business owners of the portal.
  • Sign-off on the download model, stating which storages serve files publicly and which go through permission-checked downloads.

DeployOpen confirms these inputs in the written scope before implementation begins.

How DeployOpen scopes and delivers a CKAN S3 storage change

DeployOpen scopes the move of CKAN resource files from the local disk to Amazon S3 or an S3-compatible store as a written, fixed-scope change inside your own cloud account or data center. The work covers the CKAN 2.12 storage definition, the ckanext-file-keeper-cloud adapter, the choice between public and permission-checked downloads, and upload size limits. Ongoing support is available as a retainer after handover.

How we scope

  • Inventory which resource files sit on the local disk, their sizes, and who can download them today.
  • Agree in writing whether each storage is public or permission-checked, since public storages serve files without permission checks.
  • Confirm the bucket, endpoint, region, and credential source with your storage team before the fixed scope is signed.

How we build

  • Configure the CKAN 2.12 storage with ckan.files.storage.default.type and its options, then test uploads before migrating existing files.
  • Install and configure the ckanext-file-keeper-cloud adapter for the ckan:s3 storage, since CKAN itself ships only a filesystem adapter.
  • Verify registered files pass through file.download and its permission_download_file check, and private datasets never reach a public storage.

How we hand over

  • Document each storage definition, adapter version, bucket policy and upload size limit in a runbook your team keeps.
  • Walk through a test upload, download, and deletion for public and permission-checked resources with your administrators.
  • Record the migration steps, rollback path and any files left on local disk so the cutover can be reviewed.

How we support

  • Plan backup and retention for the bucket separately from CKAN, including versioning and Object Lock where policy requires them.
  • Confirm the MinIO option before choosing it: the community repository is archived and distributed as source only.
  • Ongoing support, upgrades and continuous testing are available as retainers, including checks after CKAN and adapter upgrades.

Sources and further reading

Talk to our team.

Tell us what you're working on, whether it's a deployment, an audit, a security test or a cyber range. You'll speak with an engineer who can help you scope it.

  • 30-minute call: free, with no obligation.
  • NDA on request: we can sign before you share details.
  • Clear next steps: a scope and plan after the call.