$100 Website Offer

Get your personal website + domain for just $100.

Limited Time Offer!

Claim Your Website Now

How to install Excalidraw in Linux?

let’s deploy a static Excalidraw embed under your cPanel hosting at:

Filesystem: /home/toolsdevopsschoo/public_html/excalidraw
URL:       https://tools.devopsschool.com/excalidraw/

This method needs no Node.js server running on cPanel (just static files). You’ll build locally on the server via SSH and copy the build output into public_html/excalidraw.


Step-by-Step (SSH)

0) Prereqs (one time)

# Log in over SSH, then check Node & npm
node -v
npm -v

If Node is missing or < 18, install with nvm:

# Install nvm (if not present)
curl -o- https://raw.githubusercontent.com/nvm-sh/nvm/v0.39.7/install.sh | bash
source ~/.bashrc  # or: source ~/.zshrc

# Install and use an LTS Node
nvm install --lts
nvm use --lts

1) Create a fresh React app (outside public_html)

cd ~
npm create vite@latest excali-static -- --template react
cd excali-static
npm install
npm install @excalidraw/excalidraw

2) Wire Excalidraw into the app

2.1 Replace src/App.jsx

// /home/toolsdevopsschoo/excali-static/src/App.jsx
import { useEffect, useRef } from "react";
import { Excalidraw } from "@excalidraw/excalidraw";

export default function App() {
  const wrap = useRef(null);

  useEffect(() => {
    document.body.style.margin = "0";
    if (wrap.current) wrap.current.style.height = "100vh";
  }, []);

  return (
    <div ref={wrap}>
      <Excalidraw />
    </div>
  );
}

(Keep the default src/main.jsx from Vite; no change needed.)

2.2 Set Vite base path so assets load from /excalidraw/

// /home/toolsdevopsschoo/excali-static/vite.config.js
import { defineConfig } from "vite";
import react from "@vitejs/plugin-react";

export default defineConfig({
  plugins: [react()],
  base: "/excalidraw/",   // IMPORTANT: site is served from /excalidraw/
});

3) Build for production

cd ~/excali-static
npm run build
# Output appears in: ~/excali-static/dist

4) Deploy to your web root

# Make/clean the target folder under public_html
mkdir -p /home/toolsdevopsschoo/public_html/excalidraw
rm -rf /home/toolsdevopsschoo/public_html/excalidraw/*

# Copy the built files
cp -r ~/excali-static/dist/* /home/toolsdevopsschoo/public_html/excalidraw/

Open: https://tools.devopsschool.com/excalidraw/ 🎉


5) (If you see missing icons/images) add excalidraw-assets

Newer versions usually handle assets automatically. If your browser console shows 404s for excalidraw-assets, do this:

mkdir -p /home/toolsdevopsschoo/public_html/excalidraw/excalidraw-assets
cp -r ~/excali-static/node_modules/@excalidraw/excalidraw/dist/excalidraw-assets/* \
      /home/toolsdevopsschoo/public_html/excalidraw/excalidraw-assets/

Reload the page.


6) Optional: add caching + security headers

Create /home/toolsdevopsschoo/public_html/excalidraw/.htaccess:

# Caching (safe defaults)
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/javascript "access plus 7 days"
  ExpiresByType text/css "access plus 7 days"
  ExpiresByType image/png "access plus 30 days"
  ExpiresByType image/svg+xml "access plus 30 days"
</IfModule>

# Security headers
<IfModule mod_headers.c>
  Header set X-Content-Type-Options "nosniff"
  Header set Referrer-Policy "no-referrer-when-downgrade"
  Header set X-Frame-Options "SAMEORIGIN"
</IfModule>

If your host uses aggressive caching, remember to re-upload after each new build.


7) Update flow (next time you change something)

cd ~/excali-static
npm run build
rm -rf /home/toolsdevopsschoo/public_html/excalidraw/*
cp -r dist/* /home/toolsdevopsschoo/public_html/excalidraw/

Notes & Tips

  • This approach is static (no collaboration server). It’s perfect for shared cPanel hosting.
  • If you must run the full Excalidraw app from the official repo (Next.js), your cPanel plan must support Node.js/Passenger apps. If you have that, say the word and I’ll give you those steps too.
  • Always set base: "/excalidraw/" in vite.config.js since the site is served from a subpath.

If you want, I can also add toolbar theming (light/dark), export buttons, or a save-to-JSON flow in this static build—just say the word and I’ll extend App.jsx.

Related Posts

Smarter Medical Travel Planning with MyMedicPlus Healthcare Assistance

Navigating the international medical landscape can often feel like an overwhelming, uphill battle for individuals seeking specialized clinical treatment. Fortunately, the emergence of advanced digital health ecosystems…

Read More

Smarter Hospital Selection With MyHospitalNow and Cost Transparency

Introduction Imagine sitting at your kitchen table late at night, staring at a medical diagnosis or a recommendation for an upcoming surgery. Your mind immediately floods with…

Read More

Accelerating Your Engineering Impact with the Certified FinOps Professional Certification

Introduction In the rapidly evolving landscape of cloud-native infrastructure, managing cloud expenditure has become as critical as maintaining system uptime. The Certified FinOps Professional certification offers a…

Read More

Step-by-Step Tutorial: Reset WordPress Admin Password Using WP-CLI Commands

What is WP-CLI? WP-CLI is the command-line tool for managing WordPress without opening the browser. You can manage users, plugins, themes, database, cache, posts, and even reset…

Read More

Understanding the Value of the Certified FinOps Manager for DevOps Professionals

Introduction In the current landscape of cloud-native infrastructure, managing costs has transitioned from a back-office accounting task to a core engineering responsibility. The Certified FinOps Manager credential…

Read More

Best Travel Forum to Ask Questions & Plan Trips | HolidayLandmark

The Shift from Search Bars to Community Chats Imagine planning a two-week dream vacation to Tokyo. You type your query into a traditional search engine, and you…

Read More
Subscribe
Notify of
guest
0 Comments
Oldest
Newest Most Voted
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x