For a Docker Excalidraw deployment, run the official image with docker run --rm -dit --name excalidraw -p 5000:80 excalidraw/excalidraw:latest and open http://localhost:5000. The image serves the Excalidraw app as static files, and self-hosted copies do not currently support sharing or live collaboration.
The command comes from the Excalidraw documentation and the Docker Hub page. Both were checked in November 2026. If you have not installed Docker yet, start with installing Docker Desktop on Windows.
Run Excalidraw with docker run
docker pull excalidraw/excalidraw
docker run --rm -dit --name excalidraw -p 5000:80 excalidraw/excalidraw:latest
What each flag does:
--rmdeletes the container when it stops. Nothing of value lives inside it, so this is safe, but it also means a stopped container is gone rather than restartable.-druns it in the background, and-itkeeps an interactive terminal attached.--name excalidrawgives the container a fixed name so you can stop it withdocker stop excalidraw.-p 5000:80publishes container port 80 on host port 5000. The format isHOST:CONTAINER.
Open http://localhost:5000 in a browser and the editor loads. Stop it with:
docker stop excalidraw
Because of --rm, the container is removed once it stops. Run the first command again to start a fresh one.
Change the port or fix a port conflict
Only the left number needs to change. To serve Excalidraw on host port 8080:
docker run --rm -dit --name excalidraw -p 8080:80 excalidraw/excalidraw:latest
If the host port is taken, Docker refuses to start the container and reports that the port is already allocated or already in use. Pick another port, or find the owner with the steps in how to fix "port already in use". Leave the right-hand side at 80: that is the port nginx listens on inside the image.
Deploy Excalidraw with Docker Compose
For a server you want to survive reboots, a Compose file is easier to keep in version control than a long command. The official image needs no configuration, so the file is short. This one is an example written for this article, not a file shipped by Excalidraw:
services:
excalidraw:
image: excalidraw/excalidraw:latest
container_name: excalidraw
ports:
- "127.0.0.1:5000:80"
restart: unless-stopped
Start it from the folder that holds the file:
docker compose up -d
Three details matter here, and all three come from the Compose reference:
- Quote the port mapping. The reference says
HOST:CONTAINERshould always be a quoted string, because YAML can read unquoted values such as22:22as base-60 numbers. - The
127.0.0.1:prefix binds the port to the local machine only. Without a host IP, the reference warns that Docker binds to all interfaces (0.0.0.0), bypassing host firewall rules, so a host with a public IP address exposes the container to the internet. Put a reverse proxy in front of it if other people need access, or drop the prefix on a trusted network. restart: unless-stoppedrestarts the container whatever its exit code, until you stop or remove the service. The default isno, which never restarts it.
Do not confuse this with the docker-compose.yml in the Excalidraw repository. That file builds the project from source and bind-mounts the source tree, so it is meant for development, and the documentation describes it as a way to develop without a Node.js setup. The command it documents is docker-compose up --build -d.
What the image contains
The repository's Dockerfile is a two-stage build. The first stage uses a Node image to install dependencies with Yarn and run the build script yarn build:app:docker. The second stage copies the resulting static files into an nginx image (the Alpine "slim" variant) at /usr/share/nginx/html. It also defines a health check that requests http://localhost with wget.
That has practical consequences:
- The running container is a plain web server with no Node process, no database and no writable application data.
- The Docker Hub page lists the image at about 41 MB, which is small because it holds only nginx and the built app. Read more about how images are assembled in what a Docker image is.
- The health check lets
docker psshowhealthyorunhealthyin the status column once the container has been up for a short while.
Build the image yourself
The documentation also gives a build command, run from a clone of the repository:
git clone https://github.com/excalidraw/excalidraw.git
cd excalidraw
docker build -t excalidraw/excalidraw .
docker run --rm -dit --name excalidraw -p 5000:80 excalidraw/excalidraw:latest
Build it yourself when you want to pin a specific commit or review the code before running it. The build downloads all Yarn dependencies and compiles the app, so it takes noticeably longer than pulling the published image. The Dockerfile passes a 600,000 ms network timeout to Yarn for slow connections.
As of November 2026 the Docker Hub page lists a single tag, latest, last updated about six months before this check. That means you cannot pin the published image to a version number. If you need repeatable deployments, build your own image from a known commit and tag it yourself, or record the image digest that docker image inspect reports and reference it as excalidraw/excalidraw@sha256:....
Why sharing and collaboration do not work
The Excalidraw documentation states: "At the moment, self-hosting your own instance doesn't support sharing or collaboration features." The Docker Hub page repeats it. In practice, the share-link and live-session features of excalidraw.com depend on backend services that the static image does not include.
The repository's production environment file shows what the official build is configured to talk to. It sets VITE_APP_WS_SERVER_URL to a socket server on oss-collab.excalidraw.com and the sharing backend to json.excalidraw.com. Those are hosted by the Excalidraw project. For local development the documentation says you need to set up the collaboration server yourself, and it points to a separate repository, excalidraw-room. Wiring your own instance of it into a self-hosted build means rebuilding the app with different environment values. That is not covered by the one-command deployment above, and this article did not test it.
What does work in a self-hosted copy is the editor itself: drawing, saving and loading .excalidraw files, and exporting images. Because the container stores nothing, export or save files you want to keep. Anything held only in a browser's local storage disappears if the browser data is cleared.
Is self-hosting worth it?
Self-hosting makes sense when you want the editor on an internal network, in an environment without outside access, or under your own domain. It does not give you shared boards. If your goal is a whiteboard several people edit at once, the hosted excalidraw.com app is the supported way to get that.
If it still fails
- The page does not load. Run
docker psand confirm the container is listed with0.0.0.0:5000->80/tcpor127.0.0.1:5000->80/tcp. If it is missing, rundocker logs excalidrawor start it without-dto see why it exited. - It works locally but not from another machine. Check whether you bound the port to
127.0.0.1. That binding is deliberate in the Compose example above. - The name is already in use. Docker rejects a second container called
excalidraw. Stop or remove the old one withdocker rm -f excalidraw, or choose a different--name. - You are on an ARM machine. This article did not verify which CPU architectures the published image supports. Build from source on that machine if the pull fails, since the Dockerfile builds for the platform you run it on.
Frequently asked questions
- Does self-hosted Excalidraw support real-time collaboration?
- Not out of the box. The Excalidraw documentation and the Docker Hub page both say that a self-hosted instance does not currently support sharing or collaboration features. The collaboration server is a separate project, excalidraw-room, and the stock image is not wired to your own copy of it.
- Which port does the Excalidraw container listen on?
- Port 80 inside the container, because the image serves the built app with nginx. The official example publishes it as host port 5000 with -p 5000:80. You can choose any free host port on the left side of the colon.
- Does the Excalidraw Docker image send analytics?
- The Excalidraw documentation and the Docker Hub page state that the image is free of analytics and other tracking libraries. The app is still a static site that runs in your browser, so check your own network tab if you need to confirm what your build requests.
- Where are my drawings stored with the Docker version?
- The container serves only the app. It has no database or volume for drawings, so work is kept in the browser that created it, and you export files such as .excalidraw to keep a copy somewhere durable.