MCPSERV.CLUB
PrivateBin

PrivateBin

Self-Hosted

Secure, client‑side encrypted pastebin for self‑hosted use

Active(100)
7.7kstars
0views
Updated 3 days ago
PrivateBin screenshot

Overview

Discover what makes PrivateBin powerful

PrivateBin is a lightweight, client‑side encrypted paste service that gives server administrators full control while guaranteeing zero knowledge of the stored content. Every paste is encrypted in the browser using **AES‑256** in *Galois/Counter Mode* (GCM), with the encryption key derived from a per‑paste secret that is embedded in the URL. The server merely stores an opaque blob and the metadata required for expiration or discussion; it cannot decrypt or inspect the payload. This architecture makes PrivateBin an attractive choice for environments where data privacy, compliance, and plausible deniability are paramount.

Zero‑Knowledge Storage

Password Protection

Expiration Policies

Discussion Threads

Overview

PrivateBin is a lightweight, client‑side encrypted paste service that gives server administrators full control while guaranteeing zero knowledge of the stored content. Every paste is encrypted in the browser using AES‑256 in Galois/Counter Mode (GCM), with the encryption key derived from a per‑paste secret that is embedded in the URL. The server merely stores an opaque blob and the metadata required for expiration or discussion; it cannot decrypt or inspect the payload. This architecture makes PrivateBin an attractive choice for environments where data privacy, compliance, and plausible deniability are paramount.

Architecture & Technical Stack

The core of PrivateBin is written in PHP (≥7.3) and runs on any LAMP stack or modern PHP‑ready web server such as Apache, Nginx, or Caddy. The front‑end is a single‑page application built with vanilla JavaScript and lightweight libraries: prettify.js for syntax highlighting, a minimal Markdown parser for rich pastes, and an optional file‑upload module that streams data to the server. The database layer is intentionally agnostic; the default implementation uses SQLite for simplicity, but any SQL‑compliant database (MySQL/MariaDB, PostgreSQL) can be configured via the config.php file. PrivateBin exposes a JSON‑based REST API for creating, retrieving, and deleting pastes, which is ideal for automation or integration with CI/CD pipelines.

Core Capabilities

  • Zero‑Knowledge Storage – All data is encrypted client‑side; the server only persists a base64‑encoded ciphertext and a short metadata record.
  • Password Protection – Optional passphrase support adds an extra layer of security; the derived key is never transmitted to the server.
  • Expiration Policies – Pastes can be set to expire after a fixed time, on first read (“burn after reading”), or never (forever). The expiration is enforced by a cron job or background worker.
  • Discussion Threads – Anonymous chat can be enabled, with optional nicknames and identicons. All messages are also encrypted client‑side.
  • File Uploads – Binary files can be uploaded and stored as base64 blobs, still encrypted with the paste key.
  • API & Webhooks – The REST API supports CRUD operations; webhook endpoints can be configured to trigger on paste creation or deletion, enabling automated workflows.

Deployment & Infrastructure

PrivateBin is intentionally minimalistic to ease deployment. A single PHP file set plus the config.php and optional database are sufficient for a bare‑bones instance. For production, it is recommended to serve over HTTPS with HSTS and optionally DANE/DNSSEC for maximum trust. The application scales horizontally by sharing the same database; however, due to its stateless nature, a load balancer can route requests to multiple PHP workers without session affinity. Containerization is straightforward: the official Docker image exposes a ready‑to‑use container that mounts a volume for persistence, making it suitable for Kubernetes or Docker Compose setups.

Integration & Extensibility

The codebase is designed with extensibility in mind. Plugin hooks allow developers to inject custom logic at key points: before saving a paste, after rendering, or during API requests. Themes can be swapped by replacing the CSS/JS bundles, and the Markdown engine is pluggable. Because the API follows REST conventions, third‑party tools—such as IDE extensions, Slack bots, or CI systems—can interact with PrivateBin without modifying the core. Webhooks can notify external services when a paste is created or deleted, enabling audit trails or automated archival.

Developer Experience

Configuration is centralized in a single config.php file, with clear comments and defaults. The documentation covers setup, security hardening, and API usage in depth, and the community actively maintains a GitHub issue tracker for bug reports and feature requests. The project’s license (GPL‑3.0) ensures that any modifications remain open source, fostering a healthy ecosystem of forks and extensions.

Use Cases

  • Secure Code Snippets – Developers can share encrypted snippets internally without exposing them to external paste services.
  • Compliance‑Friendly Logging – Organizations can log configuration files or error dumps in an encrypted form, retaining the ability to purge data on demand.
  • Incident Response – Security teams can post encrypted evidence that only authorized personnel can decrypt, while the server remains unaware of the content.
  • CI/CD Artifacts – Automated pipelines can upload build logs or test results to a PrivateBin instance and embed the link in notifications, ensuring confidentiality.

Advantages Over Alternatives

  • Zero Knowledge – Unlike self‑hosted Pastebin alternatives that store plaintext, PrivateBin guarantees the server cannot read user data.
  • Simplicity & Low Footprint – A single PHP file and optional SQLite database mean minimal operational overhead.
  • Open‑Source & Extensible – GPL licensing and a plugin architecture encourage community contributions and custom integrations.
  • Performance – Client‑side encryption offloads CPU from the server; only lightweight JSON processing is required on the backend.
  • Security Focus – Built‑in HTTPS enforcement, HSTS support, and optional DANE/DNSSEC make it suitable for high‑security environments.

PrivateBin delivers a secure, developer‑friendly paste service that balances minimalism with powerful features. Its client‑side encryption model, flexible API, and straightforward deployment make it an ideal choice for teams that need privacy, compliance, and control over their shared data.

Open SourceReady to get started?

Join the community and start self-hosting PrivateBin today

Weekly Views

Loading...
Support Us
Most Popular

Infrastructure Supporter

$5/month

Keep our servers running and help us maintain the best directory for developers

Repository Health

Loading health data...

Information

Category
other
License
NOASSERTION
Stars
7.7k
Technical Specs
Pricing
Open Source
Database
SQLite
Docker
Official
Min RAM
256MB
Min Storage
100MB
Supported OS
LinuxWindowsmacOSBSDDocker
Author
PrivateBin
PrivateBin
Last Updated
3 days ago