Zero-knowledge encrypted code sharing platform where your secrets stay secret
GhostPaste is a privacy-focused code sharing platform that ensures your code snippets remain completely private through client-side encryption. Unlike traditional code sharing services, our servers never have access to your plaintext content - everything is encrypted in your browser before being uploaded.
- π Zero-Knowledge Encryption - Your code is encrypted locally using AES-GCM before leaving your browser
- π€ No Account Required - Share code instantly without signing up
- βοΈ PIN-Protected Editing - Set a PIN to allow editing your snippets later
- β±οΈ Self-Expiring Content - Set snippets to auto-delete after a specified time
- ποΈ One-Time View - Create snippets that disappear after being viewed once
- π Version History - Track changes with automatic versioning
- π¨ Syntax Highlighting - Beautiful code display with CodeMirror 6
- π Dark/Light Mode - Easy on the eyes, day or night
- Visit ghostpaste.dev
- Paste or write your code
- Add multiple files if needed
- Set optional expiration or PIN
- Click "Create" and share the generated link
Simply open the shared link - the decryption key is in the URL fragment and never sent to our servers.
- Client-Side Encryption: All encryption/decryption happens in your browser using the Web Crypto API
- Zero-Knowledge: Servers only store encrypted blobs - we can't read your content even if we wanted to
- No Tracking: No analytics, no cookies, no user tracking
- Open Source: Verify our security claims by reviewing the code
- Framework: Next.js 15 with React
- Runtime: Cloudflare Workers (Edge)
- UI Components: shadcn/ui
- Code Editor: CodeMirror 6
- Encryption: Web Crypto API (AES-GCM)
- Storage: Cloudflare R2 with native bindings
Resource | Limit | Why? |
---|---|---|
File size | 500 KB | Covers 99% of code files |
Total size | 5 MB | Enough for ~10-20 typical files |
Files per paste | 20 | Keeps the UI responsive |
Versions kept | 50 | Balances history with storage |
- Node.js 20+
- npm or yarn
- Git
# Clone the repository
git clone https://github.com/nullcoder/ghostpaste.git
cd ghostpaste
# Install dependencies
npm install
# Start development server
npm run dev # Next.js development (hot reload)
# OR
npm run preview # Full Cloudflare Workers simulation
See our Local Development Guide for detailed setup instructions.
Create a wrangler.toml
file:
name = "ghostpaste"
compatibility_date = "2024-12-01"
[[r2_buckets]]
binding = "GHOSTPASTE_BUCKET"
bucket_name = "ghostpaste-bucket"
[vars]
NEXT_PUBLIC_APP_URL = "https://ghostpaste.dev"
For local development secrets, create .dev.vars
:
# Any additional secrets go here
# Build for Cloudflare Workers
npm run build
# Deploy to production
npm run deploy
- Technical Specification - Detailed architecture and implementation details
- Encryption Architecture - In-depth encryption documentation
- Security Best Practices - Security guidelines for developers and users
- AI Development Guide - Guidelines for AI-assisted development
- Implementation TODO - Development roadmap and progress tracking
- Contributing Guide - How to contribute to the project
- Local Development - Setting up your development environment
We welcome contributions! Please see our Contributing Guidelines for detailed information on how to contribute to this project.
- Fork the repository
- Create a feature branch (
git checkout -b feature/amazing-feature
) - Commit your changes (
git commit -m 'feat: add amazing feature'
) - Push to the branch (
git push origin feature/amazing-feature
) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
- Built with Next.js
- UI components from shadcn/ui
- Code editing powered by CodeMirror
- Hosted on Cloudflare
Made with β€οΈ by Thanan Traiongthawon