Repolode
jordan-dalby

jordan-dalby/ByteStash

A self-hosted web app for storing, organising and filtering code snippets, with SQLite or PostgreSQL storage and an MCP endpoint for AI assistants.

Open-source alternative to:GitHub Gists

Stars
2,567
Forks
128
Open issues
58
Last commit
7 days ago

What is it?

ByteStash is a self-hosted web application for keeping code snippets in one place. Users can create and edit snippets, then find them again by programming language or by keywords in the content.

Snippets are stored in a SQLite database by default, or optionally in PostgreSQL. The project includes single sign-on through OIDC, a REST API documented with Swagger UI, and Docker images for deployment. Unraid and PikaPods installs are also offered.

The app includes a built-in Model Context Protocol endpoint that lets assistants such as Claude, ChatGPT and Perplexity search, read and manage snippets, authenticated with the same API key as the REST API. The frontend is built with React and Tailwind CSS, and the backend uses Node.js and Express.

Key features

  • 01Create, edit and filter code snippets by language or content
  • 02Stores data in SQLite by default, with optional PostgreSQL support
  • 03Single sign-on via OIDC
  • 04Built-in MCP endpoint for AI assistants such as Claude and ChatGPT
  • 05REST API with Swagger UI documentation
  • 06Docker deployment with docker-compose

Use cases

  • Keeping a personal library of reusable code snippets on your own server
  • Sharing a self-hosted snippet store across a small team with SSO
  • Letting an AI assistant search and update your saved snippets

Quick start

  1. 1

    Pull and run the Docker image using the docker-compose file from the README

    docker compose up -d
  2. 2

    Open the app in your browser on port 5000 and create an account

Things to know

  • Self-hosting is required; there is no hosted version beyond the PikaPods offering.
  • The MCP endpoint requires HTTPS for remote clients, so you need a TLS reverse proxy.
  • Licensed under GPL-3.0, a copyleft license that requires derivative works to be open-sourced under the same terms.

In collections

Topics

FAQ

What is ByteStash?
A self-hosted web app for storing, organising and filtering code snippets, with SQLite or PostgreSQL storage and an MCP endpoint for AI assistants. ByteStash is a self-hosted web application for keeping code snippets in one place. Users can create and edit snippets, then find them again by programming language or by keywords in the content.
Is ByteStash free to use? What license does it have?
ByteStash is open source under the GPL-3.0 license. Check the license terms before using it in commercial products.
Is ByteStash still maintained?
Actively maintained. The last commit to ByteStash was on Oct 17, 2026.
What can I use ByteStash for?
Keeping a personal library of reusable code snippets on your own server Sharing a self-hosted snippet store across a small team with SSO Letting an AI assistant search and update your saved snippets
How do I install ByteStash?
Pull and run the Docker image using the docker-compose file from the README: docker compose up -d Open the app in your browser on port 5000 and create an account
Where can I get ByteStash?
The source code and installation instructions are on GitHub: https://github.com/jordan-dalby/ByteStash

Summary generated by AI from the project's README. GitHub stats refresh daily.

Related projects