Self-hosted draw.io for Diagrams¶
The Diagrams plugin does not ship draw.io; it loads it. The editor runs in an iframe served by
draw.io, and the read-only viewer fetches its stencils, shapes and math typesetting from draw.io as
well. By default both use the public https://embed.diagrams.net, so the user's browser needs
internet access (the Easy8 server does not).
If your installation has restricted or no internet access, run the official draw.io container inside
your network and point Easy8 at it with the EASY_DRAWIO_URL environment variable.
Configuration¶
- Unset (the default): the public draw.io is used. Existing installations need no action.
- Set: the editor and the viewer load everything from that address, and every draw.io cloud integration (Google Drive, OneDrive, GitHub, GitLab, telemetry, PlantUML, converters) is switched off, so nothing leaves the network.
The address must be reachable from the user's browser, not from the Easy8 server. A value that
only resolves inside the Docker network (http://drawio:8080) will not work. Publish the container
under a hostname the browser can reach, ideally over HTTPS if Easy8 itself runs on HTTPS.
Restart the application after changing the variable.
Running the container¶
The official image is jgraph/drawio (source). It serves
the whole draw.io application at the root path on port 8080 (8443 for HTTPS).
Quick check on a workstation:
As a compose service alongside Easy8:
Then set EASY_DRAWIO_URL to the public address of that service and restart app and sidekiq.
To upgrade draw.io, pull a newer image.
What the setting covers¶
| Item | Loaded from |
|---|---|
| Editor iframe | <EASY_DRAWIO_URL>/?embed=1 |
| Stencils, shapes, styles, images, templates, resources, mxGraph assets | <EASY_DRAWIO_URL>/ |
| MathJax used to render LaTeX inside diagrams | <EASY_DRAWIO_URL>/math4/es5 |
| Google Drive / OneDrive / GitHub / GitLab / telemetry / converters | disabled |
Diagram data itself is always stored in Easy8 (diagrams table plus a PNG attachment) and is never
sent to draw.io. That is true with or without this setting.
Verifying¶
- Open a diagram and check the browser's network tab: every request should go to Easy8 or to
EASY_DRAWIO_URL, and none todiagrams.netordraw.io. - Edit and save a diagram, then reopen it. The change must survive the round-trip.
- Open a diagram preview (the modal from the diagram list, or a wiki
include_diagrammacro) and confirm it renders.