selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

mermaid-live-editor logo

Self-host mermaid-live-editor

v12.2.0

Real-time text-to-diagram editor for Mermaid charts

ReleaseOpen SourceMIT
docker run --platform linux/amd64 --publish 8000:8080 ghcr.io/mermaid-js/mermaid-live-editor
Updated4 months ago
LanguageTypescript
Setup difficultyEasy
Stars
6 899
Port
8080 (Port the published container listens on for the web UI (map with --publish 8000:8080 or 8080:8080).)
Docker
ghcr.io/mermaid-js/mermaid-live-editor

What is mermaid-live-editor?

Mermaid Live Editor is a web app for writing, previewing and sharing diagrams described in the Mermaid markdown-like syntax. It renders flowcharts, sequence diagrams, gantt charts and dozens of other diagram types in real time as you type, with separate code and config panes, a large library of sample diagrams, and export of the result as SVG (PNG and SVG links are provided through a configurable renderer service). Diagrams can be shared as a viewer link or as an editor link so others can tweak them and send back a new version; optional links connect the app to Mermaid Chart. It is built with SvelteKit and Monaco. To self-host it, run the published image from ghcr.io, or build the image yourself: customization (renderer service, a Kroki instance, Plausible analytics, Mermaid Chart promotion) happens through build arguments, since the published image's environment variables cannot be overridden at runtime. The upstream mermaid.ink and kroki.io renderers are external services that the default build sends data to, and the free hosted instance at mermaid.live carries promotional links to the paid Mermaid Chart product, which is disabled in self-built images unless you opt in.

mermaid-live-editor alternatives

All self-hosted alternatives to Microsoft Visio →

Should you self-host mermaid-live-editor?

mermaid-live-editor scores 67/100 on selfhost.directory (how scoring works) and ranks #5 of 12 in Diagramming. It has 6 899 GitHub stars, +52 in the last 30 days.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is MIT-licensed and written mostly in Typescript.

Its closest alternative on selfhost.directory is drawdb (80/100, 40 279 stars). It scores higher overall, so compare the two before you pick. See mermaid-live-editor vs drawdb side by side.

Features

  • Diagram configuration editor
  • Kroki link
  • Many diagram types
  • Mermaid Chart integrationOff by default; enabled via the MERMAID_IS_ENABLED_MERMAID_CHART_LINKS build argument and points to the commercial mermaid.ai service.
  • PNG and SVG links via renderer service
  • Real-time diagram preview
  • Shareable edit link
  • Shareable viewer link
  • SVG export

mermaid-live-editor README

Join our Discord! Netlify Status

Mermaid Live Editor

Edit, preview and share mermaid charts/diagrams.

Features

  • Edit and preview flowcharts, sequence diagrams, gantt diagrams in real time.
  • Save the result as a svg
  • Get a link to a viewer of the diagram so that you can share it with others.
  • Get a link to edit the diagram so that someone else can tweak it and send a new link back

How to install mermaid-live-editor

Install mermaid-live-editor with Docker

docker run --platform linux/amd64 --publish 8000:8080 ghcr.io/mermaid-js/mermaid-live-editor

The published image is built with default environment variables that cannot be overridden at runtime; build the image yourself to customize.

How to configure mermaid-live-editor

  • MERMAID_RENDERER_URLhttps://mermaid.inkBuild argument: URL of the rendering service that generates the PNG and SVG links under Actions; set to empty string to disable them.
  • MERMAID_KROKI_RENDERER_URLhttps://kroki.ioBuild argument: URL of your Kroki instance for the Kroki link under Actions; set to empty string to disable the link.
  • MERMAID_ANALYTICS_URLBuild argument: URL of your Plausible instance for analytics; empty disables analytics.
  • MERMAID_DOMAINBuild argument: your domain, used together with MERMAID_ANALYTICS_URL when configuring analytics.
  • MERMAID_IS_ENABLED_MERMAID_CHART_LINKSBuild argument: set to true to enable the save-to-Mermaid-Chart button and the promotional banner; empty disables them.

    values: true | empty

More in Diagramming

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…