How to Self-Host Excalidraw on a VPS (Complete Guide)
Excalidraw is a popular open-source virtual whiteboard tool that allows users to create diagrams and sketches collaboratively. Self-hosting Excalidraw on a Virtual Private Server (VPS) gives you complete control over your data and environment. This guide will walk you through the entire process of installing Excalidraw on a VPS using Docker.
Why Self-Host Excalidraw?
Self-hosting Excalidraw provides several benefits:
- Data Privacy: Keep your drawings private and secure.
- Customization: Modify the application according to your needs.
- Collaboration: Easily share links with your team without third-party limitations.
Choosing a VPS Provider
When selecting a VPS provider, consider factors such as performance, pricing, and ease of use. Hereโs a brief comparison of some popular VPS providers:
| Provider | Price per Month | Specs |
|---|---|---|
| Contabo VPS | 5.99 EUR | 4 CPU, 8 GB RAM, 100 GB SSD |
| Hetzner Cloud | 4.15 EUR | 2 CPU, 2 GB RAM, 20 GB SSD |
| DigitalOcean | 6 USD | 1 CPU, 1 GB RAM, 25 GB SSD |
| Vultr | 6 USD | 1 CPU, 1 GB RAM, 25 GB SSD |
| Linode (Akamai) | 5 USD | 1 CPU, 2 GB RAM, 50 GB SSD |
For detailed reviews and comparisons, check our full VPS comparison.
Recommended Providers
Considering performance and cost, Contabo VPS is a solid choice for this project. However, if you prefer a straightforward interface and high-speed connections, DigitalOcean and Vultr are also excellent options.
Setting Up Your VPS
- Select Your VPS Provider: Choose one from the list above and create an account.
- Provision Your VPS: Deploy a new instance with a suggested OS like Ubuntu 20.04 or later.
Accessing Your VPS
Once your VPS is up, access it using SSH. Open your terminal and type:
ssh root@your-vps-ip
Replace your-vps-ip with your actual VPS IP address. Youโll be prompted to enter your root password.
Installing Docker
- Update Your System:
apt update && apt upgrade -y
- Install Docker:
apt install -y docker.io
- Start Docker:
systemctl start docker
systemctl enable docker
- Install Docker Compose (optional, but recommended):
apt install -y docker-compose
Deploying Excalidraw
Now that Docker is set up, we can deploy Excalidraw.
- Create a Project Directory:
mkdir excalidraw
cd excalidraw
- Create a Docker Compose File:
Create a new file named docker-compose.yml:
version: '3'
services:
excalidraw:
image: excalidraw/excalidraw:latest
ports:
- "3000:8080"
environment:
- EXCALIDRAW_API_URL=https://excalidraw-api-server.herokuapp.com
- Start Excalidraw:
Run the following command to deploy Excalidraw:
docker-compose up -d
- Access Excalidraw:
Once the container is running, you can access Excalidraw by visiting:
http://your-vps-ip:3000
Configuring Excalidraw
At this point, Excalidraw is running, but you might want to tweak some settings. The EXCALIDRAW_API_URL can be changed to your own API server if you prefer, but the default should work for most use cases.
FAQs
1. Can I run Excalidraw without Docker?
Yes, it is possible to run Excalidraw without Docker by setting up the environment manually. This involves installing Node.js, Yarn, and cloning the repository from GitHub. However, using Docker simplifies the deployment process, making it ideal for most users.
2. Is Excalidraw secure when self-hosted?
Self-hosting Excalidraw ensures that your data remains under your control. However, security depends heavily on your VPS management. Always maintain updated software and consider implementing firewalls and access controls to safeguard your instance.
3. How can I back up my Excalidraw data?
Excalidraw doesnโt have a built-in database. Drawings can usually be exported as JSON files. It is advisable to periodically back up your exported files or the directory where your attached storage is configured if you modify the Docker setup to persist files.
Conclusion
Self-hosting Excalidraw on a VPS like Contabo or DigitalOcean is a practical choice for developers and teams that need a collaborative drawing tool while maintaining control over their data. By following this guide, youโll have Excalidraw up and running in no time. For more self-hosting resources, visit the r/selfhosted community or explore awesome-selfhosted. Enjoy your self-hosted drawing experience!