this post was submitted on 26 Jun 2025
462 points (97.9% liked)

Selfhosted

48689 readers
508 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.

Resources:

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

Questions? DM the mods!

founded 2 years ago
MODERATORS
 

What’s your go too (secure) method for casting over the internet with a Jellyfin server.

I’m wondering what to use and I’m pretty beginner at this

you are viewing a single comment's thread
view the rest of the comments
[–] oong3Eepa1ae1tahJozoosuu@lemmy.world 69 points 4 days ago (4 children)

Nginx in front of it, open ports for https (and ssh), nothing more. Let's encrypt certificate and you're good to go.

[–] Novi@sh.itjust.works 67 points 4 days ago (10 children)

I would not publicly expose ssh. Your home IP will get scanned all the time and external machines will try to connect to your ssh port.

[–] 30p87@feddit.org 53 points 4 days ago (1 children)

fail2ban with endlessh and abuseipdb as actions

Anything that's not specifically my username or git gets instantly blocked. Same with correct users but trying to use passwords or failing authentication in any way.

[–] mosiacmango@lemm.ee 31 points 4 days ago* (last edited 4 days ago) (1 children)

Youve minimized login risk, but not any 0 days or newly discovered vulnerabilites in your ssh server software. Its still best to not directly expose any ports you dont need to regularly interact with to the internet.

Also, Look into crowdsec as a fail2ban replacement. Its uses automatically crowdsourced info to pre block IPs. A bit more proactive compared to abuseipdb manual reporting.

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

I have the firewall of my VPS reject any IP range except the ones I’m on frequently, that is mobile, home and work. Sucks when you travel, but otherwise works alright.

Still exposes ports to some people on the same mobile or home internet service networks…

Sorry, misunderstanding here, I'd never open SSH to the internet, I meant it as "don't block it via your server's firewall."

[–] drkt@scribe.disroot.org 10 points 4 days ago (2 children)

They can try all they like, man. They're not gonna guess a username, key and password.

[–] Ptsf@lemmy.world 21 points 4 days ago (10 children)

Doesn't take that to leverage an unknown vulnerability in ssh like:

https://blog.qualys.com/vulnerabilities-threat-research/2024/07/01/regresshion-remote-unauthenticated-code-execution-vulnerability-in-openssh-server

That's why it's common best practice to never expose ssh to raw internet if you can help it; but yes it's not the most risky thing ever either.

[–] drkt@scribe.disroot.org 32 points 4 days ago (3 children)

If you're going to open something, SSH is far, far more battle-tested than much other software, even popular software. Pragmatically, If someone is sitting on a 0-day for SSH, do you genuinely think they're gonna waste that on you and me? Either they're gonna sell it to cash out as fast as possible, or they'll sit on it while plotting an attack against someone who has real money. It is an unhealthy level of paranoia to suggest that SSH is not secure, or that it's less secure than the hundreds of other solutions to this problem.

Here is my IP address, make me eat my words.
2a05:f6c7:8321::164 | 89.160.150.164

[–] teawrecks@sopuli.xyz 19 points 4 days ago

Are you giving random strangers legal permission to pentest you? That's bold.

[–] pm_me_your_puppies@infosec.pub 14 points 4 days ago (3 children)

You got balls to post you public addresses like that... I mean I agree with you wholeheartedly and I also have SSH port forwarded on my firewall, but posting your public IP is next-level confidence.

Respect.

[–] crater2150@feddit.org 12 points 4 days ago (1 children)

Well, having a domain is basically documenting your IP publicly. It's not that risky.

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

Well, those won’t typically have ssh exposed on them. But we could argue what is more risky to have exposed, ssh or http. Any publicly available server could be vulnerable, it’s just very unlikely these days (with up to date software).

That is some big dick energy ngl

[–] Diurnambule@jlai.lu 3 points 3 days ago

Plot twost, That it's neighbor ip

[–] Ptsf@lemmy.world 4 points 4 days ago (1 children)

I linked a relevant vulnerability, but even ignoring that, pragmatically, you feel they'd be targeting specific targets instead of just what they currently do? (That, by the way, is automating the compromise of vulnerable clients in mass scale to power botnets). Any service you open on your device to the internet is inherently risky. Ssh best practices are, and have been since the early days, not to expose it to the internet directly.

[–] drkt@scribe.disroot.org 6 points 4 days ago* (last edited 4 days ago) (3 children)

You did link a vulnerability! That is true. I didn't claim SSH had a clean track record, I claimed it had a better track record than most other software. That vulnerability is hard to exploit, and generates a lot of noise if you were to try, which nobody has because it's never been found in the wild.

People who sit on 0-days for critical software like SSH don't go out and try to mass-exploit it because it will be found within the day and patched within the week once they start making noise. This is not a quiet exploit. If they're smart, they sell it. If they're ambitious, they build an elaborate multi-chain attack against a specific target. Only 0.14% of devices vulnerable to this exploit are EoL versions of OpenSSH, so once this was patched, it was no longer a useful attack vector.

It would also have been completely negated by fail2ban, which is prominently deployed on internet facing SSH, as it required thousands and thousands of connection attempts to trigger the condition. It could also have been mitigated by not running sshd as root, though I understand that most people don't want to deal with that headache even though it is possible.

There are thousands of independent honeypots that sit quietly and sniff all the mass-attacks and they earn their daily bread by aggregating and reporting this data. If you run a mass exploit, you will be found within the day. Trust me, I burned an IP address by regularly scanning the whole IPv4 space. You are going to end up on blacklists real fuckin' fast and whatever you were doing will be noticed and reported.

If you're going to open something, SSH is a very safe choice. But yes, don't open it if you don't need it. We are discussing how to open a service to the internet safely, though, so we need it.

load more comments (3 replies)
load more comments (9 replies)
[–] anzo@programming.dev 3 points 4 days ago

Only the failed attempts could be a Denial Of Service and throw you out. So, at least add an ever increasing delay to those. Fail2ban is important.

[–] Everyday0764@lemmy.zip 2 points 3 days ago

i have ssh on a random port and only get so many scan, so low that fail2ban never banned anyone that was not myself (accidentally).

[–] troed@fedia.io 5 points 4 days ago

So? Pubkey login only and fail2ban to take care of resource abuse.

[–] Auli@lemmy.ca 1 points 3 days ago

Ssh has nothing to do with scanning. Your IP and everyone else up is being scanned constantly. In ipv4 space at least.

load more comments (4 replies)
[–] TribblesBestFriend@startrek.website 5 points 4 days ago (1 children)

Cool if I understand only some of things that you have said. So you have a beginner guide I could follow?

[–] dataprolet@lemmy.dbzer0.com 9 points 4 days ago (1 children)

Take a look at Nginx Proxy Manager and how to set it up. But you'll need a domain for that. And preferably use a firewall of some sort on your server and only allow said ports.

[–] TribblesBestFriend@startrek.website 5 points 4 days ago (1 children)

I’ve look a little on it, didn’t understand most of it. I’m looking for a comprehensive beginner guide before going foward

[–] wreckedcarzz@lemmy.world 10 points 4 days ago* (last edited 4 days ago) (1 children)

This isn't a guide, but any reverse proxy allows you to limit open ports on your network (router) by using subdomains (thisPart.website.com) to route connections to an internal port.

So you setup a rev proxy for jellyfin.website.com that points to the port that jf wants to use. So when someone connects to the subdomain, the reverse proxy is hit, and it reads your configuration for that subdomain, and since it's now connected to your internal network (via the proxy) it is routed to the port, and jf "just works".

There's an ssl cert involved but that's the basic understanding. Then you can add Some Other Services at whatever.website.com and rinse and repeat. Now you can host multiple services, without exposing the open ports directly, and it's easy for users as there is nothing "confusing" like port numbers, IP addresses, etc.

[–] scoobydoo27@lemmy.zip 1 points 4 days ago (1 children)

So I’m another newbie dummy to reverse proxies. I’ve got my jellyfin accessible at jellyfin.mydomain.com but I can only access it through the web. How do I share with other people who want to use the apps? I can’t get my apps to find my instance.

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

Can "your apps" access it when their device isn't on your home LAN?

[–] scoobydoo27@lemmy.zip 1 points 2 days ago (1 children)

That was the problem, I couldn't access anything away from my LAN. I finally figured it out though. I'm using Pangolin to access my services outside of my LAN and by default it adds a SSO option. Once I turned that off, my iPhone app was able to find my server through my domain name just fine. Thanks!

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

Do note that without that layer you were using Pangolin for, your system might be compromised by a vulnerability in Jellyfin's server or a brute force attack on your Jellyfin admin account.

[–] scoobydoo27@lemmy.zip 1 points 2 days ago (1 children)

Understood. I set a strong password and a max login attempt on my account.

If someone does get into my account, wouldn’t they only be able to watch what I have on my server anyway?

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

if they got in...

You're trusting Jellyfin to not have some form of privilege escalation attack available. I'm not saying they do have one or that anyone's exploiting it in the field, but yeah. Also if your Jellyfin admin account is allowed to download subtitles to content folders, a "just fuck shit up" style vandal-hacker could delete your media probably. If you mount the media read-only that wouldn't be a concern.

[–] scoobydoo27@lemmy.zip 1 points 2 days ago (1 children)

Gotcha. Jellyfin is my backup server behind plex so I’ll just keep it shut off unless I’m using it and set all security things I can within jellyfin when I am using it.

How likely is it someone even finds my server and domain?

[–] pory@lemmy.world 1 points 2 days ago

you're not particularly worried about "someone", you're worried about bots that are scanning IP ranges and especially default ports. A lot of people will install a program, not really understand what it does, and forward a port because the setup told them to. Then proceed to never update the program (or it's a poorly secured program in the first place).

[–] SapphironZA@sh.itjust.works 4 points 4 days ago (2 children)

Why would you need to expose SSH for everyday use? Or does Jellyfin require it to function?

Maybe leave that behind some VPN access.

[–] WhyJiffie@sh.itjust.works 3 points 4 days ago

I agree, but SSH is more secure than Jellyfin. it shouldn't be exposed like that, others in the comments already pointed out why

[–] cm0002@lemmy.world 2 points 4 days ago (3 children)

Also run the reverse proxy on a dedicated box for it in the DMZ

[–] Ptsf@lemmy.world 2 points 4 days ago

Honestly you can usually just static ip the reverse proxy and open up a 1:1 port mapping directly to that box for 80/443. Generally not relevant to roll a whole DMZ for home use and port mapping will be supported by a higher % of home routing infrastructure than DMZs.

load more comments (2 replies)