A lightweight personal website built with Cloudflare Workers that allows anyone to send you PGP-encrypted emails without revealing your email address or requiring the sender to configure PGP locally.
- Client-side PGP Auto-Lookup: Queries
keys.openpgp.orgautomatically when a user enters their email address. - Server-side PGP Encryption: Encrypts incoming messages with your public key in the Cloudflare Worker edge runtime.
- MIME PGP Key Attachment: Automatically attaches the sender's PGP key as
sender-key.asc(application/pgp-keys) so your email client (e.g. Proton Mail) can import it easily. - Zero-Cost Edge Hosting: Deployed on Cloudflare Workers' free tier.
-
Install dependencies:
npm install
-
Run local development server:
npm run dev
-
Open
http://localhost:8787in your browser.
Run the following commands using Wrangler CLI to set your backend secrets in Cloudflare:
# Set your destination email address
npx wrangler secret put RECIPIENT_EMAIL
# Set your ASCII-armored PGP Public Key
npx wrangler secret put RECIPIENT_PUBLIC_KEY
# Set your Resend API Key
npx wrangler secret put RESEND_API_KEY
# Set the "From" email address for outgoing emails
npx wrangler secret put FROM_EMAILTo deploy directly from your local terminal:
npx wrangler deploy- Go to your GitHub Repository Settings -> Secrets and variables -> Actions.
- Add a new Repository Secret:
- Name:
CLOUDFLARE_API_TOKEN - Value: Create a Cloudflare API token with
Edit Cloudflare Workerspermissions from your Cloudflare Dashboard.
- Name:
- Any push to the
masterbranch will automatically build and deploy your site!