npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

peertube-plugin-sell-storage

v1.1.9

Published

Completely automated storage (video quota) subscriptions to users.

Readme

PeerTube Plugin Sell Storage

Table of Contents

About

This plugin allows you to sell storage space (video quota) to your users automatically with Stripe.

The most notable features are:

  • Automatic video quota increases and decreases without human intervention.
  • Dedicated page in the menu which promotes upgrading users' storage and makes it easy to see subscription information.
  • Up to five different packages/subscriptions.
  • The interface is unbranded, which makes this plugin accessible by every instance.
  • Custom billing portal for customers to manage their subscriptions.

Prerequisites

  • Stripe API key
  • Stripe webhook (see the Configuration section)
  • Stripe products (up to 5) for users to subscribe to
  • Peertube >= v4.3.0

Installation

  • Navigate to the "Settings" page on the PeerTube menu when logged in as an admin.
  • Click on the "Plugins/Themes" section.
  • Search for "sell-storage"
  • Click "Install" near the plugin name

If you're installing locally

  • Clone the Git repository, change directories, and build the plugin
git clone https://github.com/ayaadev/peertube-plugin-sell-storage.git
cd peertube-plugin-sell-storage
yarn
yarn build

Configuration

You need a Stripe account as stated in the Prerequisites section. Create an account on https://stripe.com to start.

Once you've validated your email and inputted your business details, you can test in "Test mode", and go live by unchecking "Test mode". This option is found by hovering over your business name in the top left.

We recommend you to test the plugin in "Test mode" before going into "Live mode" (i.e. dealing with real money).

Note: If you perform a transaction in Test Mode, you'll need to manually clear the subscription status because the webhook will not send back the correct validation response, meaning the changes will take effect but nothing will be charged. Use a dedicated test account.

API Keys

You need the Secret API Key to add to the plugin configuration. Navigate to https://dashboard.stripe.com/apikeys. Copy and paste the Secret API Key into the plugin settings.

Webhook configuration

Go to https://dashboard.stripe.com/webhooks and create a webhook with the following API events:

  • customer.subscription.created
  • customer.subscription.deleted
  • customer.subscription.trial_will_end
  • customer.subscription.updated
  • checkout.session.completed
  • invoice.paid
  • invoice.payment_failed
  • payment_intent.succeeded

For the webhook URL, make sure the version in the URL matches the version of the plugin. For example, if your plugin is on version 1.1.9 use the URL: https://your-instance.tld/plugins/sell-storage/1.1.9/router/webhook

An example of this with the correct version in the webhook URL is available in the plugin settings.

Note: If you update the plugin, you'll have to update the webhook link in Stripe with the new version. For example, if you update from 1.1.3 to 1.1.9 change the webhook URL to https://your-instance.tld/plugins/sell-storage/1.1.9/router/webhook. Don't forget this!

PeerTube Plugin

Configure the following settings:

  • Billing portal URL (enabled and customised at https://dashboard.stripe.com/settings/billing/portal)
  • Currency
  • Page description, thank you page description and cancel page description.

Plan configuration

It's time to add your plans!

  1. In stripe, go to https://dashboard.stripe.com/products and add a new product. Set a name, description and price. After creation, click on the product and click on the binocular icon at the bottom right.

 

  1. On the left side of the inspection window, click on the price key.

 

  1. On the right side of the inspection window, copy the price ID into the respective plan in the plugin settings.

 

Repeat steps 1-3 for each plan (1, 2, 3, 4, 5) in the plugin settings.

Usage

Navigate to "Storage Plan" underneath "My video space" in the PeerTube menu

Acknowledgements

This was inspired by and modified from peertube-plugin-ncd-sell-storage. Modifications include:

  • Error free! At the time of writing this, the published version of ncd-sell-storage is outdated and therefore does not work despite the fix being available on their Git repository.
  • Branding removed. ncd-sell-storage had hardcoded branding which was removed so this plugin is accessible by everyone.
  • Custom billing portal for customers to manage their subscriptions.
  • Imrpoved documentation. For example, the necessary API events for the Stripe webhook are documented and screenshots have been included.