hqbase
Your team's email workspace. In your Cloudflare account.
What is it?
What it is
An open-source shared email workspace that runs in your Cloudflare account, keeping mail and credentials on your own infrastructure.
Why it exists
To give teams a collaborative email workspace while maintaining full control over data, avoiding reliance on third‑party SaaS providers.
Who should use it
Teams and organizations that need a shared email workspace, prefer self-hosting, want to keep mail and credentials in their own Cloudflare infrastructure, and are comfortable with TypeScript, Cloudflare Workers, and DevOps workflows.
Who should avoid it
Users looking for a fully managed SaaS email service, those unwilling to operate Cloudflare Workers or manage D1 databases, and those who prefer proprietary licensing.
How it works
A quick walkthrough in plain English
How hqbase works
Step 1 of 3
You interact with it
Open hqbase, send a request, or connect it to your stack.
Features
Advantages
- Complete privacy and control over mail and credentials
- No vendor lock-in beyond Cloudflare hosting
- Open-source (AGPL-3.0) with active community support
- Comprehensive feature set including shared inbox and audit trails
- Automated CI/CD pipeline with GitHub Actions
- Easy local development and preview capabilities
Disadvantages
- Requires significant technical expertise to set up properly
- Not a fully managed service - demands ongoing operational responsibility
- AGPL-3.0 license may impose copyleft restrictions for commercial use without contributing back
- Initial configuration involves multiple steps (database migration, seeding, environment variable setup)
- Dependent on Cloudflare ecosystem (Cloudflare Workers, Wrangler)
Installation
cloud
Deploy using the Cloudflare deploy button at https://deploy.workers.cloudflare.com/?url=https%3A%2F%2Fgithub.com%2FHQBase%2Fhqbase
native
pnpm install pnpm db:migrate:local pnpm db:seed:local pnpm dev
FAQ
What is HQBase and what infrastructure does it run on?
HQBase is an open-source shared email workspace for teams that runs in your Cloudflare account using Cloudflare Workers. It keeps your mail, application, and Cloudflare credentials in infrastructure you control, rather than on a third-party server.
How do I deploy HQBase to my Cloudflare account?
You can deploy HQBase to Cloudflare with a single click using the 'Deploy to Cloudflare' button in the README, which launches the official Cloudflare Workers deployment flow directly from the GitHub repository.
What license does HQBase use and are there any restrictions?
HQBase is licensed under the GNU Affero General Public License v3.0 only (AGPL-3.0). This means you can use, modify, and distribute it freely, but if you modify and publicly deploy it, you must make the source code of your modified version available under the same license.
How do I set up a local development environment for HQBase?
To develop locally, run 'pnpm install', then 'pnpm db:migrate:local' and optionally 'pnpm db:seed:local' to seed demo data. You must add 'BETTER_AUTH_SECRET' and 'HQBASE_LOCAL_SEED_PASSWORD' (8-128 characters) to '.dev.vars' before seeding. Start the app with 'pnpm dev' and access it at http://127.0.0.1:5173/.
How do I reset my local development database?
To reset local D1 data, run 'pnpm db:reset:local' followed by 'pnpm db:seed:local'. This is destructive and only affects your local database; it does not modify any deployed database.
What commands should I run to verify my changes before submitting a pull request?
Run 'pnpm check' to execute the full local quality gate and 'pnpm deploy:dry-run' to verify the deployment. If you modify 'wrangler.jsonc', run 'pnpm cf:typegen' to regenerate types. These same checks run automatically on pushes to the 'main' branch.
Featured in Videos
YouTube tutorials and walkthroughs for hqbase
Alternatives
Similar projects ranked by category, topics, and text overlap.