Install Kroki

To convert plain text diagrams to images with Kroki, you first need to install the gateway server.

We recommend to install Kroki using Docker, especially if you don’t want to manually install diagrams libraries.

However, you can also install each diagrams libraries that you want to use and run the gateway server as a standalone executable jar. Consult the manual install page to find out how.

Assumptions:

On this page, you’ll learn:

  • How to run Kroki

  • How to configure Kroki

Using Docker

docker run yuzutech/kroki

yuzutech/kroki image contains the following diagrams libraries out-of-the-box:

In other words, the following endpoints will be available:

/c4plantuml
/ditaa
/erd
/graphviz
/dot
/nomnoml
/plantuml
/svgbob
/umlet

Companion Containers

If you want to use BlockDiag, ActDiag, NwDiag, SeqDiag or Mermaid, then you will also need to start companion containers:

yuzutech/kroki-blockdiag

Provides block, sequence, activity and network diagrams for Kroki using respectively BlockDiag, SeqDiag, ActDiag and NwDiag libraries.

yuzutech/kroki-mermaid

Provides flowchart, sequence and Gantt diagrams for Kroki using Mermaid.

You can use docker-compose to run multiple containers. Here’s an example where we start all the containers:

docker-compose.yml
version: "3"
services:
 core:
   image: yuzutech/kroki
   environment:
     - KROKI_BLOCKDIAG_HOST=blockdiag
     - KROKI_MERMAID_HOST=mermaid
   ports:
     - "8000:8000"
 blockdiag:
   image: yuzutech/kroki-blockdiag
   ports:
     - "8001:8001"
 mermaid:
   image: yuzutech/kroki-mermaid
   ports:
     - "8002:8002"
docker-compose up -d