PeerTube plugin for creator support: tips on free videos, pay-per-second on exclusive videos.
TL;DR:
peertube-plugin-tesseraconnects a self-hosted PeerTube instance to a Tessera sidecar. Exclusive videos: per-second overlay in the player. Free videos: no lock, manual tips. This README is install and settings for the plugin. Sidecar: Getting Started. Contract: Connector spec (CONNECTOR_SPEC.md). Modes: Payment models.
- What this plugin does
- Prerequisites
- Install and activate
- Plugin settings
- Creator support
- What the viewer sees
- Verification checklist
- How it talks to Tessera
- License
- Exclusive (pay-per-second):
ArcCashier.initPaywall. Overlay on the PeerTube player until the viewer funds Gateway and unlocks. Play sends HMACsessions/start; leave / pause / end sends HMACsessions/stop. - Free (tips):
ArcCashier.initTipMode(creatorWallet, amount). No lock. The viewer taps tip; the paywall POSTs/api/core/v1/tips. This plugin does not HMACsessions/startfor free videos. - Loads Tessera UI through this plugin's relay (
/plugins/tessera/router/assets/...and/plugins/tessera/router/api/core/*), so the browser stays on the PeerTube origin. - Instance admin wallet and display fee map to Tessera
splitson exclusivestart(remainder to the creatorpayoutAddress). - Creator earnings and platform-admin earnings widgets call Tessera
GET /api/core/creator/balance(and withdraw routes) via this plugin.
Tessera wallets, Gateway, and /health live on the sidecar. Point this plugin at a running Tessera instance. Circle keys stay in Tessera .env.
- A PeerTube instance 6.0.0 or newer.
- Node.js 22 if you build the plugin from this repo (see
.nvmrc). - A running Tessera sidecar (default port
7878). Follow Getting Started for sidecar install and.env. Confirm:
curl -sS http://127.0.0.1:7878/healthExpect JSON with "status": "healthy" (see Getting Started).
From this repository, with a PeerTube container running:
git clone https://github.com/JaDi03/peertube-plugin-tessera.git
cd peertube-plugin-tessera
chmod +x update-plugin.sh
./update-plugin.shThe script builds a tarball, installs it inside the PeerTube container, and restarts that container. Override the container name with PEERTUBE_CONTAINER if detection fails.
git clone https://github.com/JaDi03/peertube-plugin-tessera.git
cd peertube-plugin-tessera
npm install && npm run build
npm pack- Sign in to PeerTube as an administrator.
- Open Administration > Plugins/Themes > Install.
- Upload the generated
.tgzand install it. - Enable peertube-plugin-tessera if it is not already active.
Open Administration > Plugins/Themes > peertube-plugin-tessera.
Current fields in this plugin:
- Tessera Base URL: HTTP origin where this PeerTube server POSTs HMAC
sessions/startandsessions/stop(not your public PeerTube URL). Same host:http://127.0.0.1:7878. PeerTube in Docker and Tessera on the host: oftenhttp://172.17.0.1:7878. Same-network Docker:http://tessera-backend:7878if you used Tesseradeploy.sh. Check from that host or container:curl -sS http://HOST:PORT/health. - Tessera Ingest Secret: Exact same string as sidecar
TESSERA_INGEST_SECRET. HMAC only onstart/stop. Never send it to the browser. - Max Active Viewers: In-memory session cap (default
10000). - Admin Wallet (Arc Network): Instance
0xaddress. On exclusivestartthis plugin sends it as Tesserasplits[].addresswith labeldisplay-admin. Needed for the platform earnings widget. - Display Fee:
splits[].fractionwhen a viewer watches here: 0%, 10% (default), 20%, or 30%. Remainder goes to the creatorpayoutAddress. Tips have no splits.
Save, then keep Tessera running. Circle API keys and MASTER_KEY stay in Tessera .env, not here.
Figure 2: Plugin settings. Base URL here is http://172.17.0.1:7878 (PeerTube in Docker, Tessera on the host).
On this same plugin page, administrators with an admin wallet see Platform Admin Earnings (balance and withdraw).
On upload or update of a video, Tessera fields appear on the form:
- Mode: Pay-per-second (exclusive) or Free (tips welcome). Exclusive uses
initPaywall+sessions/start|stop. Free usesinitTipMode+ browser tips. - Rate per second (USDC): Exclusive only. Sent as Tessera
ratePerSecond. This form allows0.000001to0.01(default0.001). - Suggested tip amount (USDC): Passed to
initTipModeas the default tip. Default0.10. - Creator Wallet Address (Arc Network): Tessera
payoutAddress. Required for pay-per-second. For free tips, set it so tips can go to that address.
The form also shows this instance's display fee (percent to the instance vs the creator).
From My videos, open Manage on a video to edit those fields.
When the video owner is logged in on the watch page and a creator wallet is set, a Creator Earnings panel shows balance and withdraw (MetaMask, Arc testnet).
Exclusive (pay-per-second): the Tessera overlay sits on the player (this plugin reparents it into the player box). The viewer signs in through the overlay, funds Gateway, and unlocks. Play then meters at the video rate. Leave, pause, or end sends sessions/stop. Unused USDC stays in Gateway (leave does not cash out). Replay on a new video resets the per-video overlay session.
Free: no lock. Tip only when the viewer taps. Each tap is POST /api/core/v1/tips from the paywall, not ingest HMAC.
Viewers do not need a PeerTube account. Tessera userId is the paywall value in localStorage key arc_cashier_user_id (email: or social:, legacy arc_). The plugin forwards that same id on start / stop.
- Sidecar health:
curl -sS http://127.0.0.1:7878/health(or your Base URL) includes"status": "healthy". - Plugin settings: Base URL and Tessera Ingest Secret saved (secret equals
TESSERA_INGEST_SECRET). - Overlay assets: watch page loads
/plugins/tessera/router/assets/paywall.bundle.js(andpaywall.css) with HTTP 200. - Exclusive: overlay on the player; after Gateway fund + unlock, play meters; leave/pause sends
sessions/stop; unused Gateway balance remains. - Free: no lock; no HMAC
sessions/start; tip only when the viewer taps (/api/core/v1/tips). - Optional: creator or admin earnings panel loads a balance after settled activity.
Same contract as Tessera Connector spec and Payment models.
- Browser asks this plugin for
/base-url, then loadspaywall.bundle.jsfrom the plugin relay (/plugins/tessera/router/assets/...). Paywall API calls go to/plugins/tessera/router/api/core/*(relayed to Tessera). HMAC ingest uses Tessera Base URL, not the browser origin. - Exclusive, unlocked play: plugin
POST /ping{ action: "start" }then HMACPOST {Tessera Base URL}/api/core/v1/sessions/startwithuserId,resourceId,ratePerSecond(decimal string),payoutAddress, and optionalsplits. Leave / pause / end:{ action: "stop" }then HMACPOST .../sessions/stopwith{ userId }. Headers:X-Tessera-Timestamp,X-Tessera-Nonce,X-Tessera-Signature. - Free:
initTipModeonly. The plugin server skipssessions/start. Tips: browserPOST /api/core/v1/tips(via the relay). No ingest HMAC on tips. - Keepalive
pingevery 15 seconds while exclusive playback is active. Tessera meters fromstartuntilstop; keepalive is not a secondstart.
userId prefixes, HMAC, and tip body: Connector spec. Sidecar .env (Circle, MASTER_KEY, TESSERA_INGEST_SECRET): Getting Started.
Apache-2.0. See LICENSE.




