How to install Excalidraw on a VPS
Excalidraw is an open-source whiteboard for sketching diagrams. The official Docker image serves a static single-user editor. Real-time collaboration is not included โ it requires a separate Firebase project or the commercial Excalidraw+. This guide covers deploying the editor only.
Important: This guide deploys the Excalidraw editor as a single-user app. The official Docker image serves a static SPA โ there is no WebSocket server, no sync backend, and no real-time collaboration. Features like shareable links, presence cursors, and end-to-end encryption (available on excalidraw.com) require you to bring your own Firebase project or subscribe to Excalidraw+. This guide covers only the editor itself.
Prerequisites
- Ubuntu 22.04 or 24.04 VPS with SSH access and a public IP
- A domain name (e.g.
whiteboard.example.com) pointing to your VPS - Docker installed (covered in Step 2)
- Basic familiarity with the command line
The editor itself is lightweight. A 1 GB RAM / 1 vCPU instance is plenty for personal use.
Step 1, Connect and prepare the server
ssh root@SERVER_IP
apt update && apt upgrade -y
apt install -y ca-certificates curlStep 2, Install Docker
Install Docker Engine from the official repository:
curl -fsSL https://get.docker.com | sh
systemctl enable --now docker
docker --versionStep 3, Run Excalidraw with Docker
The official Excalidraw image is excalidraw/excalidraw:latest. Run it bound to a local port so it is not directly exposed to the internet:
docker run -d \
--name excalidraw \
--restart unless-stopped \
-p 127.0.0.1:8080:80 \
excalidraw/excalidraw:latestThis pulls the image and starts the editor on port 8080 of the loopback interface. The container serves the static editor only โ no database, no WebSocket, no collaboration.
To verify the container is running:
docker ps --filter name=excalidrawStep 4, Configure the reverse proxy
Route your domain to the local container with Nginx or Caddy and obtain a TLS certificate. Unlike chat applications or collaborative tools, no WebSocket upgrade headers are needed โ Excalidraw's collaboration channel connects directly to Firebase (or your configured backend), not through your server.
Example Nginx snippet:
server {
listen 443 ssl;
server_name whiteboard.example.com;
ssl_certificate /etc/letsencrypt/live/whiteboard.example.com/fullchain.pem;
ssl_certificate_key /etc/letsencrypt/live/whiteboard.example.com/privkey.pem;
location / {
proxy_pass http://127.0.0.1:8080;
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Proto $scheme;
}
}If you use Caddy, a single line in your Caddyfile is enough:
whiteboard.example.com {
reverse_proxy 127.0.0.1:8080
}Caddy handles TLS automatically.
Step 5, First access
Open https://whiteboard.example.com in your browser. You should see the Excalidraw editor.
Draw something, then reload the page. The drawing is gone. This is expected โ the editor stores data in your browser's local storage. Closing the tab or clearing browser data loses unsaved work. Always export important drawings:
- Use the Export button to save as
.excalidraw(reopenable) or as PNG/SVG. - Use the Save to disk option to keep a local copy.
If you need persistent storage, consider configuring a Firebase project (bring your own) or using Excalidraw+.
Maintenance
Pin the image tag to a specific version instead of latest to avoid unexpected breaking changes:
docker pull excalidraw/excalidraw:latest
docker inspect excalidraw/excalidraw:latest | grep -i "org.opencontainers.image.version"Once you identify a working version, update the container:
docker stop excalidraw
docker rm excalidraw
docker run -d \
--name excalidraw \
--restart unless-stopped \
-p 127.0.0.1:8080:80 \
excalidraw/excalidraw:TAGGED_VERSIONMonitor the container logs for startup errors:
docker logs excalidrawTools mentioned
Excalidraw
โA delightful hand-drawn canvas for diagrams and collaborative sketches.
The core whiteboard is free and open source with unlimited local drawings; paid Plus adds cloud collaboration.