Getting Started
Welcome to D2 Storage, a lightweight, self-hosted, proxy asset storage server designed to sit securely in front of Cloudinary. D2 Storage provides automatic namespace segregation, origin CORS validations, and api-key client protections to keep your root Cloudinary credentials completely hidden.
Why D2 Storage and not Cloudinary directly?
This is the most common question. Here is the honest answer:
Raw Cloudinary problemD2 Storage solution
Your API Secret must stay server-side — you cannot use it safely from a browser or mobile appD2 issues per-project bearer tokens that are safe to embed in any client app
One global bucket — all your projects share the same Cloudinary namespaceEvery project gets its own isolated root folder under
dreambit/your-root/No origin restriction — any server that gets your key can upload to your accountPer-project CORS whitelist — only your approved origins are allowed to upload
Re-reading Cloudinary docs and re-wiring the SDK for every new project takes timeOnce deployed, every new project is just
POST /api/upload with a token — done in 2 minutesExplaining Cloudinary to an AI assistant requires extra context every timeBuilt-in AI Integration Copilot — copy the system prompt, paste into any LLM, get working code instantly
Open Source & Creator
D2 Storage is open source and built by Dhairya Darji as part of the TheDreamBitLabs ecosystem — a collection of tiny, self-hostable developer tools that remove repetitive setup from every project. Clone the repo, add your .env.local, and deploy it on your own infrastructure.