Maybe mermaid fits your use case?
https://mermaid.js.org/
There's kroki as well, which includes Mermaid, Excalidraw, GraphViz, PlantUML, etc.
See also Inkscape.
Doesn't quite fit OPs want of self hosted, but still very good.
There is also Asymptote and tikz for more technical stuff.