selfhost.directory

The index of self-hostable projects — ranked, categorized and served with live updates.
Own your data and stop giving it to big tech.

GitLab

Self-host Invidious Router

1.2

Health-aware load-balancing proxy for Invidious instances

ReleaseOpen Sourcemit
docker run gaincoder/invidious-router
Updated2 years ago
Setup difficultyEasy
Port
8050 (HTTP server that routes requests to healthy Invidious instances)
Docker
gaincoder/invidious-router

What is Invidious Router?

Written in Go, this router sits between you and the public Invidious frontends, forwarding each web request to whichever instance currently looks healthy. It periodically probes instances (checking status codes, scanning pages for YouTube-block notices, and weighing their success ratio), can keep only the fastest responders, pulls the default instance list from api.invidious.io with optional region filtering, and lets you add your own instances or blacklist unwanted ones. Traffic is spread evenly across what remains, recovered instances rejoin automatically, and an optional fallback to YouTube is off by default. The /router-status and /router-config endpoints let end users see which instances were picked and how the router is configured. Self-hosting is straightforward: grab a release binary or a distro package, or run the Docker image; the app serves HTTP on port 8050 and writes a YAML config (by default ./config/config.yaml) on first launch. It is MIT-licensed; the newest release, 1.2, came out in October 2024.

Invidious Router alternatives

Should you self-host Invidious Router?

Invidious Router scores 50/100 on selfhost.directory (how scoring works) and ranks #2 of 2 in Load Balancer.

There was no stable release in the past 12 months, so check the repository's recent activity before you rely on it.

Setup is easy: most people get it running in one sitting. An official Docker image is available. It is mit-licensed.

Its closest alternative on selfhost.directory is HAProxy (68/100). It scores higher overall, so compare the two before you pick. See Invidious Router vs HAProxy side by side.

Features

  • Automatic recovery
  • Custom instance list
  • Health Checks
  • Instance blacklist
  • Load Balancing
  • Region filtering
  • Response time filtering
  • Status endpoints
  • YAML configuration file
  • YouTube fallbackdisabled by default

How to install Invidious Router

Install Invidious Router with Docker

docker run gaincoder/invidious-router

How to configure Invidious Router

  • app.listenThe IP address and port the application should listen on.
  • app.enable_youtube_fallbackWhether to fallback to YouTube if no instance is available.
  • app.reload_instance_list_intervalThe interval at which the application should reload the instance list.
  • app.instancesA list of Invidious instances to use.
  • app.blacklistA list of Invidious instances to exclude.

More in Load Balancer

Rate this project

Click to rate — no account needed.

0 comments

Posting as guest
Loading comments…