Self-hosted draw.io: diagrams without an account
Every homelab eventually reaches the documentation problem. You’ve got VMs, containers, VLANs, storage pools, and a handful of services that all depend on each other in ways that live entirely inside your head. That’s fine — until you take a week off, forget why something is wired the way it is, or want to hand a setup to someone else. At that point, a diagram is worth a thousand words of prose, and you need a tool that can draw it.
The obvious move is to open Lucidchart or Visio. Both work fine. But if you’re already running your own infrastructure, handing your network topology to a cloud service has a certain irony to it. Here’s the case for doing it yourself — and why draw.io is the right tool for most homelab shops.
What draw.io actually is
draw.io (now also marketed as diagrams.net) is a browser-based diagramming tool. You open it, drag shapes onto a canvas, connect them with arrows, and export the result as SVG, PNG, or its own XML format. It handles the full range of diagram types you’d care about in a technical context: network topologies, flowcharts, entity-relationship diagrams, rack elevations, swimlane charts, UML — the list is long.
What makes it unusual is that the software is fully open source. The hosted version at diagrams.net runs the same codebase, with no account wall between you and the tool. But you can also run it on your own hardware, which is the part we care about here.
The file format is XML, and it’s human-readable. That matters more than it sounds. It means you can generate diagrams programmatically, diff them in version control, and treat them like any other code artifact rather than a binary blob that only opens in one proprietary app.
The problem it actually solves
Here’s the thing about infrastructure documentation: it decays fast. You stand up a service, draw a quick diagram, and six months later the diagram describes a network that no longer exists. If updating the diagram is friction — logging into a cloud account, finding the file, editing it, re-exporting — the diagram gets skipped. It stays stale. Eventually you stop trusting it and stop looking at it.
The self-hosted version reduces that friction in a meaningful way. The tool lives at a URL on your internal network. It’s always there. No login required. You open it the same way you’d open any other internal service, make a change, and close it. The barrier to keeping things current is lower, so you actually do it.
There’s also a data argument. Infrastructure diagrams aren’t trade secrets, but they do describe your internal topology — what’s connected to what, how traffic flows, where your sensitive services sit. Keeping that on hardware you control rather than in a third-party cloud service is a reasonable call.
How draw.io compares to the alternatives
Let’s be honest about what you’re trading away and what you’re gaining.
Lucidchart is the professional default for a reason. The collaboration features are excellent — real-time co-editing, comments, org-chart integrations, Confluence and Google Drive plugins. If you’re in a team environment that already lives in Google Workspace, it’s genuinely hard to beat. The free tier exists but has meaningful limitations; meaningful use means a paid plan.
⚠️ Unverified: Lucidchart pricing tiers and specific free-tier limits are external/general knowledge and change frequently — check the current plans directly before making a purchasing decision.
Microsoft Visio is the enterprise standard, especially in Windows-heavy shops. It’s deep, it handles complex diagrams well, and it integrates tightly with Microsoft 365. It’s also expensive, desktop-first, and does not have a self-hosted option. If your homelab is already Microsoft-centric, Visio or the lighter Visio for the web might already be in your stack. For everyone else, it’s a lot of weight to carry.
Excalidraw is worth a mention because it solves a slightly different problem. It’s a whiteboard-first tool that produces hand-drawn-looking diagrams. The aesthetic is intentional — it signals “this is a sketch, not a contract.” That’s genuinely useful for early-stage planning where you don’t want people to mistake the diagram for a finished spec. The self-hosted version (excalidraw/excalidraw on Docker Hub) is straightforward to run. It’s not the right tool for polished network topology documentation, but for brainstorming sessions it’s excellent.
Mermaid takes a different approach entirely. Instead of a drag-and-drop canvas, you write diagrams as code using a simple text syntax. Flowcharts, sequence diagrams, Gantt charts, and ER diagrams all come out of Markdown-style blocks. GitHub renders Mermaid natively in READMEs, Notion supports it, and it integrates well with documentation-as-code workflows. The limitation is layout control — you describe the relationships, and Mermaid decides where to put the boxes. For complex network topologies with many nodes, the auto-layout can produce crowded output. Mermaid is a great complement to draw.io rather than a replacement: use it for flowcharts and sequence diagrams embedded in docs, and use draw.io when you need to control exactly where things go.
draw.io threads the needle between these options. It’s as capable as Visio for technical diagrams. It has more layout control than Mermaid. It’s more documentation-oriented than Excalidraw. And it runs entirely on your hardware.
How it fits into a homelab
The setup is Docker-based. Two containers do the work: the main draw.io application, and an export server that handles rendering diagrams to PNG and SVG. The main app runs on a straightforward port; the export server is internal and only the draw.io app talks to it. A Cloudflare tunnel or a reverse proxy puts it at a clean URL on your internal network, and optionally exposes it externally.
Resource requirements are light — a handful of virtual CPUs and a few gigabytes of RAM cover the workload comfortably. Draw.io is not a compute-intensive service. The VM or container it runs on is unlikely to ever be your bottleneck.
One configuration detail that trips people up: the DRAWIO_SERVER_URL environment variable. Draw.io needs to know its own public-facing URL so that features like “publish diagram and get an embed link” generate correct URLs. If you skip this, you’ll get links pointing to localhost that don’t work anywhere else. Set it to whatever URL your instance lives at and things work as expected.
The Notion embed angle
If your documentation lives in Notion, draw.io’s embed flow is worth highlighting specifically. You design a diagram, use File → Publish → Get Link to grab an embed URL, then paste it into a Notion page as an embed block. The result is a live, interactive iframe — readers can zoom and pan the diagram directly inside Notion without leaving the page. When you update the diagram, the embedded version updates automatically because it’s pulling from a live URL rather than a static export.
There’s also a draw.io for Notion browser extension that tightens this integration further, allowing you to create and edit diagrams directly within Notion without visiting the draw.io interface separately.
Diagrams-as-code
The XML format is the feature that separates draw.io from most drag-and-drop competitors in a technical context. When a diagram is XML, it can be generated by a script.
In practice, this means you can write a script that reads your infrastructure state — your Terraform configuration, your Ansible inventory, your VM list — and outputs a .drawio file that describes the current topology. The diagram isn’t something you maintain manually; it’s something you regenerate when the infrastructure changes. Check the file into your infrastructure repository, and the diagram history is your infrastructure history.
The workflow fits naturally into IaC pipelines. Your AI coding assistant, your CI system, or a simple Python script can emit .drawio XML. Draw.io’s import also accepts Mermaid syntax natively — you can paste Mermaid code directly into the diagram via Arrange → Insert → Mermaid, which gives you a drag-and-drop canvas to polish whatever the auto-layout produced.
Tools like TerraVision can generate draw.io diagrams directly from Terraform configurations.
⚠️ Unverified: TerraVision’s current feature set, output format support, and maintenance status are general/external knowledge — verify before building a pipeline around it.
Tools like ansible-playbook-grapher can generate Mermaid graphs from Ansible playbooks, which you can then import into draw.io for further refinement.
⚠️ Unverified: ansible-playbook-grapher’s current output formats and Mermaid support are general/external knowledge — check the project’s current documentation.
The point isn’t any specific tool. The point is that when diagrams are text files, they fit into the same toolchain as everything else in an IaC workflow. Version control, diffs, pull requests, automated generation — all of it applies.
Who should run this
If you have infrastructure documentation needs beyond a handful of hand-drawn sketches, and if you already have the habit of running containerized services on your homelab, draw.io is an easy addition. The resource footprint is negligible. The setup is well-documented. The payoff — having a real diagramming tool available at a URL on your internal network, always logged in, always ready — is immediate.
The case gets stronger if you’re already using Notion for runbooks, because the live embed workflow is genuinely useful. It’s also stronger if you’re doing IaC, because treating diagrams as code artifacts that live alongside your Terraform and Ansible is a meaningful workflow improvement.
The case is weaker if your documentation needs are minimal, or if you’re already paying for Microsoft 365 and Visio fits naturally into your workflow. There’s no prize for self-hosting things you don’t need.
Who should probably skip it
If you’re just starting out with self-hosting and still finding your footing, draw.io is not the service to start with. Get your monitoring, your backups, and your core services stable first. Documentation tools are useful infrastructure but not critical path infrastructure — they don’t need to be solved on day one.
If you have a team that needs real-time collaboration on diagrams, Lucidchart’s co-editing and comment features are meaningfully better than what a single-instance draw.io gives you out of the box. Self-hosted draw.io is excellent for solo use and works fine for async collaboration via shared files, but it’s not trying to be a Google Docs competitor.
The close
Documentation is the part of the homelab that most people defer indefinitely. The friction of the tooling is part of why — if the tool isn’t right there, ready to open, you find reasons to skip it. A self-hosted draw.io instance removes that friction by putting a capable diagramming tool at a permanent URL on your internal network, no account required, no subscription to renew.
The stencil libraries alone — server room racks, Cisco and Dell network icons, cloud service icons — make it worth the twenty minutes of setup if you’re drawing network topology. The XML format and diagram-as-code story make it genuinely interesting if you’re thinking about infrastructure documentation as a first-class artifact rather than an afterthought.
Most homelabs could use better documentation. This is a good place to start.
Comments
No comments yet — be the first.