Running CKAN with ckan-docker in production

This page covers which ckan-docker services to keep for a production CKAN portal, how to replace DataPusher with XLoader, and how to set TLS, persistent volumes and environment variable configuration before go-live.

On this page

What a ckan-docker setup needs before it serves a public portal

The ckan-docker Compose setup is a useful starting point for a public portal, but it still needs decisions about services, the DataStore loader, TLS, storage and configuration. Use the laptop or test stack to learn how the pieces connect, then review each piece against production requirements before anyone outside your network uses the portal. The review should cover which containers you keep, the DataStore loader that replaces the legacy tool, the HTTPS endpoint in front of the web application, the persistent volumes that hold uploads and databases, and the environment variables that carry settings and secrets into each container.

CKAN is an open-source data management system for data hubs and data portals, licensed under the GNU Affero General Public License v3.0. A public portal depends on four services. The web application serves the catalog pages and the API. PostgreSQL holds the core CKAN database, and the DataStore keeps structured resource data in a separate PostgreSQL database with a write user and a read-only user, so both databases need their own roles from the start. Solr runs search, and CKAN's source install documentation recommends Solr 9. Redis is required by CKAN and stays in the stack even though it rarely gets attention. Confirm that each service has its own health check, backup and restore test before go-live, because a portal can appear healthy at the web container while search returns nothing or DataStore tables fail to load.

A containers path fits a team better than a package install when the team already runs a container platform, wants each CKAN version pinned in an image, and plans to build its own image with a theme and extensions on top. The package install guide covers Ubuntu 20.04 and 22.04 64-bit, and source installs also work on Red Hat, Fedora and CentOS, so a team with a supported Ubuntu fleet and mature configuration management may find that path simpler. Ask your operations team which hosting model it will support for the life of the portal, because the choice sets who patches the operating system, how upgrades are staged and where backups run. The install from source guide lists the component versions the portal must run on, which is a useful check on either path.

Which ckan-docker services to keep, replace or move

This table lists each service in the ckan-docker Compose file, what it does in CKAN, the usual production choice and when a different choice fits. Read the first column as the decision point, then check the Compose file of the exact version you pin, since service names and images may change between releases. Keeping CKAN, PostgreSQL, Solr and Redis in place is the common path, while DataPusher should be replaced by XLoader.

ServiceWhat it does in CKANUsual production choiceWhen a different choice fits
CKAN web applicationServes the portal interface and API, loads extensions and handles dataset and user requestsKeep as the main container, built from a pinned CKAN imageBuild your own image when you add a theme or extensions, using a pinned base image
Main PostgreSQL databaseStores CKAN metadata, users, organizations and activity recordsKeep one PostgreSQL 12 or newer instance with tested backupsMove to managed PostgreSQL when your provider handles backups, failover and patching
DataStore databaseHolds loaded tabular resource data for the Data API in a separate databaseKeep as a separate database with a write user and a read-only userMove to managed PostgreSQL using the same separate database and user layout
SolrIndexes datasets for search, filtering and facetsKeep Solr 9, which is recommended, with the schema for your CKAN versionRun Solr on its own host or cluster when index size or query load outgrows one container
RedisBacks CKAN's background job queue and cachingKeep one Redis instance and review its persistence and access settingsUse a managed Redis service when you can confirm its persistence and access controls
DataPusherLegacy loader that pushes uploaded files into the DataStoreReplace with XLoader, the officially supported loaderStay on it only for a short transition while existing jobs move to XLoader
Background job workerRuns queued jobs such as XLoader loads, harvesting and emailRun as its own service so job load can scale apart from the web containerAdd more worker instances when queues grow, after you confirm the worker service in your Compose file
Web proxyTerminates TLS and forwards requests to CKAN, with upload size limitsKeep a reverse proxy in front of CKAN with TLS and matching size limitsMove to a cluster ingress or managed load balancer when your platform already terminates TLS

Only the TLS proxy faces the public network

The diagram starts with users on the public network sending HTTPS requests to the TLS terminating proxy, the only component that crosses the trust boundary. The proxy forwards requests to the CKAN web application, which reads and writes the main PostgreSQL database and the DataStore PostgreSQL database through its write user, and reads DataStore tables through the read-only user. CKAN queries Solr for search and places background jobs on Redis. The XLoader worker picks those jobs up, reads uploaded files from shared file storage and writes rows into the DataStore. When you review your setup, confirm that PostgreSQL, Solr and Redis publish no ports outside the internal network.

Production request and data path for ckan-docker, with the trust boundary marked.

How to take ckan-docker to production in order

This sequence moves the official ckan-docker Compose setup from a test stack to a production one. Each step ends with a check you can run before moving on, so the team knows each change holds. The result is a CKAN portal with pinned versions, a supported loader, managed secrets, durable storage, TLS, restricted DataStore access and a restore you have tested.

  1. Pin the CKAN image to an exact version

    Replace any floating tag such as latest with one exact CKAN version in the Compose file, and record that tag in your change log. Then confirm the image meets the minimums in CKAN's source install documentation: Python 3.10 or newer and PostgreSQL 12 or newer. Run the container and check the Python version inside it, then check the PostgreSQL server version your stack uses against the same minimum. The step is done when the running container reports the pinned CKAN version and both versions meet or exceed the minimums. Confirm the database image tag separately, since that container is pinned on its own.

  2. Pin Solr to a version that matches CKAN

    Pin the Solr image to Solr 9, which CKAN's install documentation recommends, or to Solr 8 if the CKAN release you pinned still requires it. Confirm the pairing against the CKAN version from the previous step, because the search schema must match the Solr version in use. Once the stack starts, open the Solr admin interface and confirm the core exists and the CKAN schema loads without errors. Then create a test dataset in CKAN and confirm it appears in a search. The step is done when the test dataset is returned by search results from the CKAN interface.

  3. Replace DataPusher with XLoader

    Remove DataPusher and its related settings from the Compose file, then add XLoader, the loader CKAN's DataStore documentation lists as officially supported. DataPusher is now legacy. Confirm XLoader connects to the same Redis instance and job queue your CKAN stack already uses, and that its worker container starts with the rest of the stack. Upload a small CSV file to a test dataset and check that the resource loads into the DataStore and returns rows through the Data API. The step is done when the job logs show no errors and the row count matches the source file.

  4. Move secrets and settings into environment variables

    Move database passwords, CKAN secret keys, API tokens and site settings out of ini files and the Compose file, and load them from an env file or secret store kept outside the repository. Confirm the variable names against the environment variable guide for your CKAN release, since the naming convention depends on the version. Then run two checks. Inspect the image layers and history to confirm no secret values are baked in, and scan the repository with a secret scanning tool to confirm no passwords or keys are committed. The step is done when a fresh container starts from the env file alone and both scans come back clean.

  5. Create persistent volumes for FileStore and PostgreSQL

    Map named volumes or dedicated host paths to the FileStore directory and to the PostgreSQL data directory, and confirm the Compose file paths match what CKAN and the database use. The DataStore database lives in the same PostgreSQL server, so its data is covered by the database volume. Upload a test resource file, create a test dataset, then restart the CKAN and database containers. The step is done when the uploaded file still downloads and the dataset and DataStore rows are still present. Also confirm that a stop and start without removing volumes keeps the data, since only an explicit volume removal should delete it.

  6. Put a TLS-terminating proxy in front of CKAN

    Place a reverse proxy such as NGINX in front of CKAN to terminate TLS, using a certificate issued for the portal hostname by your certificate authority. Configure it to redirect HTTP requests to HTTPS and to pass the forwarded protocol and host headers that CKAN uses to build its links. Set the proxy's upload size limit to match the maximum resource size in your CKAN configuration, so the two limits agree. The step is done when an external client sees a valid certificate chain, plain HTTP redirects to HTTPS, and an upload just under the limit succeeds while one just over it is rejected.

  7. Create DataStore write and read-only users

    Create the DataStore write user and the read-only user in PostgreSQL, following the DataStore permissions setup in CKAN's documentation. Store their connection strings in the environment variables from the secrets step. Grant the read-only user read access only, with no superuser rights. Test it directly by connecting as the read-only user with psql and attempting an INSERT or CREATE TABLE against a DataStore table. The step is done when CKAN still serves DataStore queries through the Data API and the read-only user's write attempt fails with a permission error.

  8. Test a backup and restore on a separate host

    Schedule dumps of the CKAN and DataStore databases and back up the FileStore volume, with frequency and retention set by your recovery requirements. Then restore those backups to a separate host with no access to production, using only the backup files. Start CKAN there and confirm the datasets, a DataStore resource and an uploaded file all come back. Rebuild or restore the search index, then confirm search returns results. The step is done when the restored portal matches production for the test records, and you have written down the restore commands and how long they took for the next run.

Where to terminate TLS for a CKAN portal

Terminate TLS at a load balancer when your cloud provider or data center already runs one in front of the portal. The load balancer holds the certificate, so the network or security team can manage renewal with tools it already uses, and the CKAN stack receives traffic on a private network. Redirects and upload limits are split across layers, which is where most mismatches start.

  • Certificates and renewal: The network or platform team usually owns the certificate, its private key and automated renewal on the load balancer, so the CKAN team does not handle key material.
  • Redirects: Set the HTTP to HTTPS redirect on the load balancer, and confirm the forwarded protocol header reaches the proxy so CKAN builds links with the public https scheme.
  • Upload size limits: The load balancer enforces its own maximum request body size. Set it at or above ckan.max_resource_size, and align the client_max_body_size value in the NGINX proxy in front of CKAN.
  • Ownership: The network team owns the listener, certificate and load balancer limits. The CKAN team owns ckan.max_resource_size and the proxy configuration inside the stack.
  • Encryption between proxy and CKAN: Traffic from the load balancer to the stack often stays unencrypted on a private network. That is simpler to operate, but anyone with access to that network segment can read portal traffic, so check segmentation against your policy.

Confirm that the load balancer, the proxy and CKAN agree on one public hostname and one maximum upload size, then check the uWSGI and NGINX settings against the CKAN guidance before go-live.

Why XLoader replaces DataPusher in a production stack

Plan the loader change before cutover: XLoader is the officially supported tool for loading uploaded or linked files into the CKAN DataStore, and DataPusher is now legacy. In a ckan-docker stack, the swap removes the DataPusher service from the Compose file, so nothing in the stack should still expect it to answer. XLoader jobs are background jobs, so they finish only when the background job worker is running alongside the CKAN container. Confirm how your image installs XLoader, whether its plugin is enabled in your configuration, and whether the worker process actually starts in the container you deploy. A stack that starts cleanly can still leave every new upload stuck in a queued state if the worker is missing.

Verify the DataStore database and its users together with the loader. The DataStore keeps its own PostgreSQL database, with a write user that loads rows and a read-only user that serves queries through the Data API. A loader that connects successfully can still fail to write where you expect, and a read path that points at the wrong database returns empty results for resources that look loaded. Check the write and read connection settings in your environment, confirm that the write user can create and fill DataStore tables, and confirm that the read-only user can select from them. Do this against the same PostgreSQL instance and credentials your production stack will use, since a test database with different grants will hide the problem.

Before cutover, load a test resource through the full chain: upload one file, link one remote file, wait for both jobs to finish, then query the rows through the Data API using the read-only path. Then review every resource that was loaded by DataPusher or depends on its behavior, including resources whose loads failed, and decide whether each one needs a reload through XLoader or a note to its publisher. Confirm the migration steps for your CKAN version in the CKAN DataStore documentation before you change the production stack, because the loader setup is documented there and may change between releases. Record what you checked so the cutover can be repeated during an upgrade.

Security risks to close before a CKAN portal goes live

Each card names one risk that a ckan-docker deployment carries through default settings or convenient shortcuts, along with the control that closes it. The controls are ones your team can check directly in the running stack. Check each one against your own security baseline before the portal receives public traffic or real user accounts.

Secrets in environment values and files

Compose files often hold database passwords, the beaker.session.secret value and API keys as plain environment values, and those values appear in docker inspect output, shell history and copies of the repository. Keep secrets out of the Compose file, load them from a secrets store or from an environment file that Git ignores, and restrict who can read any file that holds them. To verify, run docker inspect on each container and confirm that no credential values appear, then search the repository history for the same values.

Database and Solr ports exposed

A Compose file that publishes the PostgreSQL and Solr ports to the host lets any machine that can reach the host talk to the database and the search index directly. Those services should accept traffic only from the CKAN containers. Remove the host port mappings for these services, keep them on an internal network that only the CKAN containers join, and confirm that your firewall blocks the same ports at the network edge. To verify, check the same ports from a host outside that network and confirm that they do not answer.

DataStore write and read-only separation

The DataStore keeps resource rows in its own PostgreSQL database. CKAN uses a write user for loading data and a read-only user for the Data API and SQL queries. If both connection settings use the same credentials, any query endpoint can change stored data. Create the read-only role as described in the DataStore documentation, set ckan.datastore.read_url to that role, and confirm the role cannot insert, update or delete. To verify, send a write statement through the read URL and confirm that PostgreSQL rejects it.

DataStore docs

FileStore volume permissions

Uploaded resources and images land on the FileStore volume, and any process that can write to that volume can replace or alter what visitors download. Give write access only to the CKAN containers, let the web server read what it needs, and avoid running the CKAN containers as root where your image permits. To verify, check the owner and mode of the storage directory and of a sample upload, and confirm that a host account outside the CKAN service cannot write to either.

Unpinned image tags

A Compose file that points at a floating tag such as latest pulls whatever image the registry serves next. A routine pull can then change the CKAN version, extension code or Solr configuration without review. Pin each image to a specific version tag or digest, store the pins in version control, and change them only through a reviewed change. Before a pin moves, read the CKAN release notes, because minor releases may include backwards-incompatible changes while patch releases do not.

Default sysadmin and leftover tokens

The default sysadmin account is created during setup, and test API tokens stay valid in the database until someone revokes them. Create a named sysadmin for each person who needs the role, set strong passwords, remove or rename the setup account where your process allows, and revoke every test token. Review the user and token lists in the admin area before go-live and after each upgrade, and compare them with your access records.

Pinning the CKAN version and planning upgrades in containers

Pin the CKAN version to an exact tag in your image build and in the ckan-docker configuration, so a rebuild weeks later cannot pull a different release. CKAN 2.12.0 was released on August 26, 2026, together with maintenance releases 2.11.6 and 2.10.11 on the same day. The CKAN tech team supports the latest patch of the current minor version and the previous minor version, and outdated patch releases lose support once a newer patch is out. As an illustrative case, a portal still running an older 2.11 patch after 2.11.6 is out is running unsupported code, so confirm which tag each environment runs. Watch the CKAN releases page so new patches reach your team before they reach an incident queue.

Patch releases do not break backwards compatibility and exclude schema changes and new features, so a patch upgrade in a container is a rebuild, a redeploy and a smoke test that you can schedule as routine maintenance. Minor releases may include backwards-incompatible changes, so treat each minor upgrade as a planned project. Build a staging stack from the same ckan-docker configuration, restore copies of the CKAN and DataStore databases, and run tests for the DataStore, search and every extension you load. Check that each extension declares support for the target minor version, and keep the previous image tag available so you can roll back. Record how long each step takes, since that record becomes the basis for planning the next upgrade.

Limits to confirm in your environment before go-live

Compose files, version pairings and storage limits change over time, so each item below needs confirmation before go-live rather than an assumption. Confirm each one with the image maintainers, the CKAN docs or your own test environment, and write down the version each answer applies to.

Pinned tag and Compose file

Confirm that the ckan-docker tag you pinned still matches the current Compose file in the repository. Compose files change between tags, so service names, volume paths, environment variable names and image references can drift from the version you tested. Compare the file at your pinned tag with the file you plan to deploy, and read the release notes for changes to the CKAN image it references. Record the tag in your deployment notes so every environment uses the same one.

Python and PostgreSQL versions

A source install requires Python 3.10 or newer and PostgreSQL 12 or newer. Read the Python and PostgreSQL versions inside the image you run, and compare them with the CKAN version you target. If you use a managed database, confirm that its PostgreSQL major version meets the minimum before you build the schema. Ask the image maintainers and your database provider to confirm these versions in writing.

Install from source docs

Solr version and schema

CKAN source installs recommend Solr 9, with Solr 8 also supported, so confirm which one your Compose setup runs. The search schema must match the CKAN version you deploy, because a schema from another release can cause indexing and search problems. After any change to Solr or the schema, plan a full index rebuild and test search on a copy of your portal data. Confirm the pairing before you accept production traffic.

Install from source docs

XLoader worker in your Compose version

XLoader is the officially supported tool for loading uploaded or linked files into the DataStore, and DataPusher is now legacy. Confirm that the Compose version you pin includes a job worker that runs XLoader, because a setup built from an older example may still expect DataPusher. Check that the worker starts, connects to Redis and PostgreSQL, and loads a sample CSV file into a test DataStore. Record which loader each resource type uses.

DataStore docs

Managed database for DataStore

The DataStore keeps resource data in a separate PostgreSQL database and uses a write user and a read-only user. Confirm that your managed PostgreSQL service lets you create both databases and both roles without superuser access, and that it supports the character encoding the CKAN databases need. Also check how the provider handles extensions, connection limits and backups for the DataStore database. Test the DataStore setup on the managed service before go-live.

DataStore docs

Storage volumes and file sizes

Volumes for uploaded resources, the FileStore and the Solr index must hold the largest files your portal expects, plus growth over the retention you plan. Confirm the largest upload size you allow in CKAN, and check that the proxy, the web server and the volume each accept that size without truncating uploads. Test a large upload and a large DataStore load end to end, and confirm the volume size and backup scope with your storage provider. Record every limit in one place so operators change all layers together.

What drives the cost of a production ckan-docker setup?

What makes a production ckan-docker setup cost more or less?

The main drivers are how many of the six containers you keep, which ones you move to managed services, and how much extension and identity work sits on top. Each container you keep means you own its patching, backups, monitoring and failover. Moving PostgreSQL or Redis to a managed service shifts some of that operations work, but it adds a service to configure and pay for. Extensions add effort because each one needs its own configuration, testing against your CKAN version and upgrade review. TLS and identity choices add build and test steps for certificate issuance, renewal and connection to your identity source. Testing, backup and restore verification, and the move from DataPusher to XLoader also add effort. Ask each provider to itemize these components in its quote.

Does DeployOpen publish a price list for CKAN deployments?

No. DeployOpen does not publish a price list, and a quote follows from a written scope. Most engagements are fixed-scope, so scope, deliverables and timelines are agreed in writing before work starts. To compare quotes fairly, ask each provider to state which containers are in scope, whether managed PostgreSQL or Solr is included, which extensions are covered, how TLS and identity are handled, and what testing and backup verification are included. Ask which items are one-time work and which recur, such as ongoing support, upgrades and continuous testing, which DeployOpen offers as retainers. Also ask how a change in scope would affect the price and how change requests are approved in writing.

What do we need to provide for a CKAN deployment project?

You provide the access and decisions the work depends on. Typical inputs are:

  • Access to the cloud accounts, data center or air-gapped network where the stack will run
  • A domain name and the certificates, or the certificate process, for that domain
  • The identity source for single sign-on, with the connection details your team can share
  • Sample datasets and resources that represent your actual files, including the formats you publish
  • A named owner who signs off each stage, from the staging test to go-live

Agree these inputs in the written scope. Delays in access, certificates or identity details often push back the schedule more than the build itself, so confirm owners and lead times before work starts.

Can an internal team deploy ckan-docker in production without a partner?

Yes, a capable internal team can, if it has the skills and time to own the result. The official setup steps give the team a starting point, and the work is adapting them to your environment and keeping them correct over time. The skills needed include Docker and Docker Compose for the container stack, Linux administration for hosts, networking and certificates, PostgreSQL administration for the CKAN and DataStore databases, and Solr administration for search, including index rebuilds after schema changes. Plan for ongoing ownership as well: reviewing patches, testing backups by restoring them, and upgrading on the schedule CKAN's release policy supports. Check whether these skills exist in-house before you decide.

How is the timeline for a production CKAN setup determined?

The timeline follows from the agreed scope, and no fixed figure applies in advance. The schedule depends on how many containers and managed services are in scope, how many extensions need configuration and testing, how TLS and identity are connected, how much sample data is loaded and checked, and how quickly your team provides access, certificates and sign-off. Each of these appears as a milestone in the written scope, so you can see what drives the date. Ask for the milestones, the client dependencies behind each one, and the acceptance tests that close each stage.

When is a package install or managed platform a better fit than containers?

A package install or a hosted service often fits better when your team has limited capacity to run container platforms and wants fewer moving parts. The Ubuntu package install covers Ubuntu 20.04 and 22.04 64-bit, and the source install works on other systems such as Red Hat, Fedora and CentOS. Consider packages when your standard hosts are already supported, your team manages Linux services well, and you expect few extension changes. Consider a hosted service, if one is available to you, when you want the provider to run the platform and accept its limits on configuration and extensions. Containers suit teams that want reproducible images, consistent environments and a clear path to Kubernetes. Confirm supported operating systems in the official install guide before you choose.

How DeployOpen scopes and delivers a production CKAN stack

DeployOpen plans, implements, hardens, backs up, upgrades, documents and supports self-hosted open-source platforms inside your own infrastructure. For a production CKAN stack built from ckan-docker, that work starts with a written scope and ends with documented handover to your team. Engagements are fixed-scope, with containers, TLS, volumes, loaders and environment settings agreed in writing before build work begins.

How we scope

  • A written scope lists which of the six ckan-docker containers stay, and why each one is kept or removed.
  • Scope records the DataPusher to XLoader replacement, the hostname and TLS plan, and the persistent volume layout.
  • Fixed-scope agreements set deliverables and timelines in writing before work starts, and ongoing support can follow as a retainer.

How we build

  • Configuration moves into environment variables, with secrets kept out of image files and compose files.
  • XLoader replaces DataPusher as the loader, and DataStore write and read-only users are created.
  • TLS termination, persistent volumes for PostgreSQL, Solr and file storage, and backups are built and tested before handover.

How we hand over

  • Handover includes a Compose or deployment configuration, an environment variable reference, and runbooks for your team.
  • Documentation covers each container's role, upgrade steps for CKAN versions, and how to restore volumes from backup.
  • Security settings for the stack are documented so your compliance and security teams can review them.

How we support

  • Ongoing support, available as a retainer, can cover CKAN patch and minor upgrades, planned against the CKAN release policy.
  • Continuous security testing of the running stack can be added to the retainer after handover.
  • Each upgrade is checked for extension compatibility before it reaches the production stack.

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.