Invidious selfhosted
from gblues@lemmy.zip to selfhosted@lemmy.world on 29 Aug 19:19
https://lemmy.zip/post/47458949
from gblues@lemmy.zip to selfhosted@lemmy.world on 29 Aug 19:19
https://lemmy.zip/post/47458949
Hello everyone. I’m trying to selfhost an invidious instance to use inside my home network, to, you know, avoid youtube and use sponsorblock. I tried to use their site instructions to hold a docker container (although I’m using podman-composer for personal reasons) but I just can’t get it built. Has anyone succeded in doing it? any tips you can give me?
threaded - newest
I have a self-hosted instance running for about the past 3-4 years. But pulling new PO Tokens isn’t working anymore so my instance is kind of broken right now.
To be frank, it’s unlikely you’ll get a running instance operational at this point unless something changes.
Edit: You have to rotate IP addresses when the PO Token problem happens. But it’s a gamble if the next IP you get from your ISP will be allowed by Youtube.
nadeko.net does this often. They are getting about $350 per month as contributions. These things are costly.
I run a private instance and it works like 98% of the time. Every once in a while YouTube changes something and I have to update my images or change from latest to master tags.
Here is my docker-compose.yml, I’m not sure how it translates to podman but maybe it’ll look similar.
pastebin.com/TUqG5yFZ
There are 6 CHANGEME in the file that you would need to change with your info. The 2 that are for the companion must be the same 20 (I think) character key. I just generated one like it said in the instructions. The hmac key should be a separate 20 (I think) character key. Then just update your domain names and the admin account.
Hopefully this will help you out.
A PSA for you is that the original setup for local invidious is not really worth it at this time. You gotta rotate IP to avoid youtube blocking it, you need to use IPv6, and you have to constantly refresh PO tokens. All of this happens with separate programs so it’s clunky and can’t keep up with youtube’s rate of blocking things, unless you setup some kind of frequent cron jobs, but at the cost of bringing the service down frequently which is not worth it.
For my instance I use the companion setup. It takes care of rotating PO token by detecting when it needs to. It’s also way more robust, based on very well maintained youtube.js project.
Another change I made is routing the invidious connections through VPN. That keeps my real IP safe from getting blocked, and I do remember this setup rotates the VPN server when blocked. I’ll share my compose file in a bit, been using it with almost no issue for almost a year.
EDIT: pastebin.com/0RqR77i2
Thanks everyone for the support. Thinks look really tricky with invidious, and I’m thinking to stay with the public instances :)