I was having some issues with Invidious the other day, which I resolved. However, I came across this tidbit of info that I’d never seen before when I first deployed it:
Post-install configuration:
Highly recommended
Because of various issues, Invidious must be restarted often, at least once a day, ideally every hour.
https://docs.invidious.io/installation/#windows
Anyone else observing this weird restart schedule?
That line predates invidious-companion. When the player and signature handling still lived in the main process, a periodic kick was the honest workaround, and the docs never really caught up after companion split it out.
What I’d push back on is the blind hourly restart, because it hides exactly the failure you just had. A companion image sitting a version behind shows up as things half-working, and a scheduled restart makes that go away for an hour at a time, so you never trace it. If you’re going to script something, script a check instead: hit an endpoint that actually plays a video, restart only when that fails, and log it when it does. Then a restart tells you something happened.
Small thing that would have caught your case:
docker compose pullwith no service name pulls all three, anddocker compose imagesprints the digests you’re actually running.That makes sense. I’ll see what I can come up with. Thanks for the guidance.
Here’s the shape, if it saves you the fiddling. Put it in the compose file rather than a cron:
healthcheck: test: ["CMD-SHELL", "wget -qO- http://localhost:3000/api/v1/trending >/dev/null || exit 1"] interval: 5m timeout: 10s retries: 3 restart: unless-stoppedPort and path to match your setup, and use wget rather than curl unless you know the image ships curl, since a healthcheck that fails because the binary is missing looks exactly like a service that is down.
One catch: Docker marks a container unhealthy but won’t restart it for you. Either pair it with something like autoheal, which watches for that state, or keep your cron and have it check first and restart only on failure.
Either way you get the thing the blind hourly restart can’t give you: a log of how often it actually fired. Never, and you didn’t need the restarts. Constantly, and there’s a real bug worth chasing rather than a schedule papering over it.
Aww shit man. Thanks for that. I’m going to do this today! Thank you. You are very generous with your time.
I haven’t used this tool specifically, but anything involving Youtube is always going to be an uphill battle. In the instance of a video downloader like Channeltube, you frequently need to feed it fresh cookies to make sure Youtube doesn’t flag it as a bot. I assume this is a similar situation.
The requirements also list ‘‘2gb if you restart frequently’’ so there might be a memory leak issue, or the way it’s setup means the RAM usage will increase in perpetuity.
I would just script a task to restart the docker container every hour. Shouldn’t be too much a hassle, you’re unlikely to ever notice since it shouldn’t take more than a few seconds. I would track its RAM usage over a few days too. See if there’s something fishy happening. Something like Beszel will let you track your docker socket, so usage per container. Preferably left on read only imo.
I would just script a task to restart the docker container every hour. Shouldn’t be too much a hassle.
Yeah, I was thinking about that. A script fired by a cron every hour. I do have the occasional, rare issue with Invidious. So, I’m wondering if indeed I need more restarts. It couldn’t hurt.
What kind of issues have you had? How did you resolve them?
Well, it was quite simple and I feel a bit embarrassed. LOL When I ran an update, I thought it updated all three components: Invideous itself, the companion app, and the database. However, only the Invidious and database updated leaving the companion app for whatever reason out of the loop. So after fumbling around and doing a little reading, I just so happened to look at Portainer which has a green checkmark beside the container signifying it’s the current version. The companion app had an orange checkmark. So I updated again, and Jack’s a doughnut, Bob’s your uncle. But during my reading I came across the ‘reboot hourly’ admonishment that I don’t believe I’ve seen before. Long story short, everything is fine now.
Oh, I’ve been there! lol Yeah, you sometimes don’t expect to have to update an entire stack, not just one thing. Possible the companion app image was just released later and it wasn’t on you either. :P
But yeah, give the cron job a try. I’d be curious to try it out myself! In theory your webinstance shouldn’t cut out unless you click on something the exact moment the container is resetting.
In theory your webinstance shouldn’t cut out unless you click on something the exact moment the container is resetting
Most of what I use Invidious for is inspiration and some tutorials such as this I’m trying to learn:
The guy makes me want to snap the neck of my bass in half.
Fuck yeah! This slaps. Brb while I get my headphones to listen to it again.
Yeah, if that doesn’t move you then you’re dead. LOL



