Overview
Discover what makes BinPastes powerful
BinPastes is a lightweight, self‑hosted pastebin written in **Java** that prioritizes developer simplicity and security. At its core, the application exposes a RESTful API for creating, retrieving, updating, and deleting paste objects while offering client‑side encryption to keep content confidential even if the server is compromised. The service is packaged as a single executable JAR (`binpastes.jar`), eliminating the need for complex build tools or container orchestration when deploying in a traditional environment.
Full‑text search & note overview
Expiry & visibility control
Client‑side encryption
Dark mode & responsive UI
Overview
BinPastes is a lightweight, self‑hosted pastebin written in Java that prioritizes developer simplicity and security. At its core, the application exposes a RESTful API for creating, retrieving, updating, and deleting paste objects while offering client‑side encryption to keep content confidential even if the server is compromised. The service is packaged as a single executable JAR (binpastes.jar), eliminating the need for complex build tools or container orchestration when deploying in a traditional environment.
Key Features
- Full‑text search & note overview – Indexes paste content using the underlying database full‑text capabilities, allowing quick retrieval of related notes.
- Expiry & visibility control – Pasts can be configured to expire after a set duration or remain permanent; exposure levels (public, private, unlisted) are managed via simple configuration flags.
- Client‑side encryption – Content is encrypted in the browser before transmission, ensuring zero knowledge on the server side.
- Dark mode & responsive UI – A minimal front‑end built with vanilla JavaScript and CSS provides a clean user experience without external dependencies.
Technical Stack
- Language & Framework – Java 21 with Spring Boot, leveraging Spring MVC for routing and Spring Data JPA for persistence.
- Database – MySQL 8 is the default datastore, accessed via JDBC and configured through
application-mysql.properties. The schema is auto‑generated by JPA, with optional Flyway migrations for advanced setups. - Build Tool – Maven (
./mvnw) compiles the project and packages it into a fat JAR; profiles allow switching between database backends. - Deployment – The binary can run on any platform that supports Java 21+, requiring only a JDK installation and the MySQL JDBC driver bundled inside the JAR.
Deployment & Infrastructure
BinPastes is intentionally minimalistic: a single binary, a properties file, and the database. This makes it ideal for Docker containers, Kubernetes pods, or even lightweight VMs. Because the application is stateless beyond database persistence, horizontal scaling can be achieved by spinning up multiple instances behind a load balancer. The use of MySQL 8 ensures ACID compliance for paste operations, while the optional mysql.host and credentials are configurable via environment variables or a separate properties file.
Integration & Extensibility
While the core application focuses on paste storage, it exposes a clean REST API that can be consumed by external tooling. Developers can hook into the lifecycle events (creation, deletion) using Spring’s event system or by extending the service layer. The client‑side encryption logic is implemented in JavaScript, allowing developers to reuse or adapt the algorithm for other applications. Additionally, the front‑end can be swapped out with a custom SPA without affecting the backend, as all data interactions are performed over HTTP.
Developer Experience
Configuration is straightforward: copy application-mysql.properties, set the MySQL parameters, and launch with java -Dspring.profiles.active=mysql -jar binpastes.jar. The documentation is concise, with clear build and run instructions. Community support is modest but active; issues are tracked on GitHub, and the codebase follows standard Maven conventions. Licensing under Apache 2.0 removes any commercial restrictions, making it suitable for both open‑source and proprietary projects.
Use Cases
- Internal knowledge bases – Teams can host a private pastebin for code snippets, logs, or troubleshooting notes.
- CI/CD pipelines – Automated scripts can post build artifacts or logs to a self‑hosted instance, leveraging the API for programmatic access.
- Educational tools – Instructors can provide a secure, self‑hosted platform for students to share code snippets during labs.
- Security research – The client‑side encryption feature allows researchers to test zero‑knowledge data flows in a controlled environment.
Advantages
BinPastes offers a compelling mix of simplicity, security, and performance. Compared to heavier Node.js or PHP pastebins, the Java/Spring stack delivers superior runtime efficiency and built‑in thread safety. The single‑binary deployment model reduces operational overhead, while the MySQL backend ensures reliable persistence without a NoSQL migration. Licensing freedom and minimal dependencies make it an attractive choice for developers who need a reliable, self‑hosted paste service without the bloat of larger frameworks.
Open SourceReady to get started?
Join the community and start self-hosting BinPastes today
Related Apps in other
Immich
Self‑hosted photo and video manager
Syncthing
Peer‑to‑peer file sync, no central server
Strapi
Open-source headless CMS for modern developers
reveal.js
Create stunning web‑based presentations with HTML, CSS and JavaScript
Stirling-PDF
Local web PDF editor with split, merge, convert and more
MinIO
Fast, S3-compatible object storage for AI and analytics
Weekly Views
Repository Health
Information
Explore More Apps
GoAccess
Real‑time web log analytics in the terminal or browser
Flatnotes
Distraction‑free markdown notes, no database required
Coral
Open‑source, AI‑powered commenting for safer conversations
Spectrum 2
Cross‑network instant messaging for self‑hosted users
InvenioRDM
Open-source research data repository platform
RomM
Self-hosted ROM manager with metadata enrichment and browser play
