this post was submitted on 08 Dec 2025
75 points (98.7% liked)

Selfhosted

53668 readers
485 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:

  1. Be civil: we're here to support and learn from one another. Insults won't be tolerated. Flame wars are frowned upon.

  2. No spam posting.

  3. Posts have to be centered around self-hosting. There are other communities for discussing hardware or home computing. If it's not obvious why your post topic revolves around selfhosting, please include details to make it clear.

  4. Don't duplicate the full text of your blog or github here. Just post the link for folks to click.

  5. Submission headline should match the article title (don’t cherry-pick information from the title to fit your agenda).

  6. No trolling.

  7. No low-effort posts. This is subjective and will largely be determined by the community member reports.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

when reading through the jellyfin with chromecast guide i realized that it would probably be less effort to just let the casting api be public, with the added bonus that i could then cast my library to any device that supports it. but that seems like it would paint a giant target on the server.

what's the recommended way of doing stuff like this? ideally i want to be able to go to someone's house and just play some of my media on their tv.

not that any of this is doable in the near future, since i'm behind cgnat and won't get my colocated bounce server up until spring.

top 50 comments
sorted by: hot top controversial new old
[–] dogs0n@sh.itjust.works 14 points 6 days ago (2 children)

As long as your jellyfin server is properly configured behind a reverse proxy, letting it be accessible publicly on the internet is fine.

Obviously everyone has their own threat model, but it's not that big of a threat in this case (personally I don't care).

[–] KlavKalashj@lemmy.world 6 points 6 days ago (1 children)

Can you elaborate on 'properly configured'?

[–] dogs0n@sh.itjust.works 4 points 6 days ago* (last edited 6 days ago) (10 children)

The default configuration for Jellyfin is good. I mostly mean as long as you follow best practices in general you should be fine, eg:

  • You keep your system and jellyfin updated;
  • have some type of firewall in place;
  • make sure you aren't accidentally exposing jellyfins port directly to the internet;
  • have a good password for your jellyfin accounts that are able to login from outside the LAN;
  • and so on and so forth

https://jellyfin.org/docs/general/post-install/networking/reverse-proxy/

A firewall is probably the most important, having your ssh port blocked in the firewall being second.

[–] mic_check_one_two@lemmy.dbzer0.com 7 points 6 days ago (2 children)

Also, don’t use the default “data/media/{library name}” (or whatever the suggested format is) folder setup that the Trash Guide has you set up. At least change the “tv”, “movies”, etc name to something different. Jellyfin has a known vulnerability where an attacker can get access to media without valid credentials if they already know the file path. Jellyfin devs have stated that they have no intention of ever fixing this, because it would require completely divesting from the Kodi branch that everything is built on. And since everyone follows the Trash Guide to set their *Arr stack and library up, guessing file paths is laughably easy.

You’re using the suggested file naming in your *Arr stack, so Jellyfin can automatically match media? Congrats, so is everyone else. You’re using the suggested folder layout so your *Arr stack can use hardlinks? Congrats, so is everyone else. At least change the library folder names. Since your library folder doesn’t need to match the name of your Jellyfin library, you can literally have your “tv”, “movies”, and other folders be named whatever you want. Hell, name your tv folder “peepee” and your movies folder “poopoo” for all I care.

[–] planish@sh.itjust.works 2 points 5 days ago (1 children)

That certainly sounds like a thing you would want, nay need, to fix.

load more comments (1 replies)
load more comments (1 replies)
load more comments (9 replies)
[–] Ricaz@lemmy.dbzer0.com 2 points 5 days ago* (last edited 5 days ago) (1 children)

This. People are overly paranoid nowadays.

I have had SSH open directly to my main PC for 15 years and never had any issues except spam logins. Just disallow password logins and you're fine.

Same with :443 to my nginx.

[–] dogs0n@sh.itjust.works 2 points 5 days ago

I agree, there is a lot of paranoia, but honestly that's probably a good thing, because the people who are paranoid might not know that much, so a good amount of paranoia is healthy there.

The chance of being exploited is very low for me to care too too much. Why spend countless days locking up my entire infra when there's a very low low chance anyone could exploit me in the first place (obviously get your setup to a good standard, I don't recommend not reading up on anything and exposing server, etc. Just for me, I don't need to over do it).

That being said, personally I have ssh behind a vpn because that's a very important service that only I am accessing anyways, so it makes sense for me to disable that attack vector.

[–] diegantobass@lemmy.world 12 points 1 week ago (6 children)

Dumb question: why does everyone is so terribly afraid of opening stuff to the internet ? What's the scenario?

[–] 4am@lemmy.zip 55 points 1 week ago (2 children)

Allowing external access to your services means that any misconfiguration or bugs can be exploited to gain control of your machine(s).

Once that happens they can be fucked with, your data stolen, your resources co-opted for someone else’s use, etc. and often times it can be made to look as though whatever bad shit it’s doing is your doing.

So, understand your security posture. You can’t be too careful. Taking over weak or exposed machines is a global industry now.

load more comments (2 replies)
[–] rollerbang@lemmy.world 24 points 1 week ago

It starts with being used in a botnet. Then your data can be either erased, corrupted or encrypted against ransom.

[–] lime@feddit.nu 15 points 1 week ago (1 children)

i've set up servers with static ips in datacenter settings before. the way you know you're online is usually that your cpu activity jumps a few percent from all the incoming ssh traffic from russia and china. i don't want to risk anything happening to my home server.

[–] GreenCrunch@piefed.blahaj.zone 6 points 1 week ago (1 children)

so fun to look through the ssh log and see hundreds of attempts...

[–] diegantobass@lemmy.world 2 points 1 week ago (2 children)

Quick question: If I look through the ssh log and I don't see the hundred of attempts, what could be going on?..

[–] GreenCrunch@piefed.blahaj.zone 5 points 1 week ago (1 children)

I am not sure lol. perhaps your ssh port isn't exposed to the internet, or maybe the bots are just ignoring you? maybe your hosting provider has some sort of security process to reject those attempts preemptively?

I have no clue

[–] diegantobass@lemmy.world 2 points 6 days ago

Ignoring ? Nah someone mentionned my ISP might be protecting me uphill.

[–] teawrecks@sopuli.xyz 2 points 6 days ago (6 children)

Are you not actually open to the public internet? Is it running on a nonstandard port? Is it already pwned and something is scrubbing logs?

load more comments (6 replies)
[–] aichan@piefed.blahaj.zone 8 points 1 week ago (1 children)

Missconfigurations allowing bots and shit hacking you. Overblown paranoia mostly if you just take some precautions

[–] diegantobass@lemmy.world 6 points 1 week ago (2 children)

Okay thanks for mentionning overblown paranoia, that's what I have.

What kind of exploitable server misconfigurations are we talking about here?? Brute forcing won't work because fail2ban, right? I'm a noob and deep down I'm convinced that my homeserver is compromised and has beenpart of a bitcoin mining farm for years... Yet, not a single proof...

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

my homeserver is compromised and has beenpart of a bitcoin mining farm for years

The very first Linux server I deployed on a VPS was hacked almost immediately because of my ignorance. The bot gained entrance, and they supplanted a miner rig. Now, on a tiny VPS, it's pretty easy to tell if you're running a coin miner because all of the resources will be pegged. However, I got to thinking, on a corporate server, if they did manage to do this, it would almost be undetectable until someone started reviewing logs.

load more comments (1 replies)
[–] LiveLM@lemmy.zip 6 points 1 week ago* (last edited 1 week ago) (2 children)

I'm paranoid dude, I don't need the whole world judging my awful taste in TV shows!

[–] gdog05@lemmy.world 2 points 1 week ago

I set up Jellyseer so my friends can request whatever. Just blame your full collection of My Little Pony and Gilmore girls on that one friend from Finland (unless you're in Finland, and then use Greece).

load more comments (1 replies)
[–] Danitos@reddthat.com 3 points 6 days ago

The first thing I opened to the internet was a SSH server. 28 minutes after opening it, I started getting constant entry attempts.

[–] spaghettiwestern@sh.itjust.works 8 points 1 week ago (2 children)

not that any of this is doable in the near future, since i'm behind cgnat and won't get my colocated bounce server up until spring.

Doesn't IPV6 allow direct external access even when cgnat is in use for IPV4?

[–] cmnybo@discuss.tchncs.de 6 points 1 week ago

Yes, if you have IPv6, you can open a port in the firewall and have external access. Whatever you are accessing it from must have IPv6 as well though.

[–] lime@feddit.nu 1 points 1 week ago

that's also a possibility, but i'm going to have to whine to my isp.

[–] droolio@feddit.uk 6 points 1 week ago* (last edited 1 week ago) (3 children)

This video addresses many of the concerns of hosting stuff in public, and details a way (and some tools) to do it relatively securely. (There's always a risk there'll be a zero-day vulnerability in a web application like Jellyfin, but you can mitigate against them if you use the right strategies/tools, and you're vigilant enough.)

Since you're on cgnat, you can set up Pangolin on a VPS, or Tailscale-->rinetd-->Tailscale tunnel, also on a VPS. (Apparently frp is another similar solution, with p2p proxying.)

[–] diegantobass@lemmy.world 2 points 1 week ago

This is great thanks for this video

[–] lime@feddit.nu 1 points 1 week ago (1 children)

i'll worry about the nat traversal when i get my bouncer back up, but it will probably be less full-featured than pangolin. previously i just used a reverse ssh setup but that was a bit too rudimentary.

[–] droolio@feddit.uk 1 points 1 week ago

Yea I haven't tried Pangolin myself - looks a bit bloated for my tastes, but I have tried rinetd across Tailscale and it worked brilliantly (very simple conf file), and I've done reverse ssh before (using autossh) which was a bit fiddly. frp does look promising though, just as a VPS<->home bridge.

load more comments (1 replies)
[–] IsoKiero@sopuli.xyz 4 points 1 week ago (1 children)

Not spesifically helpful with your cgnat-situation, but my jellyfin runs on a isolated network and it's just directly exposed to the internet via named reverse proxy in order to share the library with family and friends. Should someone get access to that they can obviously use the VM for nefarious purposes, but it's a known risk for me and the attacker would need to breach trough either my VLAN isolation or out of the virtual environment to my proxmox host if they wanted to access my actually valuable data.

Sure, there's bots trying every imaginable password combination and such, but in my scenario even if they could breach either the jellyfin server or reverse proxy it's not that big of a deal. Obviously I keep the setup updated and do my best to keep bad actors out. but as I mentioned, breach for that one server would not be the end of the world.

With cgnat there's not much else to do than to run a VPN where server is somewhere publicly accessible and route traffic via that tunnel (obviously running a VPN-client on jellyfin-server or otherwise routing traffic to it via VPN). Any common VPN-server should do the trick.

[–] lime@feddit.nu 2 points 1 week ago

i like how everyone got hooked on the cgnat thing when i gave the actual solution in the main post. but yeah there's always the option of not doing anything until i see issues.

[–] nublug@piefed.blahaj.zone 3 points 1 week ago* (last edited 1 week ago) (1 children)

EDIT: ddns does not work behind cgnat, only vpns and cloudflare tunnels do. my bad.

cgnat is doable with a dynamic dns service. you sign up free at duckdns, freedns, or desec, set up the subdomain you want (example.dedyn.io), install or host in a container a small ddns tool that will periodically (5 min typically) check what your current ip is and update your dns record with that dns service automatically with an api. some routers even have a dynamic dns setting so you can do it without a separate install.

as far as security, you'll at a minimum want a long, unique password for any jellyfin accounts, and you should place it behind a reverse proxy like nginx, nginx proxy manager for a gui, caddy, or traeffik for some docker automagic fuckery i still don't understand. i use nginx proxy manager, set up a wildcard *.example.dedyn.io certificate and force ssl on each service i'm forwarding.

you can get fanicer and have an authentication layer self hosted as well like authelia or authentik, but beware that apparently mobile apps and smart tv apps for jellyfin do not play nice because they use the same http port as web access and do not have the ability to pop open a web portal for a secondary auth and will not work with these yet. so it's a good extra layer and 2fa sso addition but only if you use the webgui jellyfin and don't rely on an app, which considering you're asking about casting is probably not your use case.

what else you can do is set up a crowdsec or fail2ban service that will read logs from either the reverse proxy or jellyfin itself and ban ips thru your host firewall that fail to log in to help prevent bots from brute forcing in.

it's not perfect but with a reverse proxy, ip banning tool, and strong, long passwords on jellyfin it should be relatively ok.

however it would probably be most secure to setup an openvpn or tailscale to vpn to your host and have a definitely secure link to jellyfin from everywhere. i don't use these myself so i don't know about limitations this way such as mobile app or smart tv app compatibility, though. and if you want to share with other users it comes with its own security considerations of letting others have a vpn into your host.

hope some of this helps, also there's a cloudflare tunnel thing you can use instead of those dynamic dns services for domain redirect to ip behind cgnat, but i haven't used it either and don't know what all it entails.

good luck!

[–] lime@feddit.nu 2 points 1 week ago (1 children)

my registrar provides ddns, but how does that help with cgnat when thousands of people potentially have the same address?

[–] nublug@piefed.blahaj.zone 1 points 1 week ago (1 children)

oh dang, i thought i saw docs and comments saying ddns would help behind a cgnat too, must be mistaken. it's just for isps who give semi-static ips that change, not full cgnat. after some quick googling it looks like tailscale or other vpn or cloudflare tunnel are your only options.

[–] lime@feddit.nu 2 points 1 week ago

as i said i'm getting my bouncer server set back up next year after the datacenter it's in has finished renovations, so actually getting a public address is not the biggest issue.

load more comments
view more: next ›