New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
AnyOne Familiar with Invidious on VPS
Hi all, figured I would ask if anyone is using a low cost VPS for running an Invidious instance.
I'm trying to save on Youtube Premium and help my friendz/fam in India with regional restrictions. If u got Invidious working on a VPS here, I'd love to know. Thanx!


Comments
I can't give you any specific advice, but I hope you can find a solution
It depends on whether you are planning to run a public instance or not. If it is private, a relatively low-spec, single vCPU setup should suffice. Additionally, it is worth noting that Invidious Companion tends to perform better against YouTube's restrictions and bot detection when using a residential IP address.
issue is google is actively fighting with Invidious. I stopped hosting it and jumped to PeerTube instead but it requires plenty of storage.
Why are you simply not using revanced/morphe @sride410?
Besides some now and then YouTube does not like it, my personal instance is up and running and more stable then newpipe or revanced.
Especially as the using persons don't have to update any software.
I run a private instance. Yep, Google fights. It's a cat-and-mouse-game where Invidious breaks every 2-3 months for a few days until the devs find a workaround. I expect Google will win at some point, so yeah...
I used to run it on a VPS but they blocked it completely. Now it's also behind a residential IP, and the VPS only proxies back home.
So, are you hosting it at home?
I also have someone in my family use brave browser. Personally I am a UbO+ firefox/zen on both Android/my devices.
If you are hosting at home it will work.
But if you are on a VPS you are going to need a proxy to a residental ip for the Invidious Companion.
Which is expensive turning Invidious into gold.
I've got it working fine on a VPS at the moment. I'm not even using a VPN and I just watched a video to make sure it's still working. I don't use it very much, but I have the Privacy Redirect browser addon installed so any time I click a link that would take me to YouTube it redirects to my Invidious instance.
This is my docker compose file in case it helps. I've censored the sensitive fields but I used find/replace to do it so you can do the same to add your own variables 👇
services:
invidious:
image: quay.io/invidious/invidious:latest
restart: unless-stopped
ports:
- "127.0.0.1:3000:3000"
environment:
# Please read the following file for a comprehensive list of all available
# configuration options and their associated syntax:
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
INVIDIOUS_CONFIG: |
db:
dbname: invidious
user: XXXXXX
password: XXXXXX
host: invidious-db
port: 5432
check_tables: true
invidious_companion:
# URL used for the internal communication between invidious and invidious companion
# There is no need to change that except if Invidious companion does not run on the same docker compose file.
- private_url: "http://companion:8282/companion"
# IT is NOT recommended to use the same key as HMAC KEY. Generate a new key!
# Use the key generated in the 2nd step
invidious_companion_key: "xxxxxxx"
# external_port:
# domain:
# https_only: false
# statistics_enabled: false
# Use the key generated in the 2nd step
hmac_key: "xxxxxxxxxxxxxxxxxxxxx"
healthcheck:
test: wget -nv --tries=1 --spider http://127.0.0.1:3000/api/v1/stats || exit 1
interval: 30s
timeout: 5s
retries: 2
logging:
options:
max-size: "1G"
max-file: "4"
depends_on:
- invidious-db
companion:
image: quay.io/invidious/invidious-companion:latest
# Please read the following file for a comprehensive list of all available
# environment variables and their associated syntax:
# https://github.com/iv-org/invidious/blob/master/config/config.example.yml
environment:
# Use the key generated in the 2nd step
- SERVER_SECRET_KEY=xxxxxxx
restart: unless-stopped
# Uncomment only if you have configured "public_url" for Invidious companion
# Or if you want to use Invidious companion as an API in your program.
# Remove "127.0.0.1:" if used from an external IP
#ports:
# - "127.0.0.1:8282:8282"
logging:
options:
max-size: "1G"
max-file: "4"
cap_drop:
- ALL
read_only: true
# cache for youtube library
volumes:
- companioncache:/var/tmp/youtubei.js:rw
security_opt:
- no-new-privileges:true
invidious-db:
image: docker.io/library/postgres:14
restart: unless-stopped
volumes:
- postgresdata2:/var/lib/postgresql/data
- ./config/sql:/config/sql
- ./docker/init-invidious-db.sh:/docker-entrypoint-initdb.d/init-invidious-db.sh
environment:
POSTGRES_DB: invidious
POSTGRES_USER: XXXXXX
POSTGRES_PASSWORD: XXXXXX
healthcheck:
test: ["CMD-SHELL", "pg_isready -U $$POSTGRES_USER -d $$POSTGRES_DB"]
volumes:
postgresdata:
companioncache:
Not really. You can use your home IP address.
Invidious Companion consumes minimal data and generates very little traffic. Its primary purpose is to obtain the correct tokens from YouTube to prevent bot detection.
You are just not using it enough to see problems. If you have many subscriptions or multiple users, you will begin to encounter errors and may need to consider using the companion app. Based on your Docker Compose configuration, it appears that you have not configured Companion as the API.
Piped is better, but now it's dead.
My Docker Compose is a copy and paste from here, with only the passwords and secret keys changed: https://docs.invidious.io/installation/#docker-compose-method-production
The private URL for the Companion is specified in the Invidious section of the docker compose and both Invidious and the Companion share the same secret key, ("xxxxxxx"), so I'm pretty sure it is using the Companion. But regardless it works whenever I need it and that's enough for me.
@fijxu
Docker instructions from invidious worked for me when I set one up last month from home. Sounds like you'll at least need to host companion from home.
Don't need it to be a residential IP at least not in my experience its only that DASH is a bit less stable, seems to be some timeout issue, latency to high between companion ask for the chunk links and then the client tries to load these. Even if i set it to proxy the videos.
But without DASH its up and running.
So i set it default to 720p without dash and myself then just switch and try DASH.
Hope you find a solution.
i personally use ymusic.io for music listening and rarely use youtube revanced in android
for tv, smarttube
but for most of the channels i like, i use pinchflat to download them n watch in jellyfin.
Note: I consume media very very less, so i only use ymusic daily and i am a text person
Hi all,
You guys are the best! I didn't expect so much information, I looove this place already!
revanced/morphe and PeerTube sounds like alternatives. But are there any VPS that do turn key solutions? I'm a newb at Linux, Docker and all VMs.
sridevi, i don't think any such solution exists.
most vps are empty (kind of baremetal) and you need to install all required things/
Hi, I host inv.nadeko.net and I maintain Invidious so I guess I am the indicated one to clear your questions.
You can host Invidious in a 1GB VPS without problems, the problem comes with the VPS you are choosing to host it on. That's because Youtube now blocks well known VPS providers IP ranges like Hetzner, Vultr and others, so you should check that before renting a VPS for Invidious.
Your best bet is to rent a VPS from a non well-known VPS provider, which has lower probability to be banned from Youtube.
About resource usage, Invidious Companion is the one that uses the most memory due JavaScript and DOM that is needed to get something called "Potoken". Invidious uses like 100MB or less and the database, uses even less. So 1GB of RAM should be enough if you want something cheap.
What matter most here is using an IP that is not blocked by Youtube, so that is why we (Invidious maintainers) recommend selfhosting Invidious using residential internet instead of hosting it on a VPS.
Also, some things may be broken on Invidious, but due to our lack of time, we don't have enough time to investigate and fix them, but the overall experience is great is you just want to watch videos
Thank you for your service. You are one of the longest standing instance provider for invidious beside nerdvpn.de
Note: I have been using invidious since late 2018. I think it was September or October. Crazy to see the instance list grow and fall short to less than 10 within 5-6 years
NixOS makes running Invidious quite easy if you already know (or are willing to learn) about it. If not, you should probably just read more about how Docker works, then you can just run the Invidious container, that works on any distro. Also: if you don't feel confident in your Linux security skills, it would be wise to run Invidious behind WireGuard so that only the devices you authorize can use it. Good luck!
Google is fighting hard and making it very difficult to run an instance. Nadeko mostly does not work for me, nerdvps kinda breaks up often.
Nadeko usually will work on the 3rd/4th instance. Similar with nerdvpn. Google is getting strained because of the required storage to host 20 years worth of internet's video, as anecdote the defunct vtuber archive exceed 4PB (on 2023 or 2024).