Hosting Excalidraw Real-Time Whiteboarding on Rocky Linux 8
This tutorial guides you through the process of hosting Excalidraw, a real-time collaborative whiteboarding tool, on Rocky Linux 8. Excalidraw allows users to sketch diagrams and collaborate visually over the web.
rocky linuxExcalidraw
Small
VPS
2
vCPU
4 GB
Memory
40 GB
NVMe Disk
2048 GB
Traffic
10.90€
/month
* Up to 12GB RAM, 120GB NVMe Disk Space and 1Gbit/s Network Speed
#### Prerequisites
Before you begin, ensure you have:
- A server running Rocky Linux 8 (This guide is tested with Rocky Linux 8)
- Docker installed on your server
- A user account with sudo privileges
- Basic familiarity with the command line
#### Step 1: Install Docker on Rocky Linux 8
Ensure Docker is installed and running on your system. If not installed, follow these steps:
```bash
sudo dnf update
sudo dnf install dnf-plugins-core
sudo dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io
sudo systemctl start docker
sudo systemctl enable docker
```
#### Step 2: Set Up Excalidraw with Docker
Create a directory for Excalidraw and navigate into it:
```bash
mkdir excalidraw
cd excalidraw
```
Create a Docker Compose file `docker-compose.yml` for Excalidraw:
```yaml
version: '3'
services:
excalidraw:
image: excalidraw/excalidraw
container_name: excalidraw
ports:
- "3000:3000"
restart: always
```
Save and close the file.
#### Step 3: Start Excalidraw Container
Start the Excalidraw container using Docker Compose:
```bash
sudo docker-compose up -d
```
#### Step 4: Access Excalidraw
Open your web browser and navigate to your server's IP address or domain followed by port `3000` (e.g., `http://your_server_ip:3000`). You should see the Excalidraw interface.
#### Step 5: Optional - Configure Reverse Proxy (Nginx)
To access Excalidraw using a domain name and secure it with SSL, set up an Nginx reverse proxy. Create an Nginx server block configuration file:
```bash
sudo nano /etc/nginx/conf.d/excalidraw.conf
```
Add the following configuration (adjust domain and paths as necessary):
```nginx
server {
listen 80;
server_name excalidraw.example.com;
location / {
proxy_pass http://localhost:3000;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $http_host;
proxy_set_header X-NginX-Proxy true;
proxy_redirect off;
}
}
```
Save and close the file. Test Nginx configuration:
```bash
sudo nginx -t
sudo systemctl restart nginx
```
#### Step 6: Secure Excalidraw (Optional)
Secure your Excalidraw instance by configuring firewalls (e.g., UFW) and implementing SSL/TLS certificates if needed.
#### Conclusion
You have successfully hosted Excalidraw on Rocky Linux 8. Collaborate visually with others in real-time using this powerful whiteboarding tool.
**Additional Resources:**
- **Excalidraw GitHub Repository:** [https://github.com/excalidraw/excalidraw](https://github.com/excalidraw/excalidraw)
- **Docker Documentation:** [https://docs.docker.com/](https://docs.docker.com/)
- **Rocky Linux Documentation:** [https://docs.rockylinux.org/](https://docs.rockylinux.org/)