Overview
Discover what makes ByteStash powerful
ByteStash is a lightweight, self‑hosted paste‑bin service built to give developers fine‑grained control over code snippet storage, retrieval, and collaboration. At its core it exposes a RESTful API for CRUD operations on snippets while also providing a modern web UI that supports syntax highlighting, language filtering, and keyword search. The application is intentionally minimalistic—there are no external dependencies beyond a single SQLite database—which makes it ideal for rapid deployment in containerised environments or as part of a larger developer tooling stack.
Snippet Lifecycle Management
Search & Filtering
Secure Storage
Authentication & Authorization
Overview
ByteStash is a lightweight, self‑hosted paste‑bin service built to give developers fine‑grained control over code snippet storage, retrieval, and collaboration. At its core it exposes a RESTful API for CRUD operations on snippets while also providing a modern web UI that supports syntax highlighting, language filtering, and keyword search. The application is intentionally minimalistic—there are no external dependencies beyond a single SQLite database—which makes it ideal for rapid deployment in containerised environments or as part of a larger developer tooling stack.
Key Features
- Snippet Lifecycle Management – Create, edit, delete, and tag snippets with language metadata.
- Search & Filtering – Full‑text search across title, description, and content; filter by programming language or custom tags.
- Secure Storage – All data persisted in a single SQLite file, encrypted at rest if the environment variable
JWT_SECRETis set. - Authentication & Authorization – JWT‑based auth with optional OIDC integration; per‑user isolation of snippets.
- API Exposure – Swagger UI available at
/api-docs; all endpoints are documented and versioned.
Technical Stack
| Layer | Technology |
|---|---|
| Frontend | React (functional components, hooks) + Tailwind CSS for rapid styling. |
| Backend | Node.js (v18+) running Express; middleware includes helmet, cors, and custom JWT validation. |
| Database | SQLite3 – single file, no external server; schema auto‑migrated on startup. |
| Containerisation | Docker image ghcr.io/jordan-dalby/bytestash:latest; exposed on port 5000 with volume mounting for persistence. |
| Deployment | Supports Unraid App Store, PikaPods 1‑click install, or raw docker-compose. Environment variables control OIDC, JWT secrets, and feature flags. |
Core Capabilities
- REST API – Endpoints for
/snippets(GET, POST, PUT, DELETE) with pagination and filtering query params. - Webhooks – Not natively supported, but can be implemented via a lightweight middleware that triggers on snippet changes.
- Extensibility – The API surface is stable; developers can write custom scripts or services that consume the endpoints for CI/CD pipelines, documentation generators, or IDE integrations.
- Plugin Hooks – Currently minimal, but the Express app exposes a
pluginsdirectory where additional middleware can be dropped in without modifying core code.
Deployment & Infrastructure
ByteStash is designed for zero‑configuration deployment: a single Docker container with a mounted volume for the SQLite file. It scales horizontally by running multiple instances behind a load balancer, but note that SQLite does not support concurrent writes across processes—thus true horizontal scaling requires a shared filesystem or migrating to PostgreSQL in the future. For most use cases, a single instance suffices, and the lightweight footprint (≈120 MB) allows it to run on modest hardware or cloud droplets.
Integration & Extensibility
- OIDC – Optional OpenID Connect support allows integration with corporate identity providers (Google, Azure AD, Okta).
- JWT – Tokens are signed with a user‑supplied secret; expiration is configurable (
TOKEN_EXPIRY). - CLI – While not provided, the REST API can be consumed by command‑line tools or scripts.
- Custom Hooks – Developers can add custom middleware in the Express app to log activity, enforce policies, or expose additional endpoints.
Developer Experience
The project is well‑documented: a comprehensive README, environment variable guide, and Swagger UI make onboarding fast. Community support is modest but active; issues are triaged quickly on GitHub, and the codebase follows standard JavaScript/React conventions. Configuration is entirely environment‑variable driven, which aligns with Twelve‑Factor App principles and facilitates CI/CD pipelines.
Use Cases
- Internal Knowledge Base – Teams can host a private paste‑bin for sharing snippets, configuration files, or short scripts.
- CI/CD Artifact Store – Scripts that generate temporary code (e.g., Terraform modules) can be pushed to ByteStash and retrieved by downstream jobs.
- IDE Integration – VS Code extensions can call the API to save and retrieve snippets directly from the editor.
- Educational Platforms – Course instructors can host a sandboxed snippet repository for students to experiment with code samples.
Advantages
- Performance – Node/Express is lightweight; SQLite offers sub‑millisecond query times for small datasets.
- Flexibility – Open source under a permissive license; developers can fork, extend, or re‑host without vendor lock‑in.
- Security – JWT and optional OIDC provide robust authentication; data is stored locally, eliminating third‑party exposure.
- Simplicity – Zero external dependencies beyond Docker; ideal for quick prototypes or low‑budget deployments.
ByteStash offers a developer‑centric, self‑hosted solution for code snippet management that balances simplicity with extensibility. Its API‑first design, coupled with a clean React UI and Docker support, makes it a practical choice for teams that need secure, on‑premise paste‑bin functionality.
Open SourceReady to get started?
Join the community and start self-hosting ByteStash 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
Harbor
Secure, scalable container registry for Kubernetes and Docker
Ziit
Swiss army knife of code time tracking
Bitpoll
Self‑hosted poll platform for dates, times and general questions
Mataroa
Minimalist blogging for writers
ClipCascade
Secure clipboard sync across devices, no setup needed
InvoicePlane
Self‑hosted invoicing and client management
