Install PasteProof
Run your own PasteProof backend on Cloudflare Workers. Perfect for individuals who want full control over their data.
PasteProof is licensed under the Business Source License 1.1. Individual, non-commercial use is always permitted. Commercial use requires a license. The license will change to Apache License 2.0 on January 1, 2029. See the full license for details.
What is Self-Hosting?
Self-hosting PasteProof allows you to run your own backend infrastructure instead of using the hosted service at api.pasteproof.com. This gives you:
- Full control over your data and privacy
- No dependency on external services
- Custom configuration and patterns
- Free to run on Cloudflare Workers (within limits)
Prerequisites
- Node.js 18+Install from nodejs.org
- Package Managernpm, pnpm, or yarn
- Cloudflare AccountFree account at cloudflare.com
- Wrangler CLIInstall globally:
npm install -g wrangler
Installation Steps
Clone the Repository
Clone the PasteProof extension repository from GitHub:
Install Dependencies
Install the required packages:
Create Cloudflare KV Namespaces
Create the required KV namespaces for data storage:
Also create preview namespaces for local development:
Configure wrangler.toml
Update wrangler.toml with the KV namespace IDs from step 3. The file should look like:
[[kv_namespaces]] binding = "WHITELIST_STORE" id = "your-namespace-id-here" [[kv_namespaces]] binding = "PATTERNS_STORE" id = "your-namespace-id-here" # ... etc
Generate API Key
Generate a secure API key for authentication:
Add it to wrangler.toml:
[vars] API_KEY = "your-generated-api-key-here"
Authenticate with Cloudflare
Log in to your Cloudflare account:
Running Locally
Test your backend locally before deploying:
The worker will be available at http://localhost:8787
Test the health endpoint:
Deploy to Cloudflare
Deploy your worker to Cloudflare:
After deployment, you'll receive a URL like:
Verify it's working:
Using with the Extension
To use your self-hosted backend with the PasteProof extension:
- Clone the extension repository:
git clone https://github.com/007jedgar/pasteproof.git - Navigate to the extension directory:
cd pasteproof - Create a
.envfile in the root:
VITE_SELF_HOSTED_API_URL=https://pasteproof-backend.your-subdomain.workers.dev
- Build the extension:
pnpm build - Load the built extension from
.output/chrome-mv3directory
Note: You'll need to sign in/create an account on the production site first to get an API key, then use that same API key with your self-hosted backend.
Features
✅ Single-User Authentication
API key-based authentication for secure access
✅ Whitelist Management
Manage domains where scanning is disabled
✅ Custom Patterns
Create custom regex patterns for detection
✅ AI-Powered Detection
Context-aware PII detection using Cloudflare Workers AI
✅ Analytics & Logs
Track detections and view audit logs
✅ No Database Required
Uses Cloudflare KV for storage (no database setup needed)
Limitations
- Single-user only (no multi-user support)
- Data stored in Cloudflare KV (subject to KV limits)
- Rate limiting is disabled (can be added if needed)
- No persistent database (data is stored in KV with size limits)