Railway

Deploy Excalidraw (Collaborator support)

Deploy and Host excalidraw-selfhosted with Railway (Collaborator support)

Deploy Excalidraw (Collaborator support)

Just deployed

Just deployed

Deploy and Host Excalidraw (Collaborator support) on Railway

What is Excalidraw (Collaborator support)?

Excalidraw is the open-source virtual whiteboard for hand-drawn-style diagrams, loved for sketching architecture, flows and brainstorming. This template adds full live-collaboration support: it deploys your own end-to-end-encrypted collaboration server (excalidraw-room) so real-time multi-user sessions never leave your infrastructure.

About Hosting Excalidraw (Collaborator support)

Hosting Excalidraw on Railway means running two small services: the excalidraw frontend (a static SPA served by nginx) and excalidraw-room, your private real-time collaboration relay (Socket.IO). At startup the frontend container patches its bundled WebSocket URL so live sessions connect to your room over wss:// instead of Excalidraw's public oss-collab.excalidraw.com relay. Everything is wired with Railway reference variables — no environment variables to configure manually, no databases, no volumes, no secrets. Both services run serverless (App sleep on), keep healthchecks and auto-TLS domains enabled, and the whole stack fits the Railway Free plan for light usage.

Common Use Cases

  • Architecture & engineering diagrams: document systems, network topologies and flows in a hand-drawn style that stays readable in code reviews and design docs.
  • Remote brainstorming & workshops: a shared whiteboard with live cursors for distributed teams — no account, no install, just open the URL.
  • Documentation & teaching: create and present diagrams live in classrooms, runways or on-call postmortems, with instant multi-user sync.

Dependencies for Excalidraw (Collaborator support) Hosting

  • Official excalidraw/excalidraw Docker image (pinned by digest, never :latest).
  • Official excalidraw/excalidraw-room Docker image (pinned by digest).
  • One public Railway domain per service (automatic TLS).

No external databases, storage or third-party services are required for the collaboration channel to work.

Deployment Dependencies

Implementation Details

The official Excalidraw image bakes the collaboration URL (https://oss-collab.excalidraw.com) into its JS bundle at build time, so a runtime environment variable alone is not enough. The frontend container rewrites it at startup with a sed patch, then starts nginx. The patch is wrapped in sh -c '...' because Railway's serverless runtime executes the start command as argv, not through a shell:

sh -c 'if [ -n "$VITE_APP_WS_SERVER_URL" ]; then sed -i "s|https://oss-collab\.excalidraw\.com|$VITE_APP_WS_SERVER_URL|g" /usr/share/nginx/html/assets/*.js; fi; exec nginx -g "daemon off;"'

Wiring uses Railway reference variables, so nothing is hardcoded per-user:

ServiceVariableValue
excalidrawPORT80
excalidrawVITE_APP_WS_SERVER_URLhttps://${{excalidraw-room.RAILWAY_PUBLIC_DOMAIN}}
excalidraw-roomCORS_ORIGINhttps://${{excalidraw.RAILWAY_PUBLIC_DOMAIN}}

Both services run with sleepApplication: true (serverless) — required on the Railway Free plan — and a / healthcheck.

Why Deploy Excalidraw (Collaborator support) 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 (Collaborator support) 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

More templates in this category

View Template
Rocky Linux
[Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀

codestorm
39
View Template
Foundry Virtual Tabletop
A Self-Hosted & Modern Roleplaying Platform

Lucas
71
View Template
Letta Code Remote
Run a Letta Code agent 24/7. No inbound ports, just deploy.

Letta
51