Diagrams.net Server
Self-hosted diagram editor with collaboration.
Overview
Diagrams.net (formerly known as draw.io) is a powerful web-based diagramming application originally developed by JGraph in 2011. Built as a free alternative to Microsoft Visio, it provides comprehensive tools for creating flowcharts, network diagrams, UML models, organizational charts, and technical documentation. The application runs entirely in the browser using HTML5 and JavaScript, with no plugins required, making it accessible across all platforms and devices.
This Docker deployment creates a self-hosted instance of diagrams.net server using the official JGraph image. The containerized solution eliminates dependency on the public draw.io service, giving organizations complete control over their diagramming infrastructure. The server supports real-time collaborative editing, allowing multiple users to work simultaneously on the same diagram with live cursor tracking and change synchronization. SSL encryption is built-in through the included HTTPS endpoint, ensuring secure diagram creation and sharing within your network.
This configuration is ideal for enterprises requiring data sovereignty, teams working with sensitive technical documentation, and organizations needing integration with existing authentication systems. Unlike the cloud-hosted version, this self-hosted approach ensures all diagram data remains within your infrastructure while maintaining the full feature set of the popular diagramming tool. Development teams, system architects, and technical writers will particularly benefit from having a dedicated diagrams.net instance that can integrate with internal wikis, documentation systems, and project management tools.
Key Features
- Real-time collaborative editing with live cursor tracking and instant synchronization across multiple users
- Built-in SSL/TLS encryption with automatic certificate generation for secure diagram access
- Native integration capabilities with Confluence, Jira, and other Atlassian products through REST APIs
- Extensive shape libraries including AWS, Azure, GCP, Cisco, and network topology icons
- Multiple export formats including PNG, JPEG, SVG, PDF, VSDX, and XML for maximum compatibility
- Plugin architecture supporting custom shape libraries and third-party integrations
- Version control integration with GitHub, GitLab, and other Git repositories for diagram versioning
- Offline editing capabilities with automatic synchronization when connection is restored
Common Use Cases
- 1Enterprise architecture teams documenting system designs and infrastructure topology with sensitive data requirements
- 2Software development teams creating UML diagrams, database schemas, and API documentation within private networks
- 3Network administrators mapping network topologies and documenting infrastructure changes for internal compliance
- 4Educational institutions providing students with unrestricted access to professional diagramming tools
- 5Healthcare organizations creating process flows and organizational charts while maintaining HIPAA compliance
- 6Government agencies requiring air-gapped diagramming solutions for classified or sensitive documentation
- 7Manufacturing companies documenting industrial processes and equipment layouts for internal quality systems
Prerequisites
- Docker Engine 20.10+ and Docker Compose V2 for container orchestration support
- Minimum 512MB RAM allocated to the container for optimal performance with multiple concurrent users
- Available port 8443 for HTTPS access, or alternative port mapping configuration
- Valid SSL certificate or acceptance of self-signed certificates for HTTPS functionality
- Basic understanding of certificate management and HTTPS configuration for production deployments
- Network access configuration if integrating with existing LDAP, Active Directory, or SSO systems
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 diagrams: 3 image: jgraph/drawio:latest4 container_name: diagrams-net5 restart: unless-stopped6 environment: 7 PUBLIC_DNS: localhost8 ORGANISATION_UNIT: IT9 ORGANISATION: MyOrg10 CITY: City11 STATE: State12 COUNTRY: US13 ports: 14 - "8443:8443".env Template
.env
1# SSL certificates generated automaticallyUsage Notes
- 1Access at https://localhost:8443
- 2Real-time collaboration
- 3Confluence/Jira integration
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 diagrams:5 image: jgraph/drawio:latest6 container_name: diagrams-net7 restart: unless-stopped8 environment:9 PUBLIC_DNS: localhost10 ORGANISATION_UNIT: IT11 ORGANISATION: MyOrg12 CITY: City13 STATE: State14 COUNTRY: US15 ports:16 - "8443:8443"17EOF1819# 2. Create the .env file20cat > .env << 'EOF'21# SSL certificates generated automatically22EOF2324# 3. Start the services25docker compose up -d2627# 4. View logs28docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/diagrams-net/run | bashTroubleshooting
- Certificate warnings in browser: Accept the self-signed certificate or configure custom SSL certificates through volume mounts
- Container fails to start with port binding errors: Ensure port 8443 is not in use by other services or modify the port mapping
- Diagrams fail to save or load: Check container logs for file system permissions and verify persistent volume mounting
- Collaboration features not working: Verify WebSocket connections are not blocked by firewalls or reverse proxies
- Integration with Confluence fails: Confirm the PUBLIC_DNS environment variable matches your actual server hostname
- Performance issues with large diagrams: Increase container memory allocation beyond the default 512MB limit
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download