By using global index of instances and auto-subscribing there are problem by removing from your instance following because it comes back after next sync. This filter is middleware to collect removed instances and list global index without them
  • Go 95.8%
  • Makefile 2.9%
  • Dockerfile 1.3%
Find a file
2026-02-11 18:54:22 +02:00
docker audit/collection to log 2026-02-11 16:45:58 +02:00
templates added sorting, search and bulk actions 2026-02-11 18:54:22 +02:00
.gitignore audit/collection to log 2026-02-11 16:45:58 +02:00
audit.go audit/collection to log 2026-02-11 16:45:58 +02:00
collector.go added management 2026-02-11 15:29:15 +02:00
db.go added sorting, search and bulk actions 2026-02-11 18:54:22 +02:00
go.mod create db; add index url; reject host; license 2025-06-19 07:16:34 +03:00
go.sum create db; add index url; reject host; license 2025-06-19 07:16:34 +03:00
instances-joinpeertube.db serve hosts 2025-06-23 08:11:14 +03:00
LICENSE create db; add index url; reject host; license 2025-06-19 07:16:34 +03:00
main.go added sorting, search and bulk actions 2026-02-11 18:54:22 +02:00
README.md audit/collection to log 2026-02-11 16:45:58 +02:00

Peertube instance index filter

By using global index of instances and auto-subscribing there are problem by removing from your instance following because it comes back after next sync.

This filter is middleware to collect removed instances and list global index without them

Commands

App can be called directly and do management in console or via web interface.

Web interface management is enabled by setting AUTH_USER and AUTH_PASSWORD environment variables.

  • peertube-instance-index-filter -command index -url https://instances.joinpeertube.org/api/v1/instances/hosts -instance-url https://instances.joinpeertube.org/api/v1/instances - add url to index of hosts. Later it will be used to collect instances
  • peertube-instance-index-filter -command collect - collect instances from index of hosts urls
  • peertube-instance-index-filter -command reject -host www.example.com -reject-reason "no local videos" - reject instance from index to exclude it from global index
  • peertube-instance-index-filter -command audit -filter dead -last-id 0 - go through not rejected instances and check by filters: dead (no http response), duplicates (duplicate entries in db), empty (no local videos and created before 3 months)
  • / - some html information about this filter and stats
  • /instances - list of instances in json format with more information. Supports pagination, filter by instance creation date: ?start=3&count=100&since=2024-01-10. Sorted by descending creation date. Also it can be used as search by host: ?search=www.example.com
  • /instances/hosts - list of hosts in json format. Supports pagination, filter by instance creation date: ?start=3&count=100&since=2024-01-10. Sorted by descending creation date
  • /rejected - list of rejected instances. This could be c/p to Peertube moderation muted servers.

Setup

Added docker files as example. See /docker folder.

To enable web management via Docker, you can set the environment variables in docker-compose.yml:

services:
  peertube-instance-index-filter:
    environment:
      - AUTH_USER=your_username
      - AUTH_PASSWORD=your_password

./instances-joinpeertube.db is prepared datebase from instances.joinpeertube.org on 2025-06-20. It can be copied to ./instances.db to be used.

License

GPLv3