Back to services

ByteStash

A code snippet storage solution written in React & node.js

View alternatives to ByteStash
Suggest edit
Open source
Self-hostable
GPL-3.0
Recent reviews

Alternatives

Tech stack

No tech stack added yet. Sign in to suggest some

Overview

ByteStash is an open-source, self-hosted web application for storing, organizing, and managing code snippets, keeping the code you use often in one secure place. The project is licensed under GPL-3.0 and has about 2.5k stars on GitHub. An official live demo is available (hosted by PikaPods; username demo, password demodemo).

Key Features

  • Create and edit snippets: An intuitive interface lets you add new code snippets and modify existing ones.
  • Filter by language and content: Quickly find the snippets you need by programming language or content keywords.
  • Secure storage: All snippets are stored in a SQLite database that only you can access.
  • Accounts and single sign-on: Supports built-in accounts as well as OIDC single sign-on (SSO), and environment variables let you control whether new accounts can register, whether the account system is disabled, and more.
  • REST API: Once the service is running, visit /api-docs to browse the documentation for all endpoints through Swagger UI. You can create API Keys in the settings.
  • AI integration (MCP): Includes a built-in remote Model Context Protocol endpoint (/mcp), using Streamable HTTP as the transport. AI assistants such as Claude, OpenAI/ChatGPT, and Perplexity can authenticate with an API Key and then search, read, and manage your snippets directly. The available tools are list_snippets, get_snippet, create_snippet, update_snippet, delete_snippet, and list_metadata.
  • Multilingual interface: Supports i18n, and the community can contribute translations for new languages.

Target Users and Use Cases

It suits developers, operations staff, and technical teams who build up and reuse code, as well as self-hosting enthusiasts who care about data privacy and want to host a snippet library on their own server or NAS. It is also a good choice if you want AI assistants to read your code snippets directly.

Deployment Options

  • Unraid: Available in the Unraid app store, so you can install it directly.
  • PikaPods: Supports one-click managed installation, starting at $1 per month.
  • Docker Compose: Uses the image ghcr.io/jordan-dalby/bytestash:latest, with a default port of 5000, and the snippets directory mounted at /data/snippets. Commonly used environment variables include:
    • JWT_SECRET, TOKEN_EXPIRY: authentication
    • ALLOW_NEW_ACCOUNTS, DISABLE_ACCOUNTS, DISABLE_INTERNAL_ACCOUNTS: account control
    • BASE_PATH, ALLOWED_HOSTS: access path and allowed hosts
    • OIDC_*: single sign-on configuration

Tech Stack

  • Frontend: React, Tailwind CSS
  • Backend: Node.js, Express
  • Database: SQLite
  • Containerization: Docker

Notable Points

  • The MCP endpoint shares the same host and port as the web application, so no extra ports need to be opened when deploying. Remote client connections require HTTPS, which you can set up by configuring TLS on a reverse proxy.
  • MCP tools can only access snippets belonging to the user who owns the API Key, so permissions are isolated.
  • It is lightweight to deploy, and because data is stored in SQLite, backup and migration are simple.