Why a CKAN 2.8 portal on Python 2 needs a planned migration path
A CKAN 2.8 portal running on Python 2 cannot be patched forward in place. Getting it to a supported release means a staged Python 3 migration followed by rework of every Python 2 extension, and each stage needs its own check before the next one starts. The constraint that shapes the whole plan is the install baseline: installing CKAN from source requires Python 3.10 or newer, so the portal has to move through the Python 3 transition and then onto a release that runs on that interpreter.
The version rules set the order of work. CKAN supports the latest patch of the current minor line and the previous minor line, and outdated patches lose support once a newer patch ships. Patch releases do not break backwards compatibility, but minor releases may, so each minor hop needs its own compatibility review of the portal's configuration, database and extensions. The reader should confirm the exact intermediate release with the CKAN release policy and check it against the list of installed extensions, because an intermediate version that suits the core may not suit a custom plugin.
The migration procedure in the CKAN documentation is the reference for the core steps, so the team should treat it as the baseline rather than rely on memory of an earlier upgrade. Before any environment is changed, record the current CKAN version, the Python version, every installed extension and its version, and the database and Solr versions in use. That inventory decides which extensions must be rewritten or replaced, which must be upgraded to a release that supports the target, and which can be dropped, and it turns the migration from a single risky event into a sequence of verifiable steps.
What changes between CKAN 2.8 and the current supported lines
This table compares what a CKAN 2.8 portal runs on with the minimum requirements and support status of the current lines. Read each row as a question to answer about your own portal: which dependency or extension must move, and what you must confirm before you schedule the cutover.
| Change | Impact on a Python 2 portal | Action needed |
|---|---|---|
| Python 3.10 minimum | Source installs of current CKAN require Python 3.10 or newer, so a Python 2 host cannot run any supported line. | Plan a new Python 3.10 or newer runtime and rebuild the virtual environment rather than upgrading in place. |
| PostgreSQL 12 or newer | Current source installs expect PostgreSQL 12 or newer, so an older database server may need replacing before the code move. | Check your database version, plan a dump and restore or upgrade, and test the schema on the target version. |
| Solr 9 recommended, Solr 8 supported | Search index and CKAN schema must match the Solr version in use, and Solr 9 is the recommended choice. | Confirm which Solr version your target CKAN release supports, then plan a full index rebuild after the move. |
| Redis required | Current source installs list Redis as a required service, which a legacy portal may not run. | Install and configure Redis, then confirm background jobs and caching work in a test environment. |
| CKAN 2.12.0 and maintenance releases 2.11.6 and 2.10.11 (August 26, 2026) | These are the current releases on the published release date. Older lines lose support once their latest patch is out. | Pick a target line, then check the release notes for the exact upgrade path from your starting version. |
| Minor releases may be backwards incompatible | Moving between minor versions can change behavior, configuration and removed features. Patch releases do not carry these changes. | Read the notes for every minor release between your start and target, and test each step in a separate environment. |
| DataPusher legacy, XLoader supported | DataPusher is legacy, so DataStore loading on a legacy portal may depend on a tool that is no longer the recommended choice. | Replace DataPusher with XLoader and confirm which resources must be reloaded into the DataStore. |
| ckanext-dcat supports CKAN 2.10 and 2.11 | Extension support is tied to CKAN versions. A version that works on Python 2 may not work on the target line. | Check each extension's supported-version table, then upgrade or replace it to match the target release. |
| ckanext-saml2auth supports CKAN 2.10 and later | Single sign-on extensions may not run on legacy CKAN releases, which affects login for every user. | Confirm the matching extension version for your target line and test login before cutover. |
| Python 2 to 3 steps and intermediate releases | The exact migration steps and any required intermediate release are not covered in the facts used for this table. | Confirm the steps, intermediate versions and any data migration in the CKAN docs and release notes before planning. |
How the migration path moves a portal from Python 2 to a supported release
The path starts with an inventory of the running portal and every installed extension, because the extension list decides how much work the move involves. The team then chooses the intermediate CKAN release it will stop at, and builds a Python 3.10 or newer environment with PostgreSQL, Solr and Redis. Extensions are rewritten or replaced in that environment, and a test restore of the production data proves the new stack before anything changes. Cutover must include a rollback branch back to the legacy host, so the team can return quickly if the restored portal fails checks. Confirm the exact order against the CKAN docs for the release you choose.
A planning view; the exact order comes from the CKAN docs for the chosen release.
What to prepare before touching the Python 2 portal
Before any code changes, the team needs recoverable copies of the portal, a clear record of what runs on it, and a test environment that can prove the migration works. Each card below produces one artifact, and together they define what the migration is measured against and how a rollback would happen.
Full backup of every data store
Take a full backup of the main PostgreSQL database, the separate DataStore database and the file storage holding uploads and resources. Confirm that the DataStore read-only and write users and their grants are captured, since they are configured outside the main database. Test a restore on a separate host before relying on the backup. The platform or database team usually owns this, with the portal owner signing off that the restore was checked.
DataStore docsExtension inventory with pinned versions
List every installed extension with its source repository, the exact commit or release it runs, and the CKAN version it declares support for. Include plugins loaded from the configuration file that no one remembers adding. This inventory decides which extensions need a Python 3 release, a rewrite, or replacement. The development team or whoever maintains the deployment usually owns it.
Custom templates, configuration and patches
Collect every custom template, theme file, the CKAN configuration file, environment variables, and any patches applied to the CKAN source itself. Record which of these depend on Python 2 behavior, such as string handling or old library calls. Store them in version control so the migrated portal can be rebuilt from known inputs. Frontend or theme developers and the portal's configuration owner usually share this work.
Python 3 test environment that mirrors production
Build a separate test environment on Python 3.10 or newer, the minimum the CKAN install from source documentation requires. Match the production operating system, PostgreSQL, Solr, Redis and web server versions as closely as possible, so that test results carry over. Keep it isolated from production credentials and outbound services. The platform engineering team usually owns the build, and the test environment should be reproducible from scripts.
Install from source docsRecent production data for test runs
Restore a copy of production data into the test environment, including database contents and file storage, so migration runs exercise real datasets, resources, users and organizations. Agree how personal data in user accounts is handled in the copy, because test environments are often less controlled than production. Confirm the copy can be refreshed so later test runs start from a known state. The database administrator and the data protection contact usually share this card.
Named owner for sign-off
Name one person who accepts the migrated portal, with a written list of checks they will use: pages that must render, datasets and resources that must load, search results, user logins, API calls and scheduled jobs. Decide who can halt the cutover and who approves the rollback path. This person is usually the product or portal owner, and their acceptance criteria should be written before the first test run so that results are judged against them.
The upgrade sequence from Python 2 to a supported release
This sequence moves a legacy CKAN portal off Python 2 onto a supported Python 3 build, with a checked test environment and a rollback point before cutover. Each step closes with a check, so the team knows when it can move on.
Freeze and back up the legacy portal
The portal owner freezes configuration and dataset changes, then takes a full backup of the PostgreSQL database, the DataStore database, the uploaded file storage and the configuration files. The step is done when the team has restored a copy of the backup to a separate machine and confirmed it loads, which becomes the rollback point for everything that follows. Exact backup commands come from the CKAN docs for your installed version.
Record the inventory of the legacy portal
The platform team lists the CKAN version, every installed extension with its version and source, custom templates, Solr and Redis versions, the operating system and any scheduled background jobs. The step is done when every Python 2 extension is marked as ported, replaced or retired, and each one has an owner. This list drives the effort estimate and the test plan.
Build the Python 3 target in a test environment
The platform team builds a test server with Python 3.10 or newer, PostgreSQL 12 or newer and Redis, following the CKAN source install guide for the target release. The step is done when the target CKAN release starts, connects to the database and serves its front page without errors. Any intermediate releases the docs require are applied here, not on production.
Port or replace each Python 2 extension
Developers rewrite each Python 2 extension for Python 3 and the target CKAN release, or swap it for a maintained equivalent where one exists. The step is done when each extension loads on the test build, its plugin entry points register and its own tests pass. Extensions that cannot be ported are documented as a business decision before cutover, not discovered during it.
Bring up the search index on Solr
The platform team installs Solr 9 (recommended) or Solr 8 with the CKAN schema that matches the target release, then rebuilds the search index from the database. The step is done when a search for known datasets returns the expected results and the index count matches the database count. The index can always be rebuilt from the database, so this step has no separate rollback.
Restore data into the test environment
The platform team restores the database, DataStore tables and uploaded files from the frozen backup into the test build, then runs any database migrations the CKAN docs specify for the target release. The step is done when row counts for datasets, organizations and DataStore resources match the legacy portal. Mismatches stop the sequence until the cause is understood.
Run functional checks on datasets, DataStore and logins
Testers work through a written script covering dataset create, edit and delete, resource upload, DataStore queries through the Data API, harvesting or background jobs, user login and role access. The step is done when every check passes or has a logged defect with an agreed fix. Testers should also confirm that single sign-on, if used, works against the test environment.
Cut over with a rollback point
The team takes a final backup of the legacy portal, switches the web server or DNS to the new build during an agreed window, and keeps the legacy server intact and reachable for a rollback. The step is done when the new portal passes the functional script on production addresses and the owner signs off. If checks fail, the team switches back to the legacy server using the saved rollback point.
Rewriting or replacing Python 2 extensions
Every Python 2 extension on the portal needs one of three outcomes: port it to Python 3 yourself, replace it with a maintained official or community extension, or drop the feature. The choice depends on what the extension does for your users, whether an actively maintained alternative exists, and how much custom logic the port would carry forward. Make the decision per extension in writing before any code changes, because a replacement can change dataset schemas, permissions or stored data in ways the core migration steps do not cover.
Whatever the choice, the replacement must support the target CKAN release, not just the release you are leaving. Open each candidate's repository and read its supported version table, then confirm the row for your target minor version lists the CKAN release and Python version you plan to run. Two supplied examples show the check. The ckanext-dcat repository states support for CKAN 2.10 and 2.11, so it cannot be assumed to work on a newer line without checking the release notes. The ckanext-saml2auth repository states support for CKAN 2.10 and later, which matters if your sign-in depends on SAML2 attributes. Record the version table you read and the date you read it, since maintainers update these tables with each release.
Custom extensions have no maintainer outside your team, so they need their own test suite run against the target CKAN version and Python 3 interpreter in a separate environment. Test the behavior users depend on: dataset and resource forms, validation, permissions, API responses and any background jobs the extension registers. Ask whoever wrote the code to confirm which CKAN APIs it calls, because removed or changed helpers are a common source of failure after a move. Plan time for fixing what the tests expose, and treat an extension without tests as a replacement candidate rather than a port.
What makes a Python 2 to 3 migration take longer
This table lists the factors that stretch a CKAN Python 2 to 3 migration and why each one adds work. Read each row as a question to answer during scoping, because the same factor can add weeks on one portal and almost nothing on another. The main takeaway is that a written inventory of extensions, environments and data should come before any estimate.
| Driver | Why it adds effort | What to ask for in a quote |
|---|---|---|
| Number and age of custom extensions | Each custom extension written for CKAN 2.8 or older may rely on Python 2 syntax, old plugin interfaces or removed helpers, so each one needs review, porting or replacement. | A named list of every extension with its source, age and owner, plus a decision for each (port, replace or retire). |
| Extensions with no maintained Python 3 release | If a third-party extension has no release that supports Python 3 and the target CKAN version, the team must find a replacement or write and maintain one. | A compatibility check against the target version for each third-party extension, with the source of each version table. |
| Custom themes and templates | Templates and CSS written for older CKAN front ends may need rework when the default theme or template structure changes between releases. | The list of theme files and template overrides, and whether design changes are in or out of scope. |
| Data volume and DataStore tables | Larger datasets and DataStore tables lengthen backup, restore and reload steps, and they make test runs on realistic copies slower. | Row counts and storage size per database, the backup method, and how DataStore tables will be verified after the move. |
| Number of environments kept in step | Development, test, staging and production each need the same code, configuration and extensions, and drift between them is a common source of late surprises. | The full environment list, which ones must be migrated, and how configuration is kept consistent during the work. |
| SSO or SAML2 in use | A SAML2 setup such as ckanext-saml2auth needs its own version check, identity provider testing and login flows verified on the new release. | Confirmation of the identity provider, the SSO extension and version, and the test cases for login and role mapping. |
| Search index rebuild | The Solr index must match the new CKAN schema and is rebuilt as part of the move, which affects downtime and the time needed to validate search results. | The Solr version in use, the rebuild approach, expected search checks and the downtime window agreed with the client. |
| Intermediate upgrade hops | Moving from an old 2.8 or earlier portal to a supported release may require stopping at intermediate versions, and each hop adds a full test and cutover cycle. | The planned upgrade path, the release each hop targets, and whether intermediate stops are included in the fixed scope. |
How to test and roll back by environment
This environment proves that the ported code installs, starts and behaves correctly on a clean stack, usually with sample data. Nothing here is accepted as the final result, but failures are cheapest to fix at this stage. Run the migrated extensions against the target CKAN release in a separate environment, and record every test that fails and why.
- Dataset and resource checks: Create, edit, delete and private-dataset workflows for each custom schema field, plus upload and link resources.
- DataStore queries: Load a sample CSV, then confirm row counts and filtered results through the Data API, including the read-only user.
- Search after rebuild: Rebuild the Solr index from empty and confirm that known datasets return for keyword, facet and organization filters.
- Login and roles: Test each role your extensions depend on, including sysadmin, organization editor and anonymous access.
- Background jobs: Run the job worker and any scheduled tasks by hand, and check the logs for Python 3 errors such as bytes and string mismatches.
Do not move on until these checks pass on a fresh install. Keep the build environment's configuration files under version control so the same steps can be repeated in staging.
Staging is where the migration is rehearsed against a copy of production data, including its size, odd records and custom metadata. Take the copy from the legacy database and files, then run the full migration procedure from the CKAN documentation exactly as it will run in production. Time each step and write it down, because the same steps will run again at cutover.
- Full procedure rehearsal: Run every step in order on the copied data, and record any step that needed manual correction.
- Dataset and resource audit: Compare dataset counts, organization counts and resource URLs against the legacy portal, and sample records by hand.
- DataStore and Data API: Re-run the queries your users depend on and compare results with the legacy portal.
- Search and users: Rebuild the index on the copied data, then test login, role assignment and API tokens for real accounts.
- Rollback drill: Restore the legacy backup to a separate host and confirm it starts, so the restore path is known to work.
Staging is complete when a second person can repeat the procedure from the written record and reach the same counts and query results.
Production cutover runs the rehearsed procedure on live data during an agreed maintenance window. The legacy host, its database and its file storage stay untouched until the new portal has been accepted by its owners, because that is what makes a return possible. Freeze content edits for the window and confirm the backup has completed before the first step.
- Pre-cutover backup: Take a fresh database dump and copy the file storage, and verify both can be restored.
- Acceptance checks: Repeat the dataset, DataStore, search, login and background job checks from staging on the live portal, and sign off with named owners.
- Scheduled jobs: Confirm harvesters, cleanup tasks and any job queue are running on the new host and not still on the legacy one.
- Rollback path: If a check fails, point traffic back to the legacy host, which still holds the original data, or restore the verified backup to a new host.
- Retention of legacy data: Keep the legacy database and files intact until acceptance, and confirm the period with your own policy before decommissioning anything.
The cutover is accepted only when the owners have signed off the checks in writing. Ask your partner or internal team to confirm the rollback steps in the runbook before the window opens.
Questions buyers ask before a Python 2 to 3 CKAN migration
How much does a Python 2 to 3 CKAN migration cost?
No public figure applies, so the cost comes from a written scope. The main drivers are the number of installed extensions, how many already have Python 3 compatible releases, how much custom code needs rewriting, how many environments (development, test and production) must be prepared, and how much data and search index the portal holds. Ask for a quote that separates one-time work (assessment, extension rewrites, migration runs, testing and cutover) from recurring work (hosting, patch routines and any retainer support). Ask which items are fixed and which are priced as change requests if the inventory changes.
How long does a CKAN Python 3 migration take?
The duration depends mostly on the extension inventory and only partly on the core upgrade. Each extension must be checked for a Python 3 compatible release, and any extension without one must be rewritten, replaced or dropped, which is usually the longest item. Custom templates, theme work, the size of the search index and the test window your organization needs also move the schedule. Ask for a timeline built from a completed inventory, with milestones for each environment and a named cutover window. Treat any duration given before the inventory is finished as a guess.
What does our team need to provide for the migration?
The work needs four things from your side:
- Access to the current servers, PostgreSQL database, Solr instance, configuration files and deployment code, plus a copy of production data for testing.
- A named business owner for each part of the portal who signs off test results.
- A test window agreed in advance, long enough to check datasets, the DataStore, search, harvesting and user logins.
- Decision-makers who can approve dropping, replacing or pausing any extension that cannot move to Python 3.
Also confirm that current backups have been restored successfully in a separate environment before work starts.
Can our internal team migrate CKAN from Python 2 to 3 on its own?
Yes, if your team has CKAN and Python experience and enough time to work through the install and upgrade procedure in the CKAN documentation. Internal teams most often get stuck on the extension inventory, because each Python 2 extension needs source-level review and possibly a rewrite. Check whether you have people who can read and change extension code, debug Solr and PostgreSQL problems, and run repeated test cycles with business sign-off. Weigh the schedule risk of doing this alongside daily operations. A written assessment from a partner can show which parts are realistic for your team to own and which parts are better delegated.
Can our CKAN portal stay on Python 2 for now?
It can keep running for now, but treat that as a time-limited risk. CKAN installs from source require Python 3.10 or newer, so a Python 2 host cannot follow the current install path until the migration is done. Security and bug fixes only reach the latest patch of the current minor release and the previous minor release, so an older line will fall out of support as newer releases ship. Confirm your exposure with your security team, document the decision and reduce public exposure where you can. Check the release policy before setting a date for the move.
Can we skip straight to the current CKAN release during the migration?
Often yes as the target, but plan it as a version change that also includes the language change. Patch releases do not break backwards compatibility, while minor releases may include backwards-incompatible changes, so each minor step can carry its own breaking changes and extension impacts. Review the release notes for every minor version between your current release and the target, and check each extension against that target. The current release is CKAN 2.12.0, released August 26, 2026, with maintenance releases 2.11.6 and 2.10.11 the same day. Confirm the route with your extension list before choosing it.
How does DeployOpen scope a CKAN migration in writing?
DeployOpen agrees scope, deliverables and timelines in writing before work starts. For a CKAN Python 3 migration, that document usually covers an extension and customization inventory, a target version decision, the migration procedure run against copies of your portal, each extension rewrite or replacement as a separate item, a test plan with named sign-off owners, a cutover and rollback plan, and handover documentation. Ask that the scope list the environments, the systems in scope (Solr, PostgreSQL and the DataStore), what is excluded, and how changes are priced. The quote follows from that written scope, and DeployOpen does not publish a price list.
How DeployOpen scopes, delivers and supports a CKAN Python 3 migration
DeployOpen plans and delivers CKAN Python 3 migrations inside infrastructure you control, under a written scope agreed before work starts. Each engagement covers the portal, its extensions and the path onto a supported release, with documented steps your team can review and run.
How we scope
- We inventory the running CKAN version, Python 2 extensions, custom themes and the hosting setup before quoting.
- The written scope names which extensions will be ported, replaced or retired, and which CKAN release is the target.
- Fixed-scope agreements list deliverables and timelines, so your team knows what is included before work begins.
How we build
- We rebuild the portal in a separate environment first, with Python 3.10 or newer, PostgreSQL, Solr and Redis matching the target release.
- Extension work covers rewriting Python 2 code, replacing extensions that stopped supporting your target, and testing each change.
- We run the migration steps from the CKAN docs against a copy of your production data and record every deviation found.
How we hand over
- You receive a runbook covering the migration sequence, configuration changes, rollback points and verification checks.
- Test results show which datasets, users, DataStore resources and API calls were checked before cutover.
- Operating documentation explains the new Python 3 environment, search index rebuild steps and extension versions in use.
How we support
- Ongoing support, upgrades and continuous testing are available as retainers after the portal is live on Python 3.
- Retainer work can cover moving the portal onto later CKAN minor releases and applying patch releases in order.
- Ask any partner to confirm in writing who owns extension maintenance once the handover is complete.

