This guide provides a step-by-step process for setting up and deploying a CKAN instance, an open-source data management system that simplifies publishing, sharing, and accessing data. The setup instructions are geared towards a Linux-based server, such as Ubuntu, and cover everything from installation to configuration and deployment, utilizing Docker and following best practices.
Before starting the installation, make sure you have the following:
This guide supports the automatic installation of CKAN 2.11 using the install-from-package.sh
script, tested on Ubuntu 22.04 LTS.
Set Environment Variables:
.env
file in the root directory with the following parameters:
CKAN_DB_PASSWORD=
CKAN_SITE_URL=
CKAN_SYSADMIN_NAME=
Make the Script Executable:
chmod +x install-from-package.sh
Run the Installation Script:
./install-from-package.sh
Upon successful installation, the process will automatically:
Logs: Installation logs are saved to /var/log/ckan/install.log
. If any issues arise, review this log for details. In case of failure, the script will perform cleanup, stopping services, removing partial installations, and deleting the Solr container. For script details, refer to install-from-package.sh
.
CKAN extensions can be installed after the core installation is complete to add additional features and enhance functionality. Use the install-extensions.sh
script for a streamlined setup. Before installing the extensions, log into the CKAN sysadmin to generate an API key which would be used by some of the extensions for authentification.
Update the Environment Variables:
.env
file:
API_KEY=
CKAN_SMTP_SERVER=
CKAN_SMTP_STARTTLS=
CKAN_SMTP_USER=
CKAN_SMTP_PASSWORD=
CKAN_SMTP_MAIL_FROM=
Make the Script Executable:
chmod +x install-extensions.sh
Run the Extension Installation Script:
./install-extensions.sh
This script will:
Logs: Check /var/log/ckan/extensions.log
for the installation log. If an issue arises, the script will halt, perform cleanup, and stop all services.
/var/log/ckan/
for more details on failures..env
file for required variable formatting and values.For more troubleshooting tips, consult CKANβs documentation.