6 min read #OpenCloud#UX

OpenCloud · Whiteboard

Excalidraw whiteboard integration

Sketches get made together at a whiteboard, but afterwards they are often just a phone photo or sit with some outside online service. Since OpenCloud 8.1.0, Excalidraw is available as an extension: in the “New” menu you create a whiteboard that is stored as an `.excalidraw` file next to your other files. Several people draw on it at the same time, see each other's cursors and can follow one person across the canvas. Operators install the extension from the App Store; drawing together also requires the Yjs server.

Many meetings reach the moment when someone stands up and grabs a marker. A few boxes, arrows between them, a cloud for whatever is still unclear. Afterwards the room understands what it has been talking about for twenty minutes. What remains of the sketch is usually a crooked photo of the whiteboard that someone posts in the chat and nobody can find three weeks later.

Distributed teams don't even have the whiteboard. Someone opens an online drawing service, shares the link in the video call, and everyone draws along. That works, but the sketch then lives with that service. Editing there usually requires an account, often with a per-seat license. The project itself keeps its documents somewhere else. Anyone joining later first has to know that the sketch exists and where it is.

Whiteboards as .excalidraw files

With the Excalidraw extension, the “New” menu has a “Whiteboard” entry. It creates a file with the .excalidraw extension in the folder you're working in, for example in the project's space next to the minutes and the plan. OpenCloud 8.1.0 shows these files in the list with their own icon. One click opens the canvas.

  1. Folder “Sprint 42” in the space “Produktteam”, open “New” menu with the entry “Whiteboard” and the extension excalidraw.
    Choose “Whiteboard” in the “New” menu.
  2. Tile view of the folder “Sprint 42” with Planung.csv, Protokoll.md and Retro.excalidraw; the whiteboard file has its own red icon with a brush.
    The new file Retro.excalidraw sits next to the minutes and the plan, with its own icon.
  3. Empty Excalidraw canvas with toolbar and the “Library” button, at the top the OpenCloud header bar with the file name Retro.excalidraw.
    One click opens the empty canvas.

Excalidraw is an open source drawing tool under the MIT license whose strokes look hand-drawn. It has rectangles, ellipses, diamonds, arrows that stick to shapes, freehand lines and text. You can drag images onto the canvas.

Because the whiteboard is an ordinary file, the same rules apply to it as to any other file. It is shared with the same permissions as a document, including through a public link. People with read-only access see the canvas in view mode and can pan and zoom, but can't draw. It is saved in Excalidraw's open format, a JSON file with all elements, inserted images, background color and grid. The same file also opens in excalidraw.com or any other program that reads the format. If you download it, your sketch isn't tied to OpenCloud.

The whiteboard Retro.excalidraw through a read-only link: drawing visible, no toolbar, no save button.

With read-only access, the toolbar and saving are gone; panning and zooming work (Excalidraw 1.1.0 on OpenCloud 8.1.0, demo data).

For presentations and documents, Excalidraw offers export as PNG or SVG to people with write access. The extension deliberately hides the menu items for opening another file and for saving under a new name. The file in OpenCloud is the whiteboard, and no second version should grow alongside it.

Open Excalidraw main menu with “Export image…”, “Find on canvas”, “Help” and “Reset the canvas”; entries for opening or saving as are missing.

The main menu offers “Export image…”; there is no open or save as.

Real-time collaboration and follow mode

When several people open the same whiteboard, each one sees the others' strokes as they are drawn, along with their mouse pointers and selections. At the top right, Excalidraw shows who is present. Clicking a person makes your view follow theirs. On a large canvas, everyone quickly ends up drawing in a different corner, and whoever wants to explain something can bring the others along this way instead of saying “further left, no, below that”.

Anna Beispiel on the left, Ben Test on the right, on the same whiteboard: both draw, and each sees the other's strokes and labeled pointer. At the end, Ben clicks Anna's avatar at the top right, and Excalidraw reports “Following Anna Beispiel” (Excalidraw 1.1.0, Yjs server 1.1.0, OpenCloud 8.1.0, demo data).

Synchronization runs through the same Yjs service that has powered co-editing in the text editor since OpenCloud 8.0.0. Yjs is a technique that merges concurrent changes without locks. So that an extension can use this service, the web interface passes its Yjs library on to apps from 8.1.0 on. Two copies on the same page would not work together. That's why the extension requires 8.1.0, and why it came out on the same day as that version. The Yjs server checks every connection against OpenCloud and enforces write permissions per file and person. Nobody with read-only access can change anything through this route.

As in the text editor, saving happens automatically, by default every 120 seconds. You can change the interval with WEB_OPTION_EDITOR_AUTOSAVE_INTERVAL.

Installation as an extension

Excalidraw is a web extension from the opencloud-eu/web-extensions repository and, like the other extensions there, is licensed under AGPL-3.0. It is not part of the OpenCloud image. After updating to 8.1.0, the whiteboard is not automatically there. Operators download the app from the OpenCloud App Store, unpack it into the directory for web apps (by default $OC_DATA_DIR/web/assets/apps, in an opencloud-compose setup config/opencloud/apps) and restart OpenCloud. The app needs no configuration of its own.

For drawing together, the Yjs server has to be running and WEB_OPTION_YJS_SERVER_URL has to point to it. In the opencloud-compose setup, appending yjs/yjs.yml to COMPOSE_FILE is enough. Excalidraw also works without the Yjs server; then everyone draws alone and saves as in an ordinary editor.

Shipping a whiteboard as an extension follows the principle OpenCloud sets out in its scope: specialized applications are integrated through extensions so that the core stays stable and manageable. If you don't need whiteboards, you install nothing. In the fall, the UML editor Apollon arrived the same way. It uses the same Yjs service but is meant for diagrams that have to follow the rules of a notation. Excalidraw remains the open canvas for ideas and first drafts.

Limitations

The Yjs server doesn't store data persistently and never writes to the file itself. The open browsers do that. If everyone closes the whiteboard between two automatic saves, the changes since the last save are lost. The server keeps documents only in memory, which is why it runs as a single instance.

In this extension, the Excalidraw interface is available in English only, even if OpenCloud is set to German. Inserted images are embedded in the .excalidraw file, which can make it large quickly.

The first version, 1.0.0, loaded Excalidraw's fonts from an external server, which OpenCloud's Content Security Policy blocks. Text then appeared in a fallback font. Version 1.1.0 of the extension fixes this. It also runs on 8.1.0 and is the right choice for that version. The current version, 1.2.0, requires OpenCloud 9.0.0.

Sources