---
title: "Deploy Excalidraw (Collaborator support)"
description: "Deploy and Host excalidraw-selfhosted with Railway (Collaborator support)"
category: "Other"
url: https://railway.com/deploy/excalidraw-collaborator-support
---

# Deploy Excalidraw (Collaborator support)

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

**[Deploy Excalidraw (Collaborator support) on Railway](https://railway.com/template/excalidraw-collaborator-support)**

- **Creator:** BURNI80
- **Category:** Other
- **Total deploys:** 1

## Template content

### Excalidraw https://escolhalivre.org.br/wp-content/uploads/2024/07/excalindraw.png

- **Image:** excalidraw/excalidraw@sha256:f7ee194addd607bf831d2af0f0a34463dd4225e426cf35199ef0b12a803398e9
- **Start command:** `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;"'`
- **Health check:** /
- **Public domain:** Yes

### Excalidraw Room https://escolhalivre.org.br/wp-content/uploads/2024/07/excalindraw.png

- **Image:** excalidraw/excalidraw-room@sha256:2fe999f9be4379e3ee282fc45d75d84a691a6383dde33544514cc395287c7a70
- **Start command:** `node dist/index.js`
- **Health check:** /
- **Public domain:** Yes

## Documentation

# 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 &amp; engineering diagrams:** document systems, network topologies and flows in
  a hand-drawn style that stays readable in code reviews and design docs.
- **Remote brainstorming &amp; workshops:** a shared whiteboard with live cursors for distributed
  teams — no account, no install, just open the URL.
- **Documentation &amp; 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

- [Excalidraw repository](https://github.com/excalidraw/excalidraw) (MIT) — upstream project.
- [excalidraw-room repository](https://github.com/excalidraw/excalidraw-room) (MIT) — the
  collaboration relay.
- [Railway Docs — Services &amp; Networking](https://docs.railway.com/) — public domains, TLS and
  reference variables used by this template.

### 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
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:

| Service | Variable | Value |
| --- | --- | --- |
| `excalidraw` | `PORT` | `80` |
| `excalidraw` | `VITE_APP_WS_SERVER_URL` | `https://${{excalidraw-room.RAILWAY_PUBLIC_DOMAIN}}` |
| `excalidraw-room` | `CORS_ORIGIN` | `https://${{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.



## Similar templates

- [Rocky Linux](https://railway.com/deploy/rocky-linux) — [Jul'26] Hosted Rocky Linux 9 workspace with SSH and persistent storage. 🚀
- [Foundry Virtual Tabletop](https://railway.com/deploy/X5tR6G) — A Self-Hosted & Modern Roleplaying Platform
- [Letta Code Remote](https://railway.com/deploy/letta-code-remote) — Run a Letta Code agent 24/7. No inbound ports, just deploy.

Open this page in a browser: https://railway.com/deploy/excalidraw-collaborator-support
