How to install CKAN 2.9.0 using Docker Compose

docker Aug 18, 2020

This guide will show you how to install CKAN platform using docker-compose .

What reference should I choose?

Does exist many different guides available on internet about CKAN installation and even the official documentation does offers options like "from package", "from source", and "with Docker Compose".

You can use as reference the original documentation for docker-compose, but I didn't have a good experience. The application fail without useful log information. But searching on internet I found a project from Open Knowledge Foundation with contributions made by CKAN core developers:

Docker images and Docker Compose setup for CKAN. Contribute to okfn/docker-ckan development by creating an account on GitHub.

Before start, it's important check the repository's Things will change over time and you'll need to make some changes to setup your environment.


You will need to install the following packages:

  • git
  • docker
  • docker-compose

Considering the you're using Ubuntu 18.04 or Ubuntu 20.04, run the following lines:

# Update your packages
sudo apt update

# Install packages
sudo apt install -y git docker-compose

# Add your user to the "docker" group
sudo usermod -aG docker <myUser>

# Restart your system
sudo shutdown -rf 0

Clone the repo and configure

Now that you have everything that you need installed on your system, clone the repository and create you settings file .env.

# Go to the dir where you'll put the files
mkdir ~/projects
cd ~/projects

# Clone the repo
git clone
cd docker-ckan

# Copy config file
cp .env.example .env

# Edit your ".env"
nano .env

You should notice that this file has a lot of options. You need to change those settings to your environment needs.

Do not use default settings on production!

Example of how to setup CKAN to run locally over port 5000:

Build and start CKAN

With everything setting up, start the environment with docker-compose:

# Run docker-compose
#   -d      : run containers in background
#   --build : build container images before start
docker-compose -d --build

You can check the CKAN logs:

# Check CKAN logs
# (press Ctrl+C to exit)
docker logs -f docker-ckan_ckan

When the initialization is finished, check the URL: http://localhost:5000/


Now you have your CKAN platform running. For production environment is important that you know how Docker works and how to setup your own Container Registry.

For everything that you'll need, here is some tips:

KodeKloud <en>: Docker and Network lessons

Learn DevOps online from experts with hands-on training on different DevOps tools and become a DevOps engineer from beginner to expert.

LinuxTips <pt-BR>: Docker and Linux lessons

Bem-vindo ao Canal LinuxTips! Toda semana um novo vídeo, sempre com dicas interessantes sobre Linux e com uma abordagem leve e descontraída.



Luiz Felipe F M Costa

I am a problem solver who loves automation tools, networking, games, and coffee. I am also an active contributor to opensource projects on GitHub.

Great! You've successfully subscribed.
Great! Next, complete checkout for full access.
Welcome back! You've successfully signed in.
Success! Your account is fully activated, you now have access to all content.