Loading...
 
Skip to main content

Image

PeerTube is a free, open-source, decentralized video platform.

Launched in 2018, PeerTube was created as an ethical alternative to centralized platforms like YouTube or Vimeo.
Each PeerTube server (called an instance) is independent, with its own rules and moderation, but can connect to other instances.

PeerTube also uses peer-to-peer technology (WebRTC/HLS) so viewers share video pieces with each other, reducing the load on the hosting server. This makes it possible for small communities and organizations to host their own platform without huge infrastructure costs.

PeerTube is not intended to replace mainstream platforms, but to provide a parallel, community-owned, ad-free network that respects users’ freedom and privacy.

Developed by Framasoft
Image

PeerTube integrates with Tiki to allow:
Uploading and managing videos directly within Tiki
Embedding PeerTube videos in wiki pages and trackers
Applying Tiki’s permission system for fine-grained access control

PeerTube video list screenshot
PeerTube video list screenshot


PeerTube options

Option Description Default
PeerTube video management Integration with the PeerTube video platform Disabled
Plugin PeerTube Video Display a PeerTube video via the {peertube} wiki plugin (oEmbed) Disabled
PeerTube Video (tracker field) Display a series of attached PeerTube videos in tracker items Disabled
PeerTube service URL Your PeerTube instance URL (e.g., https://videos.example.com/). A trailing “/” is added automatically if missing. None
Username PeerTube account username used for uploads/API actions None
Password PeerTube account password used for uploads/API actions None
PeerTube player ID (optional) Player configuration ID if you use a custom PeerTube player None


Note: The PeerTube local OAuth client (client_id/client_secret) is auto-discovered by Tiki from /api/v1/oauth-clients/local. No admin input required.


Why Use PeerTube Instead of...?

  • ...YouTube/Vimeo?
    • No ads or tracking; self-host or choose your instance
    • ActivityPub federation — your channel can be followed across the Fediverse (other PeerTube/Mastodon servers) without relying on one company.
    • Tight Tiki integration — reuse Tiki groups/permissions and keep a consistent UI; embeds feel native and sign-in flows stay within your site.
  • ...Tiki File Gallery?
    • Transcoding & adaptive streaming — PeerTube auto-creates multiple qualities and streams via HLS/WebRTC, working well on mobile and slow connections.
    • Federation & analytics — videos can be discovered across instances, with built-in stats (views, watch time) and moderation tools.
    • File Gallery is storage-first — great for keeping files, but it doesn’t transcode, stream adaptively, or federate; for a smooth “watch” experience, use PeerTube.


New in Tiki 30.x

  • New feature flag: feature_peertube
  • New prefs: peertube_service_url, peertube_username, peertube_password
  • New permission: tiki_p_admin_peertube (+ existing: upload/list/view/edit/delete/download)
  • New pages:
    • tiki-list_peertube_entries.php (list, sort, search, actions)
    • tiki-peertube_upload.php (channel, title, description, privacy)
    • tiki-peertube_video.php (view/manage/delete)
  • New wiki plugin: PluginPeerTube (oEmbed)
  • New tracker field: PeerTube Video (trackerfield_peertube)
  • Admin UI: connection test & guidance; menu entries under Video


Admin UI – Video PeerTube: connection test & prefs

Admin Dashboard — Video icon
Admin Dashboard — Video icon


Getting Started: Tiki - PeerTube

  • List / thumbnails of videos from your PeerTube instance
  • Search & sort (title, created/published date, privacy)
  • Privacy badges, duration, views; quick actions (view / download / edit / delete)
  • Uses Tiki permissions (list/upload/view/edit/delete)

  • Go to Admin » Video » PeerTube
  • Enable PeerTube video management and the plugin/field if needed
  • Set: service URL, client id/secret, username, password
  • Save, then use the video list to verify

Admin UI – PeerTube tab
Admin UI – PeerTube tab

  • Menu entries under PeerTube Video: List PeerTube Media, Upload PeerTube Video
  • Tracker field: PeerTube Video to attach one or more videos to items
  • Pages: tiki-list_peertube_entries.php, tiki-peertube_upload.php, tiki-peertube_video.php

Video menu — PeerTube section
Video menu — PeerTube section

Copy to clipboard
{peertube url="https://videos.example.com/w/abc123"}
  • Optional params: width, height, start, allowFullScreen, etc.


Instance: a PeerTube server that can federate with others.
Channel: where videos are uploaded for an account.
Video ID: uuid / shortUUID used by Tiki to reference a video.
Privacy: Public, Unlisted, Private, Internal, Password.
ActivityPub: protocol enabling federation across the Fediverse.
oEmbed: used by the plugin to embed a video from its URL.



Requirements & Compatibility

  • Tiki ≥ 30.x (feature_peertube)
  • PeerTube ≥ 6.x (API v1, local OAuth client)
  • HTTPS recommended; default CORS is fine
  • PHP cURL enabled
  • Docs: PeerTube REST API Reference


Authentication / Local OAuth client

Tiki auto-discovers the PeerTube local OAuth client ( client_id/client_secret ) from
/api/v1/oauth-clients/local. These credentials identify the consumer application (the browser) and are public on the instance by design. You do not need to store or enter them manually in Tiki.

API examples (for reference)

Copy to clipboard
# 1) Get local OAuth client (client_id / client_secret) curl -s https://YOUR_INSTANCE/api/v1/oauth-clients/local # 2) Exchange for an access token (password grant) curl -X POST https://YOUR_INSTANCE/api/v1/users/token \ -H "Content-Type: application/x-www-form-urlencoded" \ -d "client_id=YOUR_CLIENT_ID" \ -d "client_secret=YOUR_CLIENT_SECRET" \ -d "grant_type=password" \ -d "username=YOUR_SERVICE_USERNAME" \ -d "password=YOUR_SERVICE_PASSWORD"


Permissions mapping

Permission Purpose
tiki_p_admin_peertube Administer the PeerTube integration
tiki_p_list_videos List videos
tiki_p_view_videos View video details
tiki_p_upload_videos Upload videos
tiki_p_edit_videos Edit metadata
tiki_p_delete_videos Delete videos



Troubleshooting (common errors)

  • Preference `trackerfield_peertube` is not defined This usually means caches weren’t cleared. Fix: Settings → Tiki Cache/Sys Admin → Clear all caches Or CLI: `php console.php cache:clear`
  • Connection Status = error → Check peertube_service_url (with/without trailing `/`; Tiki will add it). Ensure the instance is reachable and not blocked by a proxy/firewall.
  • 401 / invalid_grant → Wrong username/password or server clock drift. Sync time (NTP) on both servers.
  • 413 / upload too large → Increase upload_max_filesize and post_max_size (PHP) plus web server limits (Nginx/Apache). Also check PeerTube’s upload limit.
  • “Internal” privacy → Video may not embed in Tiki due to PeerTube privacy rules.


Show a video

Here is an example of how to use the PeerTube plugin (oEmbed under the hood):

Copy to clipboard
{peertube url="https://videos.evoludata.com/w/2aGghaFr12Cg1Nj1ckqznH"}

Notes & Limitations

  • PeerTube handles transcoding and adaptive streaming (HLS/WebRTC); Tiki File Gallery is storage-first (not optimized for streaming).
  • WebTorrent was removed in PeerTube v6; P2P is now HLS/WebRTC only.
  • Always embed using the full watch URL (the /w/shortUUID form).


Collapse/expand modules below