Excalidraw publishes a Docker image that serves its drawing editor as a web app. The setup is small, but one limitation matters before you begin: the official image is client-only. Excalidrawโs development guide says a self-hosted instance does not currently include sharing or real-time collaboration. This guide installs that client-only editor without pretending it is the full hosted Excalidraw service.
Use this setup when you want your own URL for the editor and you are comfortable exporting important drawings yourself. Do not use it as a drop-in collaborative whiteboard for shared rooms.
What This Deployment Includes
- The official
excalidraw/excalidrawimage - Docker Compose for a repeatable deployment
- A port bound only to the VPS loopback interface
- A public HTTPS endpoint supplied by your reverse proxy
- Simple update and rollback checks
It does not include a room server, shared-link storage, a collaboration backend or a server-side drawing database.
Before You Start
You need a Linux VPS, a domain whose DNS points to the server, a normal user with sudo access, and an HTTPS reverse proxy. The editor itself is lightweight, so choose a VPS for the operating system, proxy and any other services you plan to run rather than for a supposed Excalidraw database.
If you still need a server, use the general VPS comparison and verify the current plan price directly with the provider. This guide does not select a provider or repeat prices that can change.
Connect with an SSH key:
ssh deploy@your-vps-ip
Replace deploy and your-vps-ip with your actual sudo user and server address.
Install Docker and Compose
On a current Ubuntu server:
sudo apt update
sudo apt install -y docker.io docker-compose-v2
sudo systemctl enable --now docker
Confirm both commands are available:
sudo docker --version
sudo docker compose version
Create the Excalidraw Service
Create a dedicated directory:
sudo mkdir -p /opt/excalidraw
sudo chown "$USER":"$USER" /opt/excalidraw
cd /opt/excalidraw
Create compose.yaml with this content:
services:
excalidraw:
image: excalidraw/excalidraw:latest
restart: unless-stopped
ports:
- "127.0.0.1:3000:80"
This port mapping follows Excalidrawโs current official Docker Compose file. The container listens on port 80. Port 3000 is bound to 127.0.0.1, so it is available to a reverse proxy on the VPS but not exposed directly to the internet.
Start the service:
sudo docker compose up -d
sudo docker compose ps
curl -I http://127.0.0.1:3000
The final command should return an HTTP response from the local container. If it does not, inspect the logs:
sudo docker compose logs --tail=100 excalidraw
Put Excalidraw Behind HTTPS
Create a reverse-proxy host such as draw.example.com and send traffic to http://127.0.0.1:3000. Keep only SSH, HTTP and HTTPS open at the VPS firewall. Do not open port 3000 publicly.
Follow the reverse proxy and HTTPS guide for the proxy configuration. Once the certificate is active, load your HTTPS URL and create a test drawing.
Understand Data and Collaboration
The simple Docker image serves the editor. It does not add a database to the VPS, and it does not turn on Excalidrawโs hosted collaboration services. Export drawings you need to keep as Excalidraw JSON files. You can also export SVG or PNG copies for documents and sharing.
If your requirement is real-time shared rooms, first review Excalidrawโs current development documentation and production environment example. That architecture needs additional backend services and is outside this client-only deployment.
Update Without Guessing
Before an update, note the current image identifier:
sudo docker compose images
Then fetch and start the current image:
sudo docker compose pull
sudo docker compose up -d
sudo docker compose ps
curl -I http://127.0.0.1:3000
Test the editor in a browser after every update. For a stricter production process, replace latest with a version or image digest that you have already tested, and keep the previous value for rollback.
Troubleshooting
The Public URL Returns 502
Run curl -I http://127.0.0.1:3000 on the VPS. If that works, the container is healthy and the reverse-proxy target is the likely issue. If it fails, check docker compose ps and the container logs.
The Editor Loads, but Collaboration Does Not Work
That is expected with the official client-only image. Remove any obsolete EXCALIDRAW_API_URL advice rather than pointing the app at an unrelated public backend.
Where Are Drawings Stored on the Server?
This deployment does not create a server-side drawing database. Export important drawings and include the exported files in your normal backup process.
Verification Checklist
- The container is running.
curl -I http://127.0.0.1:3000returns an HTTP response on the VPS.- Port 3000 is not reachable from the public internet.
- The public hostname uses HTTPS.
- The browser can create and export a test drawing.
- The deployment does not promise collaboration or shared-room storage.
The result is a private endpoint for Excalidrawโs client editor, not a clone of the full hosted service. That distinction is the most important part of a correct self-hosting guide.