Deploy Excalidraw - Collaborative Diagram Whiteboard [Updated]
Collaborative virtual whiteboard for sketching hand-drawn style diagrams.
excalidraw-room
Just deployed
excalidraw/excalidraw:latest
Just deployed
![]()
Deploy and Host Excalidraw on Railway
Excalidraw is an open-source virtual whiteboard that lets you easily sketch diagrams with a hand-drawn feel. It supports real-time, end-to-end encrypted collaboration, customizable shape libraries, dark mode, image support, localization, and exporting to PNG, SVG, or a JSON file.
![]()
About Hosting Excalidraw
Deploying Excalidraw on Railway enables you to self-host both the whiteboard web client and the real-time collaboration server (excalidraw-room). With Railway, you can deploy both services in a single project, link them automatically, and scale them seamlessly.
By self-hosting Excalidraw with its collaboration server, you retain control of your workspace without depending on external infrastructure. This setup unlocks full real-time collaboration, allowing multiple users to connect to the same session via WebSockets, edit diagrams simultaneously, and see live cursor movements and canvas updates. Railway handles static builds for the client, manages WebSocket connections for the collaboration room, and automatically provisions SSL/HTTPS.
Dependencies for Excalidraw Hosting
- Excalidraw Client: The frontend React app (built via Dockerfile).
- Excalidraw Room: The Node.js WebSocket collaboration server.
Deployment Dependencies
- GitHub Repository (Client): https://github.com/excalidraw/excalidraw
- GitHub Repository (Room): https://github.com/excalidraw/excalidraw-room
- Docker Image (Client): https://hub.docker.com/r/excalidraw/excalidraw
- Docker Image (Room): https://hub.docker.com/r/excalidraw/excalidraw-room
- Official Website: https://excalidraw.com
- Official Documentation: https://docs.excalidraw.com
Implementation Details
Recommended Railway Configuration
| Setting | Value |
|---|---|
| Builder | Dockerfile |
| Dockerfile Path | Dockerfile |
| Root Directory | Leave blank |
| Start Command | Leave blank |
| Public Networking | Enabled (for Excalidraw Client and Excalidraw Room) |
| Persistent Volume | None |
| Environment Variables | Port and URL routing variables |
Recommended Environment Variables
Excalidraw Client Environment Variables:
NODE_ENV=production # Defines the environment mode
VITE_APP_BACKEND_V2_GET_URL=https://json.excalidraw.com/api/v2/ # API URL for retrieving saved drawings
VITE_APP_BACKEND_V2_POST_URL=https://json.excalidraw.com/api/v2/post/ # API URL for saving/sharing drawings
VITE_APP_LIBRARY_URL=https://libraries.excalidraw.com # URL to fetch Excalidraw libraries
VITE_APP_LIBRARY_BACKEND=https://us-central1-excalidraw-room-persistence.cloudfunctions.net/libraries # Backend for library management
VITE_APP_PLUS_LP=https://plus.excalidraw.com # Excalidraw Plus landing page link
VITE_APP_PLUS_APP=https://app.excalidraw.com # Excalidraw Plus application link
VITE_APP_AI_BACKEND=https://oss-ai.excalidraw.com # AI backend URL for text-to-diagram features
VITE_APP_WS_SERVER_URL=https://${{excalidraw-room.RAILWAY_PRIVATE_DOMAIN}} # WebSocket connection to the excalidraw-room service (using Railway's private networking reference)
PORT=80 # Container port for the Excalidraw frontend client
Excalidraw Room Environment Variables:
PORT=3002 # Port for the collaboration WebSocket server
CORS_ORIGIN=* # Allowed CORS origins for the collaboration server
Common Use Cases
- Sketching wireframes, UI mockups, and architectural diagrams.
- Real-time collaborative brainstorming and design sessions with team members.
- Storing and exporting sketches locally as image formats or editable JSON canvas files.
Why Deploy Excalidraw on Railway?
Railway is a singular platform to deploy your infrastructure stack. Railway will host your infrastructure so you don't have to deal with configuration, while allowing you to vertically and horizontally scale it.
By deploying Excalidraw on Railway, you are one step closer to supporting a complete full-stack application with minimal burden. Host your servers, databases, AI agents, and more on Railway.
Template Content
excalidraw-room
excalidraw/excalidraw-room:latestexcalidraw/excalidraw:latest
excalidraw/excalidraw:latest