Skip to content

Set Up Excalidraw on a Linux Server – Your Own Whiteboard for Sketches and Diagrams

Set up Excalidraw on your Linux server: use the One-Click App with HTTPS or install it manually with Docker Compose. Includes password protection with Basic Auth, saving drawings as .excalidraw files, and an honest look at the limits of live collaboration and sharing.

27 November 20269 min read1 Views0 helpful

Introduction

Excalidraw is a virtual whiteboard for sketches that look hand-drawn. Draw boxes, arrows, circles, and text directly in your browser to create flowcharts, architecture sketches, wireframes, or a collection of ideas for your next meeting in just a few minutes. Excalidraw is open source (MIT license) and doesn't require an account.

In this guide, we'll show you two ways to get started: the easy way, as a One-Click App, which makes Excalidraw available at your own address over HTTPS in just a few clicks, and a manual installation with Docker Compose following the official instructions. Then you'll learn where your drawings are stored, how to back them up, and what the self-hosted version can and can't do.

When It Makes Sense to Run Excalidraw on a VPS

Excalidraw is available for free at excalidraw.com. Running your own instance on a VPS is worth it if:

  • Your team should use a shared whiteboard at its own address, such as whiteboard.example.com, instead of on a third-party website.
  • You want to serve the interface yourself. The app comes from your server, while drawings stay in each person's browser.
  • You want to integrate Excalidraw into your own workflows, for example, as a link in your wiki or intranet.
  • You want to sketch without an account or sign-in, on any device with a browser.

The self-hosted version is less suitable if you want to store drawings centrally on the server, organize them in folders, or protect them with user accounts. Excalidraw can't do that on its own. Live collaboration also doesn't run through your own server. See “What the Self-Hosted Version Can't Do” for details.

Info

Want to store drawings on the server? The One-Click Apps catalog also includes ExcaliDash, a self-hosted dashboard for Excalidraw with login. It stores drawings on the server and organizes them into collections. If you need that, ExcaliDash is the better choice. This guide covers the lightweight version of Excalidraw.

The Easy Way: Excalidraw as a One-Click App

The quickest way to get Excalidraw is through the One-Click Apps on your VPS. The app is available directly over HTTPS with a domain. You don't need a reverse proxy, certificate, or firewall rules.

Requirements

Excalidraw needs very few resources. The server only serves the interface; drawing happens in the browser.

Install

  1. Open your VPS in the ZapX dashboard and go to the One-Click Apps tab.
  2. Find Excalidraw in the app catalog and click Install app.
  3. Use a custom subdomain or zap.cloud is already selected. Leave it enabled and enter a name, such as team-whiteboard. You can access Excalidraw over HTTPS at this domain. Choose a name that others won't easily guess.
  4. There are no other required fields. Excalidraw doesn't need login credentials or a database.
  5. Click Queue installation. After about a minute, the app card will show Excalidraw as online.

First Visit

Open the app's Access link. You'll land directly on a blank canvas; there is no login. The tools are at the top: rectangle, diamond, ellipse, arrow, line, freehand, text, image, and eraser. Each tool has a keyboard shortcut, such as R for rectangle, A for arrow, and T for text. Double-click a shape to add text to it. You can change the interface language in the menu (three lines in the top left); German is available.

Warning

Excalidraw has no login Anyone who knows the access link can open the canvas. They won't see your own drawings, because those are stored in your browser. However, they can use Excalidraw through your server. The One-Click App doesn't offer its own password protection. Only share the link with your team. If you want to require a login, use the manual installation with Basic Auth, as described below under “Protect Your Instance with a Password.”

Updates and Backups

Check for Excalidraw updates in the app settings (gear icon), under App update. Click Check for updates and install a new version with Apply update. If it says the app is up to date, there isn't a newer version in the app catalog.

There's nothing to back up on the server: the app doesn't store drawings there. Back up your work in the browser as a file, as described below under “Back Up Drawings.”

Manual Installation

The rest of this guide covers the manual installation of Excalidraw with Docker Compose on your VPS. For example, you might use this method if you aren't using One-Click Apps on your server or if you want to protect Excalidraw with a password.

Requirements

  • A Linux VPS with Debian or Ubuntu and SSH access. See First Access via SSH.
  • Docker and Docker Compose. See Install Docker. Check the installation with docker --version and docker compose version.
  • For HTTPS: a domain or subdomain with an A record pointing to your VPS IP address (e.g., whiteboard.example.com).

The official image is a small nginx web server with Excalidraw's ready-to-use files. The official documentation doesn't specify minimum requirements. In practice, these values are sufficient:

MinimumRecommended
CPU1 vCore1 vCore
RAM64 MB128 MB
StorageA few hundred MB for Docker and the image1 GB

Prepare the Firewall

Excalidraw listens on port 80 inside the container. You don't need to open this port if you use a reverse proxy, as shown below. With ufw, allow only SSH and the ports used by the reverse proxy:

Code
ufw allow OpenSSH
ufw allow 80/tcp
ufw allow 443/tcp
ufw enable
Warning

Docker bypasses ufw Ports published by Docker with ports: can be reached from outside even when ufw blocks them. Docker adds its own rules before the ufw rules. So, as in the Compose file below, bind Excalidraw only to 127.0.0.1. For more on the firewall, see Manage the Firewall on Linux.

Install with Docker Compose

Create a directory for Excalidraw and move into it:

Code
mkdir -p /opt/excalidraw
cd /opt/excalidraw

Create the Compose file with nano docker-compose.yml. It uses the official image, which is also used by the One-Click App, and a port that's only accessible locally:

Code
services:
  excalidraw:
    image: excalidraw/excalidraw:latest
    container_name: excalidraw
    restart: unless-stopped
    ports:
      - 127.0.0.1:5000:80

Here's what the entries mean:

  • image: the official excalidraw/excalidraw image. The project only publishes the latest tag; there are no fixed version numbers.
  • 127.0.0.1:5000:80: Excalidraw is only accessible from the server itself on port 5000; access from outside goes through the reverse proxy.
  • restart: unless-stopped: the container starts automatically after a server restart.

You don't need a volume because Excalidraw doesn't store data on the server. Start the container:

Code
docker compose up -d

Check that everything is running with docker compose ps.

First Visit

Because Excalidraw listens only on 127.0.0.1, you'll access the canvas through an SSH tunnel the first time. Run this command on your own computer:

Code
ssh -L 5000:localhost:5000 root@SERVER_IP

Replace SERVER_IP with your VPS IP address and open http://localhost:5000 in your browser. If you see the blank canvas, the installation is working.

Access over HTTPS through a Reverse Proxy

To access Excalidraw without a tunnel, put a reverse proxy with a valid certificate in front of it. For the basics, see Set Up a Reverse Proxy with nginx and Create an SSL Certificate (Let's Encrypt). Here's a server block for nginx:

Code
server {
    listen 80;
    server_name whiteboard.example.com;

    location / {
        proxy_pass http://127.0.0.1:5000;
        proxy_set_header Host $host;
        proxy_set_header X-Forwarded-Proto $scheme;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
    }
}

Then get the certificate with certbot --nginx -d whiteboard.example.com. Certbot adds HTTPS and the HTTP redirect to the block. HTTPS is important for Excalidraw: browsers only allow features such as copying to the clipboard and installing the app (PWA) over a secure connection.

Protect Your Instance with a Password

Excalidraw doesn't have its own login. If you want only your team to be able to open the instance, add a username and password prompt (Basic Auth) in front of it in the reverse proxy. Install the tool for the password file and create a user:

Code
apt install apache2-utils
htpasswd -c /etc/nginx/excalidraw.htpasswd YOUR_NAME

Add other people with htpasswd /etc/nginx/excalidraw.htpasswd NAME, without -c. Add these two lines to the location block in your server block, then reload nginx with systemctl reload nginx:

Code
auth_basic "Excalidraw";
auth_basic_user_file /etc/nginx/excalidraw.htpasswd;

The first time you visit, your browser will ask for a username and password. Find more tips for securing your server in Linux Security Tips.

Back Up Your Data

The server only contains the Compose file and, if created, the password file. Back up both:

Code
tar -czf excalidraw-backup-$(date +%F).tar.gz /opt/excalidraw/docker-compose.yml /etc/nginx/excalidraw.htpasswd

Back up your drawings in the browser; see “Back Up Drawings” in the next section.

Update Excalidraw

Pull the latest image and restart the container:

Code
cd /opt/excalidraw
docker compose pull
docker compose up -d

Since Excalidraw doesn't store data on the server, nothing is lost during the update. Remove old images with docker image prune.

Using Excalidraw Day to Day

Once it's set up, you can start drawing right away. The most important things to know are where your drawings are stored and how to share them with others.

Where Your Drawings Are Stored

Excalidraw automatically saves the current drawing in your browser's storage. If you close the tab and open Excalidraw again later, the drawing will still be there. However, this only applies to the same browser on the same device and at the exact same address:

  • On another device or in another browser, you'll see a blank canvas.
  • If you delete your browser data or use a private window, the drawing will be gone.
  • Each browser has one current drawing. Excalidraw doesn't have a list of saved drawings.

Back Up Drawings

Save important drawings as files:

  1. Open the menu (three lines in the top left) and select Save to....
  2. Click Save to disk. The browser will save a file with the .excalidraw extension.
  3. To open it later, select Open in the menu (keyboard shortcut Strg+O) and continue working on it.

The .excalidraw file contains the entire drawing, including any images you've added. Store it in your cloud storage or your project's Git repository, for example. To use drawings in presentations and documents, export a PNG or SVG image with Export image....

Live Collaboration and Sharing

Use Share in the top right to invite others to work together:

  • Start session starts a live session. Excalidraw gives you a link to share. Anyone who opens it can draw in real time.
  • Export to Link is supposed to create a read-only link to the drawing.
Warning

Live sessions run through excalidraw.com The official image is configured to use excalidraw.com's public servers. In our test, the live session worked, but the connection went through excalidraw.com's session server, and the drawing was stored in its cloud database (Google Firebase). According to Excalidraw, it's end-to-end encrypted, and only the link contains the key. If drawings must not leave your server, don't start a live session; share the .excalidraw file instead. The official documentation explicitly states that the self-hosted version doesn't support sharing or collaboration.

What the Self-Hosted Version Can't Do

  • No self-hosted server for live sessions: Replacing the excalidraw.com session server in the ready-made image requires building your own version from source. This isn't officially supported and isn't covered in this guide.
  • No sharing link: In our test, Export to Link failed with the message “Couldn't create shareable link.” Share drawings as a file or image instead.
  • No accounts or server-side storage: There are no users, folders, or history. Drawings are backed up as files.
  • External services when you visit: The interface loads fonts from a server belonging to the Excalidraw project and includes Simple Analytics, a cookie-free visitor analytics service. We observed this when opening the page in our test.
  • Libraries: You can save custom shapes in the library section; these are also stored in your browser. Browse libraries opens the public collection at libraries.excalidraw.com.
  • Excalidraw+: The button in the top right leads to excalidraw.com's paid cloud offering. You don't need it for your instance.

Conclusion

You've set up Excalidraw on your VPS and now know where your drawings are stored and how to back them up as files. Your team can now sketch at your own address, without accounts or installation.

Prefer not to handle Docker manually? Use the easy One-Click App method described above under “The Easy Way: Excalidraw as a One-Click App.”

Free tools

Related tools for servers and developers

View all

FAQ

Frequently asked questions

The One-Click App is the quickest option: Excalidraw runs over HTTPS at your domain in about a minute, with no reverse proxy or manual certificate setup. Manual installation with Docker Compose is useful if you want to protect the instance with a password (Basic Auth in the reverse proxy) or manage everything yourself.
In your browser's storage, not on the server. The drawing remains there when you close the tab, but you can't see it on other devices, and it will be lost if you delete your browser data. Back up important drawings from the menu using Save to... > Save to disk as a .excalidraw file.
In our test, yes, but not through your own server: the official image uses excalidraw.com's public servers and cloud database for live sessions. According to Excalidraw, sessions are end-to-end encrypted. If drawings must not leave your server, share them as .excalidraw files instead of starting a live session.

Feedback

Was this article helpful?

Your feedback helps us prioritize and improve content.

0 of 0 people found this article helpful.

Personal support

Need more help than the guide provides?

Our ZAP-Hosting support team knows your product — briefly describe your issue and we'll help you personally.

Zappy knows this guide and answers you right in the chat.