Configuring the CKAN FileStore and upload limits

This page explains where CKAN keeps uploaded resource files, which limits CKAN and the web server each enforce, and what to set before users upload data. It also shows how to confirm the storage backend and limit settings for your CKAN version before go-live.

On this page

How the CKAN FileStore stores uploads and where limits apply

Before launch, a portal team needs to decide where uploaded files are stored, how large a resource upload can be, and which image types the portal accepts, because each of these is enforced in a different place. The FileStore is the part of CKAN that holds the files attached to resources, such as CSV, spreadsheet or image uploads. It keeps the file itself separate from the dataset metadata in PostgreSQL. A user's upload does not go straight to storage. The web server in front of CKAN receives it first, passes it to the CKAN application, and only then does CKAN write it to the storage location the portal has configured. Any portal that accepts uploads needs this reviewed, and the need is greatest where users upload images for datasets, organizations or groups, or large data files that will be downloaded or loaded into the DataStore.

CKAN's own limits and the web server's limits are separate checks, and both must allow the upload. CKAN applies its size caps, including the resource size setting (ckan.max_resource_size), and its image type rules inside the application. The reverse proxy in front of it can reject the request body before CKAN sees it if the proxy's own cap is lower. When that happens, the user may see a failure that looks like a generic upload error, and the CKAN log may show nothing useful. Test both layers with a file just under the limit and a file just over it, using the same account and upload path your users will take. Confirm the exact setting names and web server directives against the documentation for the CKAN version and deployment method you run, since they vary between setups.

Decide the storage location, the size caps and the image types together, and record each decision with a named owner before launch. If you run more than one web or worker node, confirm that every node reads and writes the same storage location, because a file written on one node can be missing on another. For CKAN 2.12, check which storage backend options fit your infrastructure, since changing the backend after files exist means moving those files. Also decide whether uploads are needed at all. A portal that only links to files hosted elsewhere can turn uploads off entirely, which removes the upload path and the limits that go with it. Write down the allowed image types and the size caps for each resource type so the launch review has a concrete list to check.

How an upload moves from the browser to storage

The upload starts in the browser and crosses the public network into NGINX, which applies the request body limit and terminates TLS. Oversized requests are rejected there and never reach CKAN. NGINX passes accepted requests to uWSGI, where CKAN checks the resource size, image size and image type before it writes the file to the FileStore path or storage backend. A failed check stops the upload at CKAN and returns an error to the browser. Downloads take the reverse route: the file is read from storage and served back through the web server. Confirm that the NGINX body limit matches ckan.max_resource_size so the two layers agree.

Upload and download paths, trust boundaries and rejection points.

Which FileStore settings fit which portal

This table compares the FileStore settings a CKAN team can change and matches each one to a portal shape. Read each row for what the setting controls, which deployment it suits, and what to check in the documentation for the CKAN version you run. The main takeaway is that the resource size limit and the web server body limit must agree, and the storage choice must match how many hosts write files.

Setting areaWhat it controlsFits this portalConfirm for your CKAN version
Local storage path on the CKAN hostWhere uploaded resource files are written on the disk of the web and worker hostsSingle host or one VM where every process shares the same diskPath permissions for the web and worker users, and whether the path must be shared across hosts
CKAN 2.12 storage backendHow uploaded files are written and read from the storage location the portal usesContainers or Kubernetes pods that need one storage location across replicasWhich backends 2.12 ships, their settings, and whether they need extra plugins
Resource size limit (ckan.max_resource_size)Largest file a user can upload as a resource, checked by CKAN on uploadPortals that host large datasets or need to cap storage growthUnits and whether the limit applies to uploads, links or both in your release
Image size and allowed image typesDimensions and file types accepted for dataset, organization and group imagesImage-heavy portals with branded organization or group pagesExact image settings and the complete list of accepted types
Disabling uploadsStops users from adding uploaded files, so resources must be linksRead-only or link-only portals that point to data hosted elsewhereWhether link resources, existing uploads and the API still behave as you expect
Matching web server body size limitsLargest request body the proxy accepts before CKAN sees the uploadEvery portal with uploads, since a proxy limit below CKAN's limit fails firstThe proxy's request body size setting and the uWSGI settings in your chosen stack

Why the web server limit must match the CKAN limit

Set the CKAN resource size limit and the NGINX request body limit together, because each layer enforces its own ceiling and the lower one decides what users experience. If only CKAN sets the limit, NGINX rejects a large upload first and returns a generic proxy error page. Users who see that page usually cannot tell that the file is too big, so they may report the portal as broken. If only NGINX sets the limit, the request reaches CKAN and CKAN's own check becomes the failing point. Users then see CKAN's message, but the proxy has already accepted and buffered a payload that the application is about to refuse. Either mismatch makes support requests harder to diagnose and wastes transfer time.

The limit is a trade-off between protection and capacity. A tight limit keeps disk use and worker time small, because rejected uploads never reach the storage volume and never hold a uWSGI process for a long transfer. A generous limit lets data publishers upload large files directly, but it needs capacity planning. The FileStore volume must hold the largest expected resources plus growth, and each in-flight upload ties up a uWSGI process for the length of the transfer, so several concurrent large uploads can slow page requests for everyone else. Agree the ceiling with the teams that publish the largest files, then size the storage and the uWSGI process count to that ceiling.

Test one upload at the boundary in each layer before go-live. Upload a file just under the limit and confirm it succeeds end to end and lands in the storage path you configured. Then upload a file just over the limit and note which layer answers: the proxy error page or CKAN's validation message. If the proxy answers first, raise the NGINX limit to match the CKAN setting and repeat both tests. Also confirm that proxy and uWSGI timeouts allow a transfer of that size on your real network, since a limit that passes on a fast office connection can still fail over a slow link. Record each result so the same tests can be repeated after configuration changes and upgrades.

Setting up the CKAN FileStore path and upload limits

This sequence sets where CKAN stores uploaded files, how large resources and images may be, which image types are accepted, and how NGINX passes uploads through. Each step ends with a check you can repeat, so upload behavior is confirmed before users depend on it.

  1. Confirm the CKAN version and storage model

    The platform engineer records the CKAN version that is actually running and checks the release notes for the installed version to see whether the 2.12 storage backend is available. CKAN 2.12.0 was released on August 26, 2026, so confirm that your release includes the backend before planning around it. If the backend is available, decide now between a local path and the backend, because moving existing files later is additional work. Done when the version, the storage model and the team that owns the storage are written in the change record.

  2. Create and permission the storage location

    The platform engineer creates the storage directory on the host or mount that CKAN will use and sets ownership so the CKAN process user can write to it. Other system users should not be able to list or modify uploads. Confirm the CKAN process user from the running web and worker processes. Check the setup by writing a test file as that user, for example with sudo -u followed by the CKAN user name and touch, then reading it back and deleting it. Done when the test file is created, read and removed without using root.

  3. Set the storage path or backend settings

    The platform engineer sets the storage location in the CKAN configuration. For a local path, set ckan.storage_path. For a 2.12 storage backend, set the backend settings the release documentation describes, and confirm the exact key names for the installed version. Keep backend credentials out of ckan.ini and manage them as secrets. Restart is deferred to the restart step so all changes apply together. Done when the configuration loads without errors and the startup log shows no storage errors.

  4. Set resource size limits and allowed image types

    The portal owner sets the maximum resource size with ckan.max_resource_size, sets the image size limit, and lists the accepted image types in the configuration, using the values from the written upload policy. Enter sizes in the units the configuration reference specifies for your version. Record the final values in the change record so the NGINX limit in the next step matches them. Done when the policy values appear in the effective configuration and the change record matches the configuration file.

  5. Match the NGINX body size limit and reload

    The platform engineer sets client_max_body_size in the NGINX server block that proxies to CKAN, using a value at least as large as the largest allowed upload, so NGINX does not reject a request CKAN would accept. Run the NGINX configuration test before reloading the service. Check that an upload just under the CKAN limit passes through NGINX, and that a request above the NGINX value is refused by NGINX and never reaches CKAN. Done when both checks behave as expected after the reload.

  6. Restart CKAN web and worker processes

    The platform engineer restarts the CKAN web processes and the background workers so every process reads the new storage path and limits. If workers run under Supervisor, restart them through Supervisor and confirm each process reports running. Review the startup logs for storage or configuration errors, and confirm that the worker queue can still process a job. Done when all web and worker processes are running and the logs show no storage or configuration errors.

  7. Test uploads at and beyond each limit

    The QA engineer signs in with a user who can create datasets and add resources, then uploads a file just under the resource limit and another just over it. Repeat with an image just under and just over the image limit, and try an image type that is not on the allowed list. The oversized uploads and the rejected type should fail with a clear message, and the accepted files should appear on the dataset. If uploads are disabled for a role or organization, test that with a user who holds the permissions that role should have, since an administrator account can produce misleading results. Done when every result matches the upload policy.

  8. Confirm downloads after a restart

    After a full restart of the web and worker processes, the QA engineer downloads the accepted test files from the portal and compares their checksums with the originals to confirm the bytes are intact. Check that the files still exist in the storage location with the expected ownership and permissions. Remove the test datasets according to your retention policy. Done when every accepted file downloads with a matching checksum and every rejected upload is still rejected.

Security risks in CKAN FileStore and upload settings

The FileStore accepts files from people you may not fully trust, and the settings that control it sit across CKAN, the web server, the host operating system and your backup tooling. Each card names one risk, what to check in your deployment and which team should own the control. Confirm how your CKAN version validates uploads before you rely on any validation, because the docs describe only part of what happens to an uploaded file.

Unbounded uploads exhaust the host

Uploads with no size or type ceiling can fill the disk, tie up worker processes and slow the portal for every user. Check ckan.max_resource_size and ckan.max_image_size in the CKAN config, then compare them with the request body limit in NGINX or your ingress, since the stricter limit is the one users actually hit. Confirm which file types CKAN accepts in your version and whether the storage volume has quotas and disk alerts. Owner: the platform team sets the limits and monitoring, and the CKAN administrator agrees allowed sizes with data owners.

Storage path open to other processes

The directory set by ckan.storage_path holds every uploaded file, so any other local account or process that can read it can read unpublished resources, and any that can write to it can replace them. Check that only the CKAN service user owns the directory, that its permissions exclude other local users and that no other application mounts the same path. Confirm how your version protects private files on disk, because CKAN's access checks run in the application layer and file permissions are the only barrier for direct reads. Owner: the systems team sets ownership and mounts, and the security team reviews them.

Unsafe content types on download

Files served under their uploaded content type can run in a visitor's browser if they contain markup or script, which puts other users of the portal at risk. Check how NGINX or the storage backend sets Content-Type and Content-Disposition on resource downloads, and whether HTML or SVG files can render inline on the portal domain. Confirm whether CKAN sets these headers itself or relies on the proxy in your version. Owner: the web team owns proxy headers, and the CKAN administrator decides which file types are offered for download.

Image handling of untrusted files

Image uploads are parsed by image libraries, and parsers of untrusted files are a known source of crashes and security bugs. Check which image types CKAN accepts, the value of ckan.max_image_size and whether any server-side image processing runs in an isolated process with memory limits. Confirm with the CKAN release notes and your image library version how uploads are processed and which package delivers the parser. Owner: the platform team patches the operating system and worker packages, and the CKAN administrator sets the accepted image types.

Backups that skip the FileStore

A database backup restores dataset and resource records that point to files, and those files may be missing from the restore. Check that the backup job copies the ckan.storage_path directory on the same schedule as the PostgreSQL dumps, and that both are restored together in a test. Confirm whether your storage is local disk or object storage, since each needs its own backup method and retention period. Owner: the operations team owns the backup job and restore tests, and the CKAN administrator defines what a complete restore includes.

Who can upload to which dataset

Upload rights depend on organization roles, dataset ownership and collaborator settings, so one misconfigured role can let the wrong person add files to published data. Check which roles can create and edit resources in each organization, whether collaborators can upload and whether private datasets keep their files hidden from anonymous visitors. Confirm how API tokens inherit these rights, because a token with upload permission can act without a browser session. Owner: the CKAN administrator manages roles and collaborators, and the data owner in each organization approves who uploads.

How FileStore planning changes by deployment shape

On a single server or a source install, the FileStore is a directory on the same host that runs CKAN, uWSGI, Nginx and the databases. The risk is quiet: a wrong path or a missing write permission often surfaces only when the first file is uploaded. The CKAN source install guide lists the supported platform requirements, so use it to confirm the host before you size storage.

  • Shared access: The web process and background workers both read and write the storage path, so they must run as the same service user or share a group with write access.
  • Ownership and upgrades: Keep the directory outside the package or source tree so an upgrade does not overwrite or orphan stored files.
  • Backup scope: Back up the storage directory in the same window as the CKAN and DataStore PostgreSQL databases, because resource records point to files that must still exist after a restore.
  • Web server limits: Match the Nginx upload limit to ckan.max_resource_size, or large uploads fail before CKAN records them.

Confirm with the platform team which account runs CKAN, where the storage path sits on disk, and whether that volume is included in the nightly backup job.

What to confirm in your environment before enabling uploads

Upload behavior depends on more than one CKAN setting. The limits below sit in CKAN, the runtime beneath it, the proxies in front of it and the extensions that handle files, so each one needs an answer before you enable uploads. Check the CKAN release notes first, then your own environment.

CKAN version and storage backends

Start with the exact CKAN version you plan to run. Read its release notes to see which FileStore options it provides, including whether a storage backend other than the local path is available, and what each one needs. Ask which backend and FileStore settings the release supports and whether moving from the local path requires migrating existing resources. Patch releases avoid schema changes and new features, so your minor version decides which options you get.

CKAN releases

Python, PostgreSQL, Solr and Redis

Installing from source calls for Python 3.10 or newer, PostgreSQL 12 or newer, Solr 9 (recommended) or Solr 8, and Redis. Confirm these minimums against the release you chose, then check that your database, search and cache services already run versions in that range. Ask the team which Solr image and Redis build they will use, and whether an in-cluster or managed PostgreSQL meets the same minimum. A higher upload limit only helps if the stack beneath CKAN can run the release.

Install from source

Expected storage capacity and growth

Estimate how much file storage the portal needs before you pick a size limit or backend. Ask the team which datasets will carry large resources, how often they will upload new versions, and how long old versions stay before cleanup. Also confirm where ckan.storage_path lives, how much headroom it has, and how backups copy it, because FileStore files sit outside the PostgreSQL database and search index.

NGINX and load balancer body limits

Each proxy layer between users and CKAN has its own request body limit, and the smallest one wins. Check the NGINX client_max_body_size directive on the reverse proxy, then the limit on any cloud load balancer or ingress controller in front of it. Set them to match ckan.max_resource_size so a file that CKAN accepts does not fail with a generic 413 error at the proxy. Test a file at the limit and one just over it through every layer.

CDN and cloud WAF upload rules

A CDN or cloud web application firewall can reject or truncate uploads before they reach NGINX, and its limits are often set in a separate console from the application. Ask the team who owns that layer, what the maximum request body size is for the upload paths, and whether the rule set blocks file types or multipart forms that CKAN expects. Record the answers in the same place as the NGINX limits, so one change does not leave the other layer out of step.

Extensions that handle files or images

Extensions can accept, change or validate uploads in ways the core FileStore does not. List every installed extension that touches resources, images or the DataStore, then read its configuration for allowed types and size checks. XLoader loads uploaded files into the DataStore and runs as background jobs, so confirm its file size and format settings too. Any theme or custom extension that changes image handling should be tested against the limits you set.

DataStore docs

How much effort and time does a FileStore configuration take?

How much effort does FileStore setup take compared with the rest of CKAN?

The settings are few, but they reach into the web server, storage, backups and background workers, so most of the effort goes into planning and testing. Compared with installing CKAN, Solr, PostgreSQL and Redis, it is a narrow task. Keys such as ckan.storage_path and ckan.max_resource_size are simple to set. The real work is confirming that every layer accepts the same file sizes, that storage permissions are correct on every node, and that a restore brings back uploaded files along with the database. Ask the partner how these checks will be recorded and handed over.

What drives the effort of a CKAN FileStore configuration?

The main drivers are the storage model, the number of nodes and the backup needs. Each one changes how much checking the work requires.

  • Storage model: a local path on one host, a shared volume mounted on several nodes, or a storage backend available in CKAN 2.12 each carry different permission and failover work.
  • Web and worker nodes: every node that handles uploads or downloads must see the same files and enforce the same limits.
  • Backup requirements: uploads need their own backup schedule and a tested restore, separate from the PostgreSQL dump.
  • Image handling: allowed image types, image size limits and thumbnails add checks at upload time.
  • Testing: uploads at each size you plan to allow, sent through the same proxy path users take, take time to set up and must be repeated after changes.
What does the FileStore work need from our team?

Four inputs from your side keep the work on track, and a gap in any one of them delays it. Confirm each one before the scope is signed.

  • Storage access: mount points, volume or bucket credentials, and permission to set ownership on the upload directory.
  • A change window: limits take effect through configuration and service restarts, so web and worker processes need planned downtime or a rolling approach.
  • A test dataset: sample files at the sizes and types you intend to accept, plus several files that should be refused.
  • A named owner for limits: one person who approves the maximum resource size, image limits and allowed types, and who signs off the test results.
Can our own team configure FileStore uploads without a partner?

Yes, for a single host with a clear plan. A team that already runs CKAN can set the storage path, match the Nginx and uWSGI upload limits to ckan.max_resource_size, restart the services and test with a few files. It becomes harder with shared storage in containers or Kubernetes. There, the volume must be writable by the right user on every replica, storage must survive pod rescheduling, and the limits set in the ingress, web server and CKAN must agree. If your team has not run shared volumes for CKAN before, a written scope that names the storage model and the test cases is a safer starting point. Confirm your CKAN version and the storage options against the release notes before you choose.

What should a written quote for FileStore configuration include?

A written quote should show what will change, how it will be tested and who is responsible for each part. Ask for the deployment layout reviewed, including whether the portal runs on one host, in containers or on Kubernetes and how many web and worker nodes it has. Also ask for the storage model and who provisions it, the exact CKAN settings to change, the web server and worker changes, a test plan with pass criteria, a restore check for uploads, the change window and rollback steps, the items the client provides and the handover. Ask which items are one-time and which recur, such as retesting after each upgrade or limit change. Confirm whether any storage or hosting charges are billed by DeployOpen or by a provider.

How does a CKAN upgrade change FileStore configuration work?

Patch upgrades carry less FileStore risk than minor upgrades, but every upgrade needs a fresh check. CKAN patch releases do not break backwards compatibility and exclude schema changes, while minor releases may include backwards-incompatible changes. Review FileStore settings and any storage code against the release notes for the target version. CKAN 2.12.0 was released on August 26, 2026, alongside maintenance releases 2.11.6 and 2.10.11 on the same day. After each upgrade, repeat the upload, image and size tests, confirm the storage path resolves on every node and check that web server limits still match. Read the CKAN release policy before you plan the window.

Does FileStore configuration create security or compliance risk for our portal?

Yes, FileStore configuration controls what enters the portal and who can write to it. The settings decide which file types and image formats are accepted, how large uploads may be and where files are written. Risk comes from write permissions on the storage path that are wider than needed, from a web server that accepts uploads CKAN should refuse, and from backups that copy private resources to locations with weaker controls. Ask for storage permissions to be reviewed, upload rules to be tested with files that should be refused and the backup location to be documented. These records can support a compliance readiness file, but DeployOpen does not issue audit reports or certifications. Independent auditors and certification bodies make those determinations.

How DeployOpen scopes and delivers FileStore configuration

DeployOpen plans FileStore configuration as part of the CKAN deployment, before the first upload is accepted. We agree the storage location, size limits, allowed image types and web server limits up front, then configure and test them together in your infrastructure. The settings are documented so your platform and compliance teams can review them.

How we scope

  • The written scope lists the storage path or storage backend, and the resource and image size limits to be set.
  • It records which image types are allowed and whether uploads should be switched off entirely.
  • Engagements are fixed-scope, so scope, deliverables and timeline are agreed in writing before work starts.

How we build

  • Storage path or storage backend is configured in CKAN and verified with a test upload.
  • Resource and image size limits are set in CKAN, then matched in the web server in front of it.
  • Allowed image types and upload switches are applied through configuration, with changes recorded so they can be reviewed and reproduced.

How we hand over

  • A handover document lists each setting, its value, the file or environment variable it lives in, and why.
  • Test evidence covers accepted and rejected uploads for each type and size, so reviewers can see the limits working.
  • A short walkthrough with your platform team covers where storage lives, how to change limits, and what to back up.

How we support

  • Retainers are available for ongoing support, CKAN upgrades and continuous testing of upload settings.
  • Upgrades to a newer CKAN release are checked against the FileStore settings before the change goes live.
  • Ask your DeployOpen contact to confirm which CKAN version and extensions the support covers before agreeing the written scope.

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.