
Deploy Kroki
Kroki 0.32 diagrams-as-a-service API with Mermaid companion service.
Just deployed
Just deployed
Deploy and Host Kroki on Railway
Kroki turns textual diagram descriptions into images through one HTTP API. It supports PlantUML, GraphViz, Mermaid, C4, D2, BlockDiag, Ditaa, Nomnoml, Structurizr, WaveDrom and many more formats, returning SVG, PNG or PDF, which makes it easy to render diagrams in docs, wikis, chat bots and CI pipelines.
About Hosting Kroki
This template deploys Kroki v0.32.1 with the Mermaid companion service, which Kroki calls over Railway's private network. The Kroki service has a public domain; the Mermaid renderer stays private. Kroki keeps no state and has no secrets, so like the public kroki.io service it is open to anyone who knows the URL, which is fine for rendering but worth keeping in mind for heavy traffic. The default safe mode blocks file includes and network access from diagram sources. Memory use is moderate; the Hobby plan is enough for normal use.
Common Use Cases
- Rendering PlantUML, Mermaid and GraphViz diagrams in docs sites and wikis
- Diagram images in README badges, chat bots and pull request comments
- A private replacement for kroki.io inside your own infrastructure
Dependencies for Kroki Hosting
yuzutech/kroki:0.32.1(official image)yuzutech/kroki-mermaid:0.32.1companion (private)
Deployment Dependencies
Implementation Details
| Service | Image | Networking | Storage |
|---|---|---|---|
| kroki | yuzutech/kroki:0.32.1 | public domain on 8000 | none |
| mermaid | yuzutech/kroki-mermaid:0.32.1 | private only, port 8002 | none |
curl -X POST "$KROKI_URL/graphviz/svg" -H "Content-Type: text/plain" --data 'digraph G { a -> b }'
curl -X POST "$KROKI_URL/mermaid/svg" -H "Content-Type: text/plain" --data 'graph TD; A-->B'
GET requests with a deflate + base64url encoded source also work, for use in Markdown image links.
Notes:
- Add other companions (BPMN, Excalidraw, diagrams.net) as extra services with the matching
yuzutech/kroki-*image andKROKI__HOSTvariable. - Keep
KROKI_SAFE_MODEat its default (secure) on a public instance.
This is a community-maintained deployment package and does not imply affiliation with or endorsement by the Kroki project or its maintainers.
Why Deploy Kroki on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Kroki on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content

