Updating Kantree

Each Kantree version is fully contained within itself and can be re-installed almost fully using the ./platform init command. You will have to make sure that your license file and configuration file are copied from previous versions.

Important: If you are storing your uploaded files in a folder located under the Kantree folder, you will also need to move that. Our recommendation is to have your upload folder out of the Kantree folder.


Kantree is very easy to update:


The changelog is available online and inside the archive.

Recommendations for programmatically updating Kantree

For a faster and automated update process, we recommend the following architecture.

First, let’s consider the following folder hierarchy:

 |-- current -> versions/8.3.5
 |-- versions
 |    |-- 8.3.4
 |    |-- 8.3.5
 |-- uploads
 |-- venv

(Note: we are using /opt/kantree as the base but you can install Kantree anywhere)

Here we are storing each Kantree releases under the versions folder. The current folder is a symlink towards the current version.

We are keeping the uploads and venv folders outside of the actual installation path to avoid moving/re-installing them with each release. This means you will need to make sure your configuration file properly sets the upload folder (in our case /opt/kantree/uploads).

The location of the venv path can be overrided using the KANTREE_VENV_PATH environment variable.

Important: the Python virtualenv folder cannot be moved or it would break it (this is a weakness of virtualenvs…).

You will still need to copy the license and config.yml files into the new release folder for each release. You can store them in /opt/kantree and copy them from there everytime.

Here is an example bash script that downloads and installs the latest version of Kantree assuming the described structure:

if [ -z "$VERSION" ]; then
    VERSION=$(curl -s https://enterprise.kantree.io/releases/current-version)
    echo "Fetched latest version from Kantree server: $VERSION"
if [ -z "$VERSION" ]; then
    echo "No version number provided: provide a version number as script argument or check your internet connection"
    exit 1
if [ -e current ]; then
    if [ "$(cat current/VERSION)" == "$VERSION" ]; then
        echo "Current version $VERSION is already the latest"
        exit 0
echo "Updating to $VERSION"
if [ ! -e versions/$VERSION ]; then
    wget https://s3.eu-central-1.amazonaws.com/kantree-enterprise/kantree-enterprise-$VERSION.tar.bz2
    if [ $? -ne 0 ]; then
        echo "Failed downloading archive"
        exit 1
    tar xjf kantree-enterprise-$VERSION.tar.bz2 -C /tmp
    mv /tmp/kantree versions/$VERSION
    echo "Version is already present in versions folder, keeping current folder"
cp license config.yml versions/$VERSION
cd versions/$VERSION
sed -i "2iexport KANTREE_VENV_PATH=/opt/kantree/venv" platform # we add a line with the venv path inside the platform script so we do not need to worry about env vars
./platform init
cd ../..
if [ -e current ]; then
    rm current
ln -s versions/$VERSION current
# add commands to restart processes

Save it as /opt/kantree/update.sh, give it execution right, and run it regularly. It will check for new versions and download them when available. Note that this script does not take care of restarting processes so you will need to modify it to do so.

Releases API endpoints

The following HTTP endpoints can be used to retreive releases information:

Migrating from version before 8.0

The backend part of Kantree 8.0 has been through a big rewrite. While the platform script helping you to manage your instance has not changed, the configuration file location and format has completely changed.

Here are the pain points when you are updating from a previous version:

The most important settings to take into account:

A basic configuration now looks like this:

secret_key: "XXX..."
server_name: localhost:5000
server_secured: false
database_uri: "postgresql://..."
redis_uri: "redis://localhost"
push_server_url: "http://localhost:4000"
upload_dir: "uploads"
smtp_server: localhost
smtp_port: 25
smtp_username: username
smtp_password: password