Just getting started with self hosting. I was wondering if anyone had experience with Cloudflare Tunnels for exposing their services to the internet. I like the simplicity and security it offers but don’t love the idea of using Cloudflare. Like, I’m self hosting for a reason lol. Any tips would be greatly appreciated!

For context, I’m running all of my services in a very small k8s cluster and my priorities are mostly security then maintainability. Thanks yall!

  • statiksh0ck@lemmy.usuck.fyi
    link
    fedilink
    English
    arrow-up
    4
    ·
    8 hours ago

    Pangolin is also pretty straight forward. I set it up a few months ago to test out on a new server I was firing up and I’ve decided to just switch all my other servers running nginx-proxy-manager over to it.

    Also, if you’re just accessing it yourself and have maybe a handful of people who’d be using it, I’d recommend just setting up Headscale.

    TLDR: Pangolin or Nginx-Proxy-Manager or Tailscale + one of the previously mentioned reverse proxy solutions.

    • this@sh.itjust.works
      link
      fedilink
      English
      arrow-up
      1
      ·
      44 minutes ago

      Pangolin is great, I can expose things like game servers on it and have my entry point in a geographically close data center to keep the ping time lower than other options would let me.

      I’m currently trying out the managed self hosted version, it seems a bit slower, but you also get ha with it which is pretty cool.

  • ragingHungryPanda@piefed.keyboardvagabond.com
    link
    fedilink
    English
    arrow-up
    2
    ·
    8 hours ago

    I switched to it because the ISP blocked ports 80/443. It was good and things actually got a bit faster with them handling SSL certs.

    but one thing to note is that the free tier has a 100MB file limit. I got around some of that by using the tail scale vpn with a custom domain entry to point to the local network.

    I did these changes (wire guard to tail scale, dns to tunnels, etc) at different times, which is why things aren’t very consistent.

  • pfjarschel@lemmy.world
    link
    fedilink
    English
    arrow-up
    12
    ·
    16 hours ago

    The service is ok, but if you (rightfully) do not want to be tied to Cloudflare, take a look at Tailscale Funnels. Same concept, but from a company that values the user and their privacy. Also, for regular personal/small user base, free tier is more than enough. And you get a free .ts.net subdomain to use with your apps, if you need that.

  • topnomi@fedia.io
    link
    fedilink
    arrow-up
    5
    ·
    14 hours ago

    I run a jellyfin server. I have gigabit fiber in ohio, USA. Some of my users found it basically unusable when they were geographicly far away, like Hawaii and Thailand. I switched to using cloudflare tunnel as an experiment and the difference was dramatic. They are now able to stream reliably almost as if they were geographically nearby. The fact of the matter is, the cloud flare CDN that’s traffic passes through using the tunnel is infinitely better connected to the rest of the world than whatever home ISP you have.

    That being said, cloudflare plays man in the middle to all your traffic, so I wouldn’t use it for anything that’s particularly secret. But for standard web pages it’s amazing. I run my vaultwarden server directly on my home ip address and not through cloudflare tunnel.

    • observantTrapezium@lemmy.ca
      link
      fedilink
      English
      arrow-up
      4
      ·
      12 hours ago

      Vaultwarden isn’t actually susceptible to man-in-the-middle attacks, since the passwords are encrypted and decrypted on the end device. But some relevant metadata do go over the connection so it’d better have TLS.

  • talentedkiwi@sh.itjust.works
    link
    fedilink
    English
    arrow-up
    10
    ·
    17 hours ago

    I’m using Pangolin, which is the current hotness. It’s somewhat like cloud flare tunnels, but you need a VPS (find a cheap one). That tunnels back to your house. I opted into using crowdsec as another later. It’s a part of their setup process.

  • urvon@lemmy.world
    link
    fedilink
    English
    arrow-up
    5
    ·
    17 hours ago

    Does your use case include random people on the internet accessing these services or is it just for you? If it’s just you and a couple friends and their devices look into Headscale

  • hendrik@palaver.p3x.de
    link
    fedilink
    English
    arrow-up
    5
    ·
    edit-2
    17 hours ago

    Cloudflare is very popular, there should be plenty people around with experience. And Cloudflare is convenient and fairly easy to use. I wouldn’t call them “secure” though. I mean that depends on your definition of the word… But they terminate the encryption for you and handle certificates, so it’s practically a man-in-the-middle, as they process your data transfers in cleartext. But as far as I know their track-record is fine. I have some ethical issues because they centralize the internet and some of their stuff borders on snake-oil… But it’s a common solution if you can’t open ports in your home internet connection, need some caching in front of your services, something to block AI scrapers, or you need a web application firewall as a service.

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        9 hours ago

        I’m fairly sure what you mean is, traffic is decrypted in the middle and the re-encrypted before it gets sent your way. Otherwise they couldn’t do proxying or threat detection/mitigation.

        • 3abas@lemmy.world
          link
          fedilink
          English
          arrow-up
          3
          ·
          8 hours ago

          You’re right, sorry, that was a heavy brain fart. The data needs to be decrypted on cloudflare’s end before being proxied and send to your services.

      • hendrik@palaver.p3x.de
        link
        fedilink
        English
        arrow-up
        2
        ·
        edit-2
        8 hours ago

        Seems some people here advocate for a VPS, and I do it as well. I pay roughly 7€ a month for a small(ish) server with 4 cpu cores, 8GB of RAM and 256 GB of storage. That allows me to host a few services there, for example some websites and matrix chat, which I don’t want to go down if there’s an issue at home. And it allows me to do reverse proxying there, so I have the entire chain under my control. But there’s many ways to do it, and several other tunneling solutions (boringproxy.io, nohost.me, pagekite, ngrok, …) that I heard of.

        And a lot of home internet connections allow port-forwarding. Not sure what your provider does, but I can simply open ports in my router and make them accessible from the outside, no VPS or Cloudflare needed. That’d be the direct solution. (And what I use for my personal services on my NAS.) Just mind that discloses your internet connection’s IP address to visitors, so they’ll learn the name of your provider and your rough location.

  • stu42j@piefed.social
    link
    fedilink
    English
    arrow-up
    4
    ·
    16 hours ago

    What is the advantage of using a tunnel vs dynamic DNS directly to your home IP address?

    • cmnybo@discuss.tchncs.de
      link
      fedilink
      English
      arrow-up
      9
      ·
      edit-2
      16 hours ago

      It only requires an outbound connection, which is needed if you’re stuck on CGNAT. It also provides DDoS protection and hides your IP address. It comes with the huge downside of using Cloudflare though.

  • AbidanYre@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    edit-2
    16 hours ago

    It’s easy to use and takes away some of the hassle.

    If you don’t like cloudflare you could find a VPS you do like and run Pangolin on it to get the same service but maybe not the same level of protection.

    I use Oracle’s free tier to host it. They’re probably worse than cloudflare as far as evil corporations go though.

  • chazwhiz@lemmy.world
    link
    fedilink
    English
    arrow-up
    6
    ·
    19 hours ago

    I just started using them and I like it. It’s a good balance of easy and secure for me. I just added the container to my stack and then use their UI to point a subdomain at the internal port. Security can go pretty extreme if you set up their whole zero trust thing.

    An alternative similar option is Pangolin. I’ve seen a lot of people like it to avoid Cloudflare, but I haven’t used it myself. There still has to be an endpoint running it, so you’ll need an external VPS, which then adds a cost to the equation but at least you control it.

    • hereforawhile@lemmy.ml
      link
      fedilink
      English
      arrow-up
      3
      ·
      19 hours ago

      Cloudflared CLI for reverse proxy is as dummy proof as hosting a hidden onion site over Tor. I like it’s simplicity but I know I’m relying on a non free network.

  • Rikudou_Sage@lemmings.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    18 hours ago

    If you want to self host, rent some cheap server somewhere (I use Hetzner) the will act as a proxy and then configure frp.

    It’s basically what Cloudflare tunnel does, except you need to provide the public server instead of Cloudflare giving you one for “free.”

  • solrize@lemmy.ml
    link
    fedilink
    English
    arrow-up
    3
    ·
    17 hours ago

    I just found out about cloudflared, it looks straightforward but you need a cloudflare account to use it. IDK what (if anything) they charge for it.

    I have generally just used a VPS for this. I’ve done it through an ssh reverse proxy which is pretty crappy, but a more serious approach would use iptables forwarding or wireguard or whatever the current hotness is.

  • Machindo@lemmy.ml
    link
    fedilink
    English
    arrow-up
    2
    ·
    edit-2
    16 hours ago

    Two of my coworkers with kubernetes homelabs use the Helm Chart deployment of this and they like it very much. All my domains are in Cloudflare so this is a no brainer.

    I would like to try this with their SSO offering so that I could just handle auth at the tunnel instead of something like Dex in front of each service in the cluster.

  • Abe@civv.es
    link
    fedilink
    arrow-up
    2
    ·
    18 hours ago

    @[email protected] You Could in theory just use wireguard with nginx.

    DNS pointing to Public VPS -> Nginx running on public vps -> Nginx resolving to internal wg IPS -> Any of your other devices.

    • WhosMansIsThis@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      1
      ·
      16 hours ago

      Yeah this is a great idea. I was thinking of doing something similar but saw someone mention cloudflare tunnels in another post and figured I’d ask the community. I appreciate you!