Skip to main content

How to Self-Host Excalidraw: Collaborative Virtual Whiteboard 2026

·OSSAlt Team
excalidrawwhiteboardcollaborationself-hostingdockerdesign2026

TL;DR

Excalidraw (MIT, ~85K GitHub stars, TypeScript) is a virtual whiteboard with a distinctive hand-drawn sketch aesthetic. Diagrams, wireframes, flowcharts, architecture sketches — all with real-time collaboration and end-to-end encryption. Miro charges $8/member/month; FigJam charges $3/editor/month. Self-hosted Excalidraw gives unlimited boards and collaborators for free.

Key Takeaways

  • Excalidraw: MIT, ~85K stars, TypeScript — most popular open source whiteboard
  • Hand-drawn style: Distinctive sketch aesthetic that makes diagrams feel informal and approachable
  • Real-time collaboration: Share a link → anyone can draw simultaneously with live cursors
  • End-to-end encryption: Room data encrypted in the browser — server can't read your drawings
  • Libraries: Thousands of pre-built shapes — AWS architecture, flowcharts, UI wireframes, icons
  • Export: PNG, SVG, clipboard — embed diagrams in docs, PRs, and presentations

Excalidraw vs Miro vs FigJam vs draw.io

FeatureExcalidrawMiroFigJamdraw.io
PriceFree (self-host)$8/member/mo$3/editor/moFree
StyleHand-drawnCleanHand-drawnTechnical
Real-time collabYes (E2E encrypted)YesYesLimited
Self-hostableYesNoNoYes
Shape librariesCommunityExtensiveFigmaBuilt-in
OfflineYes (.excalidraw files)NoNoYes
Export formatsPNG, SVG, JSONPNG, PDFPNG, PDFPNG, SVG, XML

Part 1: Docker Setup (Excalidraw + Collaboration Server)

For the full self-hosted experience with real-time collaboration, you need two components:

  1. Excalidraw — the web app (frontend)
  2. Excalidraw Room — the collaboration server (WebSocket backend)
# docker-compose.yml
services:
  excalidraw:
    image: excalidraw/excalidraw:latest
    container_name: excalidraw
    restart: unless-stopped
    ports:
      - "3000:80"
    environment:
      VITE_APP_WS_SERVER_URL: "https://collab.yourdomain.com"

  excalidraw-room:
    image: excalidraw/excalidraw-room:latest
    container_name: excalidraw-room
    restart: unless-stopped
    ports:
      - "3002:80"
docker compose up -d

Part 2: HTTPS with Caddy

# Excalidraw web app:
draw.yourdomain.com {
    reverse_proxy localhost:3000
}

# Collaboration server (WebSocket):
collab.yourdomain.com {
    reverse_proxy localhost:3002
}

Part 3: Using Excalidraw

Drawing basics

  • Rectangle/Ellipse/Diamond: Click a shape tool → drag to draw
  • Arrow/Line: Connect shapes for flowcharts and diagrams
  • Text: Click anywhere → type (supports multiline)
  • Free draw: Pencil tool for freehand sketching
  • Selection: Click to select, drag to multi-select

Keyboard shortcuts

ShortcutAction
RRectangle
DDiamond
OEllipse
AArrow
LLine
PPencil (free draw)
TText
EEraser
Ctrl+DDuplicate selection
Ctrl+GGroup selection
Ctrl+Shift+GUngroup
Alt+dragClone while dragging
Ctrl+ASelect all
Ctrl+ZUndo
Ctrl+Shift+ZRedo

Style controls

  • Stroke color: Any color for outlines
  • Fill: Hachure (diagonal lines), cross-hatch, solid, or none
  • Stroke width: Thin, bold, extra bold
  • Stroke style: Solid, dashed, dotted
  • Edge: Sharp or round corners
  • Opacity: 0-100% transparency
  • Font: Hand-drawn, normal, code

Part 4: Real-Time Collaboration

Start a live session

  1. Click Live collaboration button (people icon)
  2. Start session → generates a unique room URL
  3. Share the URL → anyone with the link can draw simultaneously
  4. Live cursors show other users' positions

Collaboration features

  • Live cursors: See where collaborators are pointing and drawing
  • Laser pointer: Present ideas by pointing (press K)
  • User names: Set your name for identification
  • End-to-end encryption: The room key is in the URL hash — the server never sees your drawing data

Security model

URL: https://draw.yourdomain.com/#room=abc123,key=xyz789
                                       ↑ room ID   ↑ encryption key

The encryption key stays in the browser (URL hash is never sent to the server). Even the collaboration server only sees encrypted data.


Part 5: Libraries

Install community libraries

  1. Click the Library icon (book) in the toolbar
  2. Browse libraries → opens the community library catalog
  3. Categories: AWS, GCP, Azure architecture, networking, flowcharts, UI mockups, etc.
  4. Click Add to Excalidraw → shapes appear in your library panel
LibraryContains
AWS Architecture IconsEC2, S3, Lambda, VPC, etc.
Kubernetes IconsPods, services, deployments, ingress
System DesignLoad balancers, databases, queues, caches
UI WireframeButtons, forms, navigation, cards
Software ArchitectureMicroservices, APIs, databases, clients
Network DiagramsRouters, switches, firewalls, servers

Create custom libraries

  1. Select shapes you've drawn
  2. Library → Add to library
  3. Name your library → reuse across sessions
  4. Export as .excalidrawlib file to share

Part 6: Export Options

Image export

Menu → Export:
  - PNG: with or without background, scale 1x-4x
  - SVG: vector format, scalable
  - Clipboard: paste directly into Slack, Notion, etc.

File export

Menu → Save to disk:
  - .excalidraw: full editable file (JSON format)
  - .excalidraw.png: PNG with embedded scene data (re-editable!)
  - .excalidraw.svg: SVG with embedded scene data

The .excalidraw.png format is powerful — it looks like a regular PNG but contains the full drawing data. Drag it back into Excalidraw to continue editing.

Embed in documentation

<!-- In Markdown docs or GitHub READMEs: -->
![Architecture Diagram](./architecture.excalidraw.png)

Embed in websites

<!-- As an SVG: -->
<img src="/diagrams/architecture.svg" alt="Architecture" />

<!-- As an interactive embed (using Excalidraw React component): -->
<iframe src="https://draw.yourdomain.com/#json=..." width="800" height="600"></iframe>

Part 7: Excalidraw for Development

Architecture diagrams

Perfect for:

  • System design documents
  • Microservice architecture maps
  • Database schema sketches
  • API flow diagrams
  • Infrastructure diagrams

PR documentation

Include .excalidraw.png files in pull requests to visually explain changes:

docs/
  architecture.excalidraw.png    # Editable diagram
  data-flow.excalidraw.svg       # Vector diagram

VS Code integration

Install the Excalidraw VS Code extension:

  • Edit .excalidraw files directly in VS Code
  • Preview rendered diagrams
  • Auto-save

Part 8: Excalidraw+ Alternative (Storage Backend)

For persistent storage of drawings (without the paid Excalidraw+ service), use a file sync solution:

Option 1: Git-backed diagrams

# Save .excalidraw files in your repo:
diagrams/
  system-architecture.excalidraw
  deployment-flow.excalidraw
  database-schema.excalidraw

# Team members open them at: draw.yourdomain.com → File → Open

Option 2: Nextcloud integration

Store .excalidraw files in Nextcloud → open them in the browser via Excalidraw.

Option 3: S3/MinIO storage

Mount an S3 bucket for persistent drawing storage.


Maintenance

# Update:
docker compose pull
docker compose up -d

# No backup needed for the app itself (stateless)
# Back up your .excalidraw files wherever you store them

# Logs:
docker compose logs -f excalidraw
docker compose logs -f excalidraw-room

See all open source design tools at OSSAlt.com/categories/design.

Comments