Install Excalidraw on Debian 12 with Docker + Nginx
Introduction
In this tutorial, we’re going to install and run Excalidraw on a Debian 12 server using Docker, then expose it publicly using Nginx as a reverse proxy.
Excalidraw will run inside a Docker container and will only be accessible locally on 127.0.0.1.
Nginx will handle all incoming traffic on port 80 and forward it to Excalidraw.
This setup is clean, lightweight, and secure—perfect for personal use or small teams.
Step 1: Connect to the Debian 12 Server
First, let’s connect to the server via SSH:
This opens a secure shell session with full root access.
Step 2: Update the Operating System
Next, let’s update the package index and install the latest upgrades:
This reduces security risks and helps avoid dependency issues later.
Step 3: Install Docker Engine
Now we’ll install Docker using the official installation script:
Enable Docker to start automatically on boot and start it immediately:
Verify Docker is installed correctly:
Step 4: Install Docker Compose Plugin
We’ll install Docker Compose v2 as a plugin:
Then verify it’s working:
Step 5: Create the Excalidraw Project Directory
Let’s create a dedicated directory for Excalidraw:
Step 6: Create the Docker Compose File
Create the Docker Compose configuration:
Paste the following content:
What this configuration does
-
Pulls the official Excalidraw image
-
Runs Excalidraw in one Docker container
-
Exposes Excalidraw only on localhost (
127.0.0.1) for better security -
Automatically restarts the container after crashes or reboots
Step 7: Start Excalidraw
Now let’s start the container in detached mode:
Confirm the container is running:
Test Excalidraw locally:
If we get a 200 OK or 302 response, Excalidraw is running correctly.
Step 8: Install and Enable Nginx
Next, we’ll install Nginx:
Enable Nginx to start at boot and start it now:
Step 9: Configure Nginx Reverse Proxy (Using IP)
Create an Nginx site configuration file:
nano /etc/nginx/sites-available/excalidraw
Paste the following configuration:
Step 10: Enable the Nginx Site
Enable the site by creating a symbolic link:
Test the Nginx configuration:
Reload Nginx to apply changes:
Step 11: Access Excalidraw via IP
Finally, open a browser and visit:
We should now see Excalidraw running successfully.
Conclusion
We’ve successfully installed Excalidraw on Debian 12 using Docker, and exposed it publicly using Nginx reverse proxy, without needing a domain name.
This setup is:
-
lightweight
-
secure (Excalidraw only listens on localhost)
-
easy to manage (Docker auto restart)
If we want to secure the site later, we can add SSL using Let’s Encrypt. But for an IP-based setup, HTTP is enough for basic access.