Self-host next-ai-draw-io
v0.5.1AI chat that draws and edits draw.io diagrams
docker run -d -p 3000:3000 -e AI_PROVIDER=openai -e AI_MODEL=gpt-4o -e OPENAI_API_KEY=your_api_key ghcr.io/dayuanjiang/next-ai-draw-io:latest- Stars
- 36 964
- Port
- 3000 (Web UI; docker run maps it as 3000:3000)
ghcr.io/dayuanjiang/next-ai-draw-ioWhat is next-ai-draw-io?
Next AI Draw.io is a Next.js web app that puts a chat panel beside a real draw.io canvas: type what you want, and the generated XML arrives as a regular, fully hand-editable diagram. Renaming, dragging, restyling and extra pages behave like any other file of that kind. AI passes stream in with the freshly touched shapes marked, an edit can be confined to a current selection, and each pass is stored as a thumbnail you can diff against the canvas, roll back or undo with one Ctrl+Z. The result can be downloaded in the native .drawio format or rendered to PNG, SVG and .drawio.svg.
Source material can be visualised too: a screenshot or a hand sketch gets redrawn by the model, while text uploads such as PDFs, Markdown or code turn into structure. Cloud icon sets (AWS, Azure, GCP, Kubernetes) ship built in, and connectors may carry a flowing pulse animation.
Bring your own model: the app talks to 25 providers and offers an OpenAI-compatible option for any other endpoint, with keys typed into browser settings held locally instead of stored server-side; alternatively the operator publishes shared models so users need no key. Deployment is a single container on port 3000 (ghcr image or the repo compose file), a plain npm checkout, installers for Windows/macOS/Linux, or an MCP server so coding agents drive the same canvas. Because draw.io itself is bundled as static files, air-gapped and intranet setups work. An optional /admin area, guarded by ADMIN_PASSWORD, manages models, access codes, toggles, Langfuse tracing and per-IP daily quotas, the last one needing a DynamoDB table. Releases are still 0.x, and the free hosted demo caps usage until you supply a key.
next-ai-draw-io alternatives
draw.iodraw.io is a JavaScript, client-side editor for general diagramming.Comparedraw.io with next-ai-draw-io
NextChat✨ Zero-config AI chat assistant. No API key needed — sign up and instantly chat with GPT-5, Claude 4, Gemini 2.5, DeepSeek & 100+ top models. Pay-as-you-go saves you more. Available on Web, iOS, macOS, Android, Linux, Windows.CompareNextChat with next-ai-draw-io
NextClawSelf-hosted AI assistant you run on your hardware. Links to many model providers and chat platforms, preserves context, runs background jobs with an inbox.CompareNextClaw with next-ai-draw-io
FossFLOWFossFLOW is a self-hosted, open-source PWA for creating isometric infrastructure diagrams with drag-and-drop editing, connector routing, and JSON import/export.CompareFossFLOW with next-ai-draw-io
OnlookOpen-source, self-hosted visual code editor: build and style Next.js + Tailwind apps in a Figma-like canvas with AI, editing real code directly.CompareOnlook with next-ai-draw-io
Dim0Self-hosted infinite canvas combining rich notes, whiteboarding, and a board-aware AI agent with real-time multiplayer collaboration.CompareDim0 with next-ai-draw-io
sdnextSelf-hosted, open-source Stable Diffusion web UI to generate, caption, upscale and edit images and video, with many GPU backends and model quantization for low VRAM.Comparesdnext with next-ai-draw-io
MagicAn open-source, self-hosted app builder where you describe an app in ordinary English and get its database, API and frontend, plus every endpoint exposed as an MCP tool.CompareMagic with next-ai-draw-io
Should you self-host next-ai-draw-io?
next-ai-draw-io scores 81/100 on selfhost.directory (how scoring works) and ranks #1 of 12 in Diagramming. It has 36 964 GitHub stars, +788 in the last 30 days.
It shipped 12 stable releases in the past year. The latest, v0.5.1, came out on 31 October 2026. New versions land roughly every 2 weeks.
Setup is easy: most people get it running in one sitting. An official Docker image is available. It is Apache-2.0-licensed and written mostly in Typescript.
Its closest alternative on selfhost.directory is drawdb (80/100, 40 327 stars). next-ai-draw-io scores higher overall. See next-ai-draw-io vs drawdb side by side.
Features
- Admin PanelEnabled only when ADMIN_PASSWORD is set; read-only on serverless platforms.
- AI diagram generation from natural language
- AI editing by chat
- Animated Connectors
- Bring-your-own API key
- Cloud icon libraries
- Diagram export
- Image and document to diagram
- MCP server for AI agents
- Multiple model providers
- Offline / intranet operation
- Per-IP daily usage quotasDisabled unless DYNAMODB_QUOTA_TABLE is set.
- Reasoning display
- Selection-scoped AI editing
- Version history and undo
next-ai-draw-io README
Draw and edit draw.io diagrams by chatting with an AI.
Live Demo · Docs · Gallery · Desktop App · MCP Server
promo-web.mp4
Describe a diagram in a sentence and the AI draws it on a real draw.io canvas. Edit it by hand like any draw.io file, or select a few shapes and tell the AI what to change. Every AI change is a version you can compare, restore or undo, and the result exports as .drawio, .png or .svg.
Available as a web app, a desktop app for Windows, macOS and Linux, and an MCP server for AI agents such as Claude Code, Cursor and VS Code.
FAQ
Why do I get "No image provided" after uploading an image?
The chosen model has no vision capability; switch to a vision-capable model (names containing vision or vl) and update to at least v0.4.9.
Why does my self-hosted model only produce thinking text and no diagram?
Small local models often fail at the strict tool-calling format, so use a larger model (32B+ recommended) and enable tool calling in the server, e.g. vLLM with --enable-auto-tool-choice.
How do I deploy on an intranet where embed.diagrams.net is unreachable?
Current images bundle their own copy of draw.io served from /drawio, so the browser no longer needs the external domain; if you still see the error, the image was built with the old build-time default and should be rebuilt.
Why does PDF export do nothing in the web version?
The embedded Draw.io cannot export PDF directly because it depends on an external conversion service that does not work inside an iframe; export a PNG and print that to PDF instead.
More in Diagramming
The-One-FileSelf-hosted offline-first network topology editor in a single HTML file with optional Docker collaboration.
astradrawAstraDraw is a self-hosted, open-source whiteboard forked from Excalidraw with workspaces, role-based access, real-time collaboration, and video walkthroughs.
ChartDBOpen-source database diagram editor that visualizes schemas with a single query, supports major databases, exports SQL, and self-hosts via Docker.
DigimindmapOpen-source, self-hosted mind-mapping web app by La Digitale: shared maps guarded by a secret question, item notes, PNG and .dgm export, QR and embed sharing.
DigiwordsOpen-source, self-hosted word cloud maker from La Digitale for in-person and remote classes: per-word weight, colour and font, PNG export, QR link, view counter.
drawdbSelf-hosted, open-source tool for drawing database schemas as ER diagrams; it imports DDL, exports DBML plus SQL in seven dialects, and needs no account.
draw.iodraw.io is a JavaScript, client-side editor for general diagramming.
DrawnixSelf-hosted, open-source all-in-one whiteboard with mind maps, flowcharts and freehand drawing, built on the Plait framework.
ExcaliDashExcaliDash is a self-hosted, open-source Excalidraw workspace adding collections, real-time collaboration, version history, and backups with local or OIDC auth.
excalidrawExcalidraw is a self-hosted, open-source virtual whiteboard for hand-drawn diagrams with infinite canvas, dark mode, and PWA support.
excalidraw-collaborationSelf-hosted Excalidraw stack for live collaborative drawing: an open-source Docker Compose setup with frontend, scene storage and a Go room server.
flowchart.funEasily generate flowcharts and diagrams from text ⿻
0 comments