MicroBin is a lightweight, self-hosted paste bin and file-sharing platform designed for secure, temporary sharing of text snippets and files. It targets developers, privacy-conscious individuals, and teams who need to share sensitive data—like config files, logs, or large attachments—without relying on third-party services. With E2E encryption, automatic expiry, and no account system, it eliminates the risks of cloud-based pastebins while remaining simple to deploy.
Built in Rust using Actix Web and Askama, MicroBin runs as a single binary with SQLite or JSON backend support. It offers Docker-based deployment, command-line installation via Cargo, and supports custom CSS/JS for branding. The app is designed for low-resource environments and can be deployed in under five minutes using the provided Docker script or manual installation.
What You Get
- End-to-End Encryption - Both server-side and client-side E2E encryption ensures only those with the password can decrypt uploaded text or files, keeping sensitive data like API keys or passwords secure.
- File Uploads with Raw Serving - Users can upload any file (images, ZIPs, configs) and serve them directly via raw URLs (e.g., server.com/raw/pig-dog-cat) for use in automation or testing.
- URL Shortening & Redirection - MicroBin acts as a URL shortener, allowing users to generate short, memorable links that redirect to any external URL.
- Animal-Based Identifiers - Uploads use 64 unique animal names (e.g., pig-dog-cat) instead of random hashes, making links easier to share and remember.
- Multi-File Upload Support - Users can upload multiple files in a single upload, each with its own encrypted link and expiration settings.
- Automatic Expiry & View Limits - Uploads can be configured to auto-delete after a set time or after a specified number of views, ensuring sensitive content doesn’t persist indefinitely.
- QR Code Generation - Each upload generates a QR code for one-tap sharing from mobile devices without copying long URLs.
- Custom Styling with Vanilla JS - Supports full UI customization using minimal CSS (water.css) and vanilla JavaScript, with built-in dark mode and no external dependencies.
- SQLite and JSON Database Support - Flexible storage options allow deployment on low-resource systems without requiring a full SQL server.
- Environment-Configurable Secrets - Secrets and configurations can be loaded from files using the file:// prefix, enabling secure deployment in Docker or Kubernetes environments.
Common Use Cases
- Developers sharing config files - A developer uses MicroBin to upload a server config file, generates a raw URL, and shares it with a teammate for debugging without exposing it to public GitHub.
- Remote teams sharing large files - A freelance designer sends a 500MB video to a client via MicroBin instead of Slack or email, setting it to expire after one view.
- Privacy-conscious users sharing secrets - A user encrypts and uploads their Wi-Fi password or API key, shares the link with a family member, and ensures it auto-deletes after being read once.
- Businesses running private file postboxes - A company deploys MicroBin on their internal domain to let clients upload sensitive documents without seeing other submissions or needing an account.
Under The Hood
Architecture
- Monolithic structure with tightly coupled endpoints, data access, and business logic in a single directory, lacking clear layering or separation of concerns
- Global state managed via mutex-protected shared data structures, introducing contention and violating encapsulation principles
- Database layer hardcoded to file-based I/O with no abstraction, lacking transactions or robust concurrency controls
- HTTP handlers directly manipulate domain entities and filesystem paths, mixing routing, authorization, and data operations without service or repository patterns
- Configuration exposed as a global static reference, hindering testability and violating dependency inversion
Tech Stack
- Rust backend powered by Actix-web with embedded static assets and server-side templating via Askama
- Persistent storage implemented through SQLite with migration support and bundled database engine
- TLS secured via optional OpenSSL or rustls, with Dockerized deployment using minimal base images and environment-driven configuration
- Build system leverages Cargo features for optional enhancements like compression and syntax highlighting
- CI/CD pipeline supports automated image publishing and orchestration with volume-backed data persistence
Code Quality
- Strong type safety enforced through Rust’s type system, including custom wrappers for sensitive data and hashid-based identifiers
- Consistent use of Result-based error handling with utility functions, though custom error types are absent
- Modular endpoints and templating promote maintainability, with clean separation of concerns in core components
- Comprehensive testing for utility functions like animal-based encoding, with strong edge-case coverage
- Compile-time validation of configurations via clap and serde, but no explicit linter or static analysis pipeline
What Makes It Unique
- Employs whimsical animal-based identifiers (e.g., ‘sloth-ant-lion’) for human-readable, memorable URLs with built-in obfuscation
- Implements client-side encryption for pastes, enabling secure sharing without server-side key storage
- Combines hashids and animal numbers as dual ID systems, blending compactness with charm
- Features ‘burn after reading’ and configurable expiry via environment variables, creating ephemeral content without external dependencies
- Embeds telemetry and admin controls directly into the HTTP server, delivering a self-contained, zero-infrastructure pastebin experience