Draw.io is on the Awesome Selfhosted GitHub list. I haven't used it personally, but there is a working instance on the website if you want to try before installing or spinning up a container.
Self-Hosted Main
A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.
For Example
- Service: Dropbox - Alternative: Nextcloud
- Service: Google Reader - Alternative: Tiny Tiny RSS
- Service: Blogger - Alternative: WordPress
We welcome posts that include suggestions for good self-hosted alternatives to popular online services, how they are better, or how they give back control of your data. Also include hints and tips for less technical readers.
Useful Lists
- Awesome-Selfhosted List of Software
- Awesome-Sysadmin List of Software
I'm not sure if I understood your question correctly, but the
describing the layout and it producing the image output
sounds to me like you would like to have a 'text to diagram' tool like
- D2
- Mermaid
- GraphViz
- PlantUML
To my knowledge these are the most common known ones and https://text-to-diagram.com/ gives you nice comparison between them.
You can also find more alternatives at https://xosh.org/text-to-diagram/