Skip to content

Getting Started with Knora

Running Knora locally or on a server requires Docker, which can be freely downloaded. Please follow the instructions for installing Docker Desktop.

Additional software:

These can be easily installed on macOS using Homebrew:

$ brew install git
$ brew install expect
$ brew install sbt

To install Adoptopenjdk Java 11 with Homebrew:

$ brew tap AdoptOpenJDK/openjdk
$ brew cask install AdoptOpenJDK/openjdk/adoptopenjdk11

To pin the version of Java, please add this environment variable to you startup script (bashrc, etc.):

export JAVA_HOME=`/usr/libexec/java_home -v 11`

Choosing a Triplestore

Knora requires a standards-compliant RDF triplestore. A number of triplestore implementations are available, including free software as well as proprietary options.

Knora is designed to work with any standards-compliant triplestore. It is primarily tested with Apache Jena Fuseki, an open source triplestore.

Built-in support and configuration for a high-performance, proprietary triplestore Ontotext GraphDB is provided but unmaintained (GraphDB must be licensed separately by the user). Other triplestores are planned.

Running the Knora-Stack

Use git to clone the Knora repository from Github.

The following environment variables are optional:

  • KNORA_DB_HOME: sets the path to the folder where the triplestore will store the database files
  • KNORA_DB_IMPORT: sets the path to the import directory accessible from inside the docker image
$ export KNORA_DB_IMPORT=/path/to/some/folder
$ export KNORA_DB_HOME=/path/to/some/other_folder

Then from inside the cloned Knora-API repository folder, run:

$ make stack-up

Creating Repositories and Loading Test Data

To create a test repository called knora-test and load test data, run:

$ make init-db-test

The scripts called by make can be found under webapi/scripts. You can create your own scripts based on these scripts, to create new repositories and optionally to load existing Knora-compliant RDF data into them.

If you need to reload the test data, you need to stop and delete the running Apache Fuseki instance. Make sure you don't delete important data. To stop the instance and delete the repository, run the following command:

$ make stack-down-delete-volumes

after which you can start the stack again with make stack-up, recreate the repository and load the data with make init-db-test.