Last Updated November 27, 2025 - Production/Stable v1.1.0
Tech Stack: React 19.2.0 | Vite 7.2.4 | TypeScript 5.9.3 | Cloudflare Workers + Zero Trust
This Docker image provides a modern, full-featured web application for managing Cloudflare D1 databases with enterprise-grade authentication via Cloudflare Access (Zero Trust). Run D1 Database Manager in Docker for development, testing, or self-hosted deployments.
Live Demo • Wiki Documentation • Docker Hub • Changelog • Release Article
- Create, rename, delete, download, optimize, and upload databases
- Bulk operations with multi-select
- Upload/import SQL files
- NEW ✨Job history tracking - Track all database operations with detailed history
- Visual schema designer
- Clone, export (SQL/CSV), and bulk operations
- Column management (add, modify, rename, delete)
- Foreign key dependency analysis
- SQL editor with syntax highlighting
- Query history and saved queries
- CSV export
- Row-Level Filtering - Type-aware filters with OR logic, BETWEEN, IN operators
- Foreign Key Visualizer - Interactive graph with add/modify/delete constraints
- ER Diagram - Visual schema documentation with PNG/SVG/JSON export
- Cascade Impact Simulator - Preview DELETE cascades before execution
- Undo/Rollback - Restore dropped tables, columns, or deleted rows
- FTS5 Full-Text Search - Create and manage virtual tables
- Constraint Validator - Detect orphans and integrity violations
- Index Analyzer - Smart index recommendations
- NEW ✨Time Travel - View bookmarks, checkpoint history, and CLI restore commands
- NEW ✨Read Replication - Enable/disable global read replicas with D1 Sessions API info
- Dark/Light/System themes
- Responsive design
📚 Full documentation: Wiki
- Node.js 18+
- Cloudflare account (for production)
git clone https://github.com/neverinfamous/d1-manager.gitcd d1-managernpm installcp .env.example .envStart the servers (2 terminals):
Terminal 1 - Frontend:
npm run devTerminal 2 - Worker API:
npx wrangler dev --config wrangler.dev.toml --localOpen http://localhost:5173 - no auth required, mock data included.
npx wrangler loginnpx wrangler d1 create d1-manager-metadatanpx wrangler d1 execute d1-manager-metadata --remote --file=worker/schema.sqlcp wrangler.toml.example wrangler.tomlEdit wrangler.toml with your database_id from step 2.
- Go to Cloudflare Zero Trust
- Configure authentication (GitHub OAuth, etc.)
- Create an Access Application for your domain
- Copy the Application Audience (AUD) tag
- Go to Cloudflare API Tokens
- Create Custom Token with Account → D1 → Edit permission
npx wrangler secret put ACCOUNT_IDnpx wrangler secret put API_KEYnpx wrangler secret put TEAM_DOMAINnpx wrangler secret put POLICY_AUDnpm run buildnpx wrangler deployRun this after pulling updates to add new tables (safe to run multiple times):
npx wrangler d1 execute d1-manager-metadata --remote --file=worker/schema.sqlgit pull origin mainnpm installnpm run buildnpx wrangler deploydocker pull writenotenow/d1-manager:latestdocker run -d -p 8080:8080 \
-e ACCOUNT_ID=your_account_id \
-e API_KEY=your_api_token \
-e TEAM_DOMAIN=https://yourteam.cloudflareaccess.com \
-e POLICY_AUD=your_aud_tag \
writenotenow/d1-manager:latestSee DOCKER_README.md for complete Docker instructions.
| Endpoint | Description |
|---|---|
GET /api/databases |
List databases |
POST /api/databases |
Create database |
DELETE /api/databases/:dbId |
Delete database |
PUT /api/databases/:dbId/replication |
Set read replication mode |
GET /api/tables/:dbId/list |
List tables |
POST /api/query/:dbId/execute |
Execute SQL |
📚 Full API docs: Wiki - API Reference
| Frontend | Backend |
|---|---|
| React 19.2.0 | Cloudflare Workers |
| TypeScript 5.9.3 | Cloudflare D1 |
| Vite 7.1.12 | Cloudflare Access |
| Tailwind CSS + shadcn/ui |
"Failed to list databases"
- Verify
ACCOUNT_IDis correct - Ensure API token has D1 Edit permission (not just Read)
Authentication loop
- Check
TEAM_DOMAINincludeshttps:// - Verify
POLICY_AUDmatches your Access application
📚 More solutions: Wiki - Troubleshooting
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature) - Commit changes (
git commit -m 'Add amazing feature') - Push to branch (
git push origin feature/amazing-feature) - Open a Pull Request
📚 Guidelines: Wiki - Contributing Guide
MIT License - see LICENSE for details.
- 🐛 Bug Reports: GitHub Issues
- 💡 Feature Requests: GitHub Discussions
- 📧 Email: admin@adamic.tech
Made with ❤️ for the Cloudflare community