DesHost lets you self-host your own Desmos graph collection. View, share, and compare your graphs easily from your own Vercel deployment.
Your graphs are stored securely in an encrypted data.enc file (so they remain private and portable), while still allowing you to view other people’s shared graphs by hash.
-
📂 Self-hosted Desmos gallery: view all your graphs, even if Desmos is down.
-
🔐 Encrypted storage: graphs are stored locally in
data.encusing AES-256 encryption. -
🔗 Share by link: open any graph by hash:
https://your-vercel-app.vercel.app/#<your_hash> https://your-vercel-app.vercel.app/?hash=<any_hash> -
🔄 Graph diffing: compare two graphs side-by-side or see changes between versions:
https://your-vercel-app.vercel.app/diff.html?hash1=<hash1>&hash2=<hash2>
Example: My hosted version deshost.vercel.app. Try it out!
- You export your Desmos graphs using a script.
- They’re saved as
data.json, then encrypted intodata.enc. - Your hosted app decrypts this file at runtime using a password you define.
- The app serves your saved graphs and can open or compare any graph hash.
Click Fork → Create fork
# Clone the repo
git clone https://github.com/<your-username>/deshost.git
cd deshostDelete the data.enc file.
Install dependencies and start the local server:
npm install
npm run startNow visit http://localhost:3000 to open your local DesHost instance.
Run this Desmos console script to export all your graphs: 👉 Download Data Script (Gist)
If you want to export only a specific set of desmos graphs, modify t in line 1 to be the list of those hashes.
It will automatically download a file called data.json.
Move data.json into your project’s public/ folder:
/public/data.json
Run the provided script to encrypt your graphs:
node create-encrypted.jsHere’s the encryption script:
Replace {password_for_data.enc} with your own password for generating data.enc
// create-encrypted.js
const crypto = require('crypto');
const fs = require('fs');
const password = '{password_for_data.enc}';
const data = require('./public/data.json');
const iv = crypto.randomBytes(16);
const key = crypto.scryptSync(password, 'salt', 32);
const cipher = crypto.createCipheriv('aes-256-cbc', key, iv);
const encrypted = Buffer.concat([
iv,
cipher.update(JSON.stringify(data)),
cipher.final()
]);
fs.writeFileSync('public/data.enc', encrypted);
console.log('New data.enc created');This generates public/data.enc.
You can now remove data.json or add it to .gitignore.
git add public/data.enc
git commit -m "Added encrypted graph data"
git pushYou can deploy directly from GitHub:
- Go to vercel.com/new
- Import your GitHub repo.
- Click Deploy.
After deployment, go to:
Vercel → Project → Settings → Environment Variables
Add:
DATA_DECRYPTION_PASSWORD = {password_for_data.enc}
This password must match the one you used in create-encrypted.js.
If your project uses Git LFS:
- Open your Vercel Project Settings → Git.
- Enable “Git LFS Support”.
- Redeploy.
Without this, Vercel will only have a 1 KB LFS pointer file instead of the full binary.
Once deployed, you’ll get a link like:
https://your-vercel-app.vercel.app
Use it to:
- View your own graphs
https://your-vercel-app.vercel.app/#<your_hash> - Open anyone’s graph
https://your-vercel-app.vercel.app/?hash=<other_hash> - View the previous version of a loaded graph
- Compare a graph with its previous version
- Compare any two versions
https://your-vercel-app.vercel.app/diff.html?hash1=<h1>&hash2=<h2>
My hosted version: deshost.vercel.app
Your graphs can be stored privately while still being browsable, backed up, and shareable. If Desmos is ever down, your graphs are safe and viewable from your own DesHost instance.