This repository provides a self-hosted stack for running Excalidraw with Docker containers. Storage of data is still in Firebase.
Before you begin, ensure you have met the following requirements:
- Docker installed on your system (Install Docker)
- Docker Compose installed on your system (Install Docker Compose)
- Available domain en subdomains
- SSL Certificates
- Webproxy (NginxProxyManager for example )
- Main Application:
https://exalidraw.my-own-domain.com -> DOCKER_HOST:3001
- Excalidraw Room:
https://exalidraw-ws.my-own-domain.com -> DOCKER_HOST:3002
- Excalidraw Room:
https://exalidraw-api.my-own-domain.com -> DOCKER_HOST:3003
- Main Application:
-
Clone this repository to your local machine:
git clone https://github.com/Nenodema/excalidraw-self-hosted-stack.git
-
Navigate to the repository directory:
cd excalidraw-self-hosted-stack
-
Modify the
.env
file and define the necessary environment variables for the Docker build:PUB_SRV_NAME=excalidraw.my-own-domain.com PUB_SRV_NAME_WS=excalidraw-ws.my-own-domain.com VITE_APP_BACKEND_V2_GET_URL=https://excalidraw-api.my-own-domain.com/api/v2/scenes/ VITE_APP_BACKEND_V2_POST_URL=https://excalidraw-api.my-own-domain.com/api/v2/scenes/ VITE_APP_WS_SERVER_URL=https://excalidraw-ws.my-own-domain.com/ REDIS_PASSWORD=StrongPasswordInHere
-
Run the following command to start the containers:
sudo docker-compose up -d
-
Access Excalidraw via a web browser:
- Main Application:
https://exalidraw.my-own-domain.com
- Excalidraw Room:
https://exalidraw-ws.my-own-domain.com
- Excalidraw API:
https://exalidraw-api.my-own-domain.com
- Main Application:
-
To stop the containers, run:
sudo docker-compose down
PUB_SRV_NAME
: Public server name for Excalidraw (used in Docker build).PUB_SRV_NAME_WS
: Public WebSocket server name for Excalidraw (used in Docker build).REDIS_PASSWORD
: Password for Redis authentication (used in Docker build).VITE_APP_BACKEND_V2_GET_URL
: API URL for fetching scenes.VITE_APP_BACKEND_V2_POST_URL
: API URL for posting scenes.VITE_APP_WS_SERVER_URL
: WebSocket server URL for Excalidraw.