Hi y’all, thanks for the help with my question yesterday. I did a bit of homework, and I think I’ve got things figured out. Here’s my revised plan:

  1. configure a cron job to update DuckDNS with my IP address every 5 minutes

  2. use ufw to block all incoming traffic, except to ports 80 and 443, to allow incoming traffic to reach Caddy

  3. configure the Caddyfile to direct traffic from my DuckDNS subdomain to Jellyfin’s port

Does this seem right this time? Am I missing anything, or unnecessarily adding steps? Thanks in advance, I’ll get the hang of all this someday!

  • TarantulaFudge@startrek.website
    link
    fedilink
    English
    arrow-up
    4
    ·
    edit-2
    9 days ago

    It’s perfectly fine to host jellyfin online. Use a proxy server to enable TLS and do not use default ports 80/443. Use letsencrypt for free certificates. No need for VPN to access here either. Do not expose any other ports such as SSH on default ports. Lock down your jellyfin server and any other related services behind a VPN service and block access to Internet through other interfaces (except for port forwards on your ISP for jelly). Go high on port ranges since they typically aren’t scanned or blocked. Go dual stack for best results and don’t use your router address for IPv6 more than likely you have your own /64 choose a different address for port forwards. Do not assign this address to your internal servers. Use a reserved unrouted IPv6 range internally and do NAT6. Do not allow any raw IPv6 internet access

  • frongt@lemmy.zip
    link
    fedilink
    English
    arrow-up
    3
    ·
    9 days ago

    I still don’t recommend putting jellyfin on the Internet. It’s not designed for it. There are some API endpoints you can access without authentication, not to mention potential authentication bypass vulnerabilities.

    5 minutes is also probably too frequent. Leases are usually significantly longer. You might hit a rate limit and get blocked.

    • compostgoblin@lemmy.blahaj.zoneOP
      link
      fedilink
      English
      arrow-up
      0
      ·
      9 days ago

      Thanks for the tip! I’ll back the refresh rate off to be safe.

      I’m not sure I entirely understand your concern about putting Jellyfin on the internet. A large part of my interest in selfhosting is being able host my own music library, my own cloud storage, etc, and access it as an alternative to Spotify or Google Drive. Doesn’t that inherently mean that they need to be on the internet, if I want to be able to access them when I’m away from home?

      My goal has been to find a way to do that safely, but if that’s not possible, that’s good to know too, so I don’t keep trying to do the impossible.

      • AbidanYre@lemmy.world
        link
        fedilink
        English
        arrow-up
        4
        ·
        9 days ago

        Wireguard or tailscale are much better ways of accessing jellyfin from outside your network.

          • ExperiencedWinter@lemmy.world
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 days ago

            I highly recommend Tailscale, you can share machines/services with unlimited friends on the free tier, and all of the actual auth stuff is handled by someone who isn’t me.

          • frongt@lemmy.zip
            link
            fedilink
            English
            arrow-up
            1
            ·
            9 days ago

            Provide them with VPN access. If that’s too much for them, then they don’t get access. Tough. On the scale of security vs convenience, that’s nothing.

            If you really really want, you should at least see if you can put a WAF in front, and put the server itself somewhere it doesn’t have access to the rest of your network (a DMZ) so that if and when it gets hacked, it doesn’t compromise the entire network.

    • FreedomAdvocate@lemmy.net.au
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      3
      ·
      9 days ago

      It’s not designed for it

      Yet everyone in here tells everyone to switch from Plex, which is designed for it, to jellyfin lol

  • Creat@discuss.tchncs.de
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 days ago

    You don’t need to hard update your IP every 5 minutes. The typical DNS updaters (just use ddclient) can simply check if your IP is up to date and only update if it isn’t.

  • AbsolutelyNotAVelociraptor@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    1
    ·
    9 days ago

    If it’s for your personal use and no one else is going to connect, why don’t you just configure a wireguard tunnel to remotely connect to your server as if you were in LAN without exposing anything?

      • Onomatopoeia@lemmy.cafe
        link
        fedilink
        English
        arrow-up
        1
        ·
        edit-2
        9 days ago

        Tailscale has the Funnel feature too, which puts the endpoint on Tailscale’s servers.

        You could do both - Funnel for people who you don’t want to walk through setting up a client, and use the client for those who you’re willing to put the effort into.

        • bigboitricky@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          8 days ago

          I second this for the funnel feature

          It made my whole issue with ports easy since it forwards only one open port