Self-Hosted Kroki

By default, this extension sends diagrams to kroki.io and receives images back.

You may prefer to use your own server for any of the following reasons:

  • Network restrictions — Kroki is not accessible behind your corporate firewall

  • Network latency — you are far from the European public instance

  • Privacy — you do not want to send diagram source to a remote server

Configuration

Set the kroki-server-url attribute to point to your own server. Add this to the top of your document (after the title):

:kroki-server-url: http://my-server-url:port

If you have set up a self-managed server with Docker following the official instructions, use:

:kroki-server-url: http://localhost:8080

The http:// or https:// prefix is required (the default Docker image uses http).

You can also set this attribute via the JavaScript API:

asciidoctor.convertFile('file.adoc', {
  safe: 'safe',
  attributes: { 'kroki-server-url': 'http://my-server-url:port' }
})