Hi, I know this topic has been talked about 70 thousand times but I’m still not sure.

I have home server on an intel NUC behind the ISP router. On it I have the standard arr apps, jellyfin, pi-hole etc etc. I would like to access them through a domain rather than an IP. So I set them up in docker, behind traefik, behind authelia and behind cloudflare. I am the only one that uses it.

Now, I’m worried about the security of it all. I’ve been searching here and there and I’ve read about cf tunnels, wireguard server, vps, vlan, OPNsense etc etc. I still don’t know what would be the most secure. Should I just stay with what I have?

EDIT: I’m not behind CGNAT

  • jeikashu@lemmy.zipOP
    link
    fedilink
    English
    arrow-up
    3
    ·
    11 months ago

    Thanks for this awesome write-up.

    Yeah, that’s what I’m kind of thinking about Cloudflare, so I’m trying to set up WireGuard right now. I don’t know if I’m shooting myself in the foot by trying to do in docker for now or not, but I’d rather do that before I do it on bare metal. It seems to work already, as I can see that my IP changes on my phone when I access it. Hell, I can even access my routers’ dashboard. However, I still can’t access the services on the server (by IP, like 192.x.x.x:8989), so I’m trying to figure that out.

    May I ask, why do I need a domain if I’m going through WireGuard, which goes through the IP and port, anyway?

    • theit8514@lemmy.world
      link
      fedilink
      English
      arrow-up
      3
      ·
      11 months ago

      If your home ip changes a lot a dynamic dns provider will keep up with it so you don’t constantly have to change your phone’s wireguard configuration

      • jeikashu@lemmy.zipOP
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        Ohhhhh, that makes sense. I might consider it in the future. I don’t think it changed once so far. If it does, I’ll come back to that, thanks :)

    • lemmyvore@feddit.nl
      link
      fedilink
      English
      arrow-up
      1
      arrow-down
      1
      ·
      edit-2
      11 months ago

      Before you invest a lot of time into this just wanted to say that it’s a 2m job with Tailscale. You install it on the server and on your phone (or laptop whatever), you start it, and you can access anything on the server at a short name you can customize fully, or at a long name you can pick from randomly generated choices generated by Tailscale. (The long name is usually only relevant if you’re going to expose your server to the internet or in unusual DNS setups, if you just want to access the server from your phone the short name will do.)

      OP’s list is great for learning and for full control but if you just want to solve your problem fast, you can.

      • jeikashu@lemmy.zipOP
        link
        fedilink
        English
        arrow-up
        3
        ·
        11 months ago

        I’m either lucky or it’s stupid easy to install wireguard. I put basic config in docker compose, downloaded the app, port forwarded and I’m good. Even pihole works. It’d haven taken me 5 mins if it wasn’t for the firewall

        • Yas@lemm.ee
          link
          fedilink
          English
          arrow-up
          3
          arrow-down
          2
          ·
          11 months ago

          One of the other benefits of Tailscale is device management. Wireguard is an awesome tool (Tailscale uses it under the hood), but adding new devices is more work with Wireguard, as you have to generate keys and share the public keys (and do some IP management). With Tailscale it’s pretty much install the app and allow the device with a click.

        • thedeadwalking4242@lemmy.world
          link
          fedilink
          English
          arrow-up
          1
          ·
          11 months ago

          Dont listen to people about tailscale. This is self hosting! Do it yourself it’s part of the fun. I don’t know why people are shilling corporate entities so hard here.