• 0 Posts
  • 5 Comments
Joined 1 month ago
cake
Cake day: February 5th, 2025

help-circle


  • Xanza@lemm.eetoSelfhosted@lemmy.worldOMV remote access
    link
    fedilink
    English
    arrow-up
    1
    ·
    edit-2
    4 hours ago

    But I’m a bit lost which approach and tools to use without exposing and making my NAS vulnerable on the internet.

    You’re looking for a reverse proxy;

    *.domian.dev {
            encode zstd gzip
            @jelly host jelly.domian.dev
            handle @jelly {
                    reverse_proxy {selfhost_ip}:{port}
            }
            @ping host ping.domian.dev
            handle @ping {
                    respond "pong!"
            }
    }
    

    Running caddy like this directly connects your jelly.domain.dev domain to your selfhost ip on a specific port. From within your selfhost you ensure that you’re only allowing in the IP of the VPS, so no one can else can directly connect.

    Works great. I use this myself. I have a local NAS (with media) and run a jellyfin server from my PC (to use my GPU for transcoding). The jellyfin server only allows 1 remote IP (my VPS), and local connections. The local jellyfin server can be accessed via my domain at jelly.domain.dev.