Self-hosted Kroki and D2 diagrams in DiagramaHub
Version 0.4 renders PlantUML with Kroki on your own infrastructure, adds D2 as a new language, and refreshes the editor, dashboard and mobile views.
Until now, every PlantUML diagram you drew was sent to the public plantuml.com server to be turned into an image. It worked, but your architecture, your flows and your internal names left your instance. Version 0.4.0 changes that: rendering now goes through Kroki, self-hosted right next to the rest of DiagramaHub.
Kroki: your diagrams stay home
Kroki is a diagram rendering engine that runs as one more Docker service (yuzutech/kroki). We added it to all three of the project's Docker Compose configurations, so if you self-host there's nothing extra to install. You point to it with the KROKI_URL environment variable (default http://kroki:8000).
The routing rule is simple:
flowchart LR
A[Editor] --> B{Diagram type}
B -->|Mermaid| C[Rendered in your browser]
B -->|PlantUML or D2| D[DiagramaHub backend]
D --> E[Self-hosted Kroki]
E --> F[SVG]
Mermaid is still drawn in your browser. PlantUML and D2 go to your backend, which talks to your Kroki and returns an SVG. No public service ever sees the content.
There's also a new POST /api/v1/diagrams/render endpoint that takes source code and a diagram type and returns the SVG. It works without authentication so that shared diagrams render properly.
D2 joins as a third language
Next to Mermaid and PlantUML, you can now write diagrams in D2, a modern declarative language that reads almost like a list of relationships:
user: User
api: API
db: Database {
shape: cylinder
}
user -> api: HTTP request
api -> db: query
Support is complete from day one:
- Rendering through Kroki.
- Syntax highlighting in the editor.
- A picker with 19 themes (light, dark and special).
- Syntax validation.
- AI-powered fixes and AI chat support, with full D2 context in the prompts.
In 0.4.1 we fixed an important detail: the "Fix with AI" button failed on D2 and PlantUML because the corrected code contained nested braces that tripped up the response parser. We replaced it with a balanced-braces parser across all four clients (OpenAI, Claude, Gemini and DeepSeek), and OpenAI responses are now forced to valid JSON.
An editor that feels like your IDE
0.4.0 also ships a solid round of UX work:
- IDE-style code editor: dark theme, macOS-style title bar, a file tab with an error indicator, and a status bar showing errors, lines and diagram type.
- Project selector with search, so you can switch projects without leaving the editor.
- Redesigned diagram panel: a floating sidebar with search, quick actions, an active-diagram indicator and the folder hierarchy.
- New "create diagram" modal with a type selector (Mermaid, PlantUML, D2) and a description of each.
- Resizable description panel that remembers its width per diagram.
- Dashboard with a personal greeting and cards for projects, diagrams, last activity and current plan.
On top of that, every view now adapts to mobile and tablet, from the editor to your profile and the shared view.
Polish in 0.4.1
Beyond the "Fix with AI" fix, 0.4.1 gives the login page an animated background and a frosted-glass card, shows the email address your MFA code was sent to, and fully translates the share-diagram modal, with dates formatted for your language.
Try it
Create a D2 diagram on DiagramaHub Cloud or update your instance from the repository: Kroki already ships in the Docker Compose files. Every change is listed in the changelog.