this post was submitted on 24 Jul 2026
22 points (95.8% liked)

Selfhosted

60967 readers
708 users here now

A place to share alternatives to popular online services that can be self-hosted without giving up privacy or locking you into a service you don't control.

Rules:

Detailed Rules Post

  1. Be civil.

  2. No spam.

  3. Posts are to be related to self-hosting.

  4. Don't duplicate the full text of your blog or readme if you're providing a link.

  5. Submission headline should match the article title.

  6. No trolling.

  7. Promotion posts require active participation, with an account that is at least 30 days old. F/LOSS without a paywall has exceptions, with requirements. See the rules link for details. Tags [CBH] or [AIP] are required, see the links in Rule 8 for details.

  8. AI-related discussions and AI-involved promotional posts have additional requirements for tagging, as noted in Rule 7 and the AI & Promotional Post Expanded Rules post, and find example disclosures here.

Resources:

Any issues on the community? Report it using the report flag.

Questions? DM the mods!

founded 3 years ago
MODERATORS
 

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?

top 23 comments
sorted by: hot top controversial new old
[–] deviceshelf@lemmy.world 2 points 1 day ago (1 children)

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 pull with no service name pulls all three, and docker compose images prints the digests you're actually running.

[–] irmadlad@lemmy.world 1 points 1 day ago (1 children)

That makes sense. I'll see what I can come up with. Thanks for the guidance.

[–] deviceshelf@lemmy.world 2 points 10 hours ago (1 children)

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-stopped

Port 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.

[–] irmadlad@lemmy.world 1 points 10 hours ago

Aww shit man. Thanks for that. I'm going to do this today! Thank you. You are very generous with your time.

[–] TeaWithDani@lemmy.world 6 points 3 days ago* (last edited 3 days ago) (1 children)

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.

[–] irmadlad@lemmy.world 3 points 3 days ago (1 children)

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.

[–] TeaWithDani@lemmy.world 2 points 3 days ago (1 children)

What kind of issues have you had? How did you resolve them?

[–] irmadlad@lemmy.world 1 points 3 days ago (1 children)

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.

[–] TeaWithDani@lemmy.world 3 points 3 days ago (1 children)

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.

[–] irmadlad@lemmy.world 2 points 3 days ago* (last edited 3 days ago) (1 children)

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:

12-string BASS

The guy makes me want to snap the neck of my bass in half.

[–] TeaWithDani@lemmy.world 2 points 3 days ago (1 children)

Fuck yeah! This slaps. Brb while I get my headphones to listen to it again.

[–] irmadlad@lemmy.world 2 points 3 days ago

Yeah, if that doesn't move you then you're dead. LOL

[–] darcmage@lemmy.dbzer0.com 5 points 3 days ago (1 children)

I'd be surprised if most people running invidious for private use are following that advice. I've been on the master branch for a while and it gets updated fairly often. For my instance, I haven't seen any reason to restart the service more often.

[–] irmadlad@lemmy.world 3 points 3 days ago

I haven’t seen any reason to restart the service more often.

Alright. Cool.

[–] Atelopus-zeteki@fedia.io 3 points 3 days ago (1 children)

I stopped using Invidious a couple years ago, when I found out about FreeTube. I do have to update FreeT pretty often. I'll put Invidious back on my list. Thanks for bringing it back to my attention.

[–] irmadlad@lemmy.world 2 points 3 days ago (1 children)

Thanks for bringing it back to my attention.

You're welcome. I think they've made pretty decent strides especially with the companion app and the fact that YT is relentless in trying to circumvent frontends.

[–] Atelopus-zeteki@fedia.io 2 points 1 day ago (1 children)

Seems like there's a FreeTube update every week or so. Cat and Mouse games, but what YT doesn't realize is that Invidious and Freetube are the Cats and YT is the mouse to be consumed.

[–] irmadlad@lemmy.world 3 points 1 day ago (2 children)

A friend of mine a while back was showing me some drums he was thinking about getting, and he had a YT video pulled up on his phone to show me of the drum kit in action. Two unskipable pre-rolls, one skippable pre-roll, the actual video, halfway through the video, another skippable ad. Jebus, how does anyone even put up with that? The ads were absolute bullshit too. One, as I remember, was this nurse advocating the use of Vicks Vapor Rub on your member to enhance the girth and length. I shit you not. I was like, who sees this and slathers Vicks Vapo Rub on your twigs n' berries? Wow! That's gotta burn. Damn sure would make mine run hide.

[–] SuspiciousCarrot78@aussie.zone 2 points 20 hours ago (1 children)

Please tell me that's ai slop parody.

I mean..it has to be. And the fact YouTube is just merrily injecting it into their streams is amazing.

I use Smartube and PipePipe and haven't seen ads on YT since forever. Is this really what it's like now?

[–] irmadlad@lemmy.world 2 points 10 hours ago

Is this really what it’s like now?

Dude, it felt like it took 15 minutes to watch a maybe a 2 minute video. It was horrible. And like I said, Vicks Vapo Rub? Who on earth, who owns a set of twigs n' berries, would even contemplate this? Sometimes my friends will call me over to look at some problem with their computer. It's 99.999% Windows 11. OMG! I just want to rage quit the whole scene. Ads on Windows itself. Ads on webpages. Popups. Here an ad, there and ad, everywhere an ad, ad. The whole scene would be complete if they had 5 toolbars in Explorer like it was popular to do back in the day. And I'm like 'How do you all do this?'. At the very, very least install Ublock Origin ffs. But what happens is that Ublock will sometimes just block everything. Out of the box it's generally good. But you have to adjust it sometimes per site and those adjustments carry over to the next time you're on the site. That's where everyone disables it and goes back to ads everywhere. I'm like 'Didn't we just have an hour long training session about this last time I was over here?'

While I still use Windows 10, it's very stripped down and there's no way I'm moving to Windows 11. For all you Linux purists, yes, I also use Linux and Mac. Settle down! LOL

[–] Atelopus-zeteki@fedia.io 2 points 1 day ago

I wouldn't want to 'yuck someone else's yum'. AND please please please NO VICK'S on DICKS! I haven't used YT direct in quite some time. Thanks for the anecdote encouraging us all to continue avoidance.

[–] mike_wooskey@lemmy.thewooskeys.com 2 points 3 days ago (1 children)

I haven't had to adjust or look at my invidious instance configs in a long time, but I do remember that in their docker instructions and I think I configured my container to restart hourly (or maybe I made it every other hour? Daily?). I've had no problems with my invidious instance in a long time, but that may have nothing to do with frequent restarts.

[–] irmadlad@lemmy.world 2 points 3 days ago

I think thats what I'll do. Write a script, fired by a cron, to restart all three containers hourly and see how that goes. As I said further down, or up where ever this comment lands, that I do, on rare occasions, have issues with it. So, restarting couldn't really hurt I wouldn't think.