I’m struggling with this subject even after reading and videos. I’m trying to use nginx proxy to expose a handful of services to the public internet.

My domain is managed by Cloudflare and I believe I have Nginx setup properly with SSL api from cloudflare. Im struggling to understand the dns settings section of cloudflare.

Am I to make an A record with my domain and point it to my public IP? Then enable Cloudflare proxy service. Then a CNAME record would be the subdomain to whatever service I want and then setup properly in nginx proxy?

If I don’t have a static IP from my ISP is there a way to automatically update my dynamic IP in Cloudflare so I don’t loose access?

I’ve been trying to get this to work for the past two days now with very little success.

  • zfaB
    link
    fedilink
    English
    arrow-up
    1
    ·
    11 months ago

    You can either point the Cloudflare Tunnel directly to the backend, or point it to the service on NPM and keep that in place proxying to the backends.

    Whilst the latter seems to duplicate functionality, it does allow you (down the track?) to have local access use the same hostname as public access by defining local DNS entries for subdomain.example.com which point to the NPM IP address (instead of resolving to Cloudflare’s IP address when looked up on public DNS servers).

    I would think most homelabber/self-hosters end up with that topology as opposed to having everything have to go through Cloudflare even when its purely local access at home.

    • ChiefLewusOPB
      link
      fedilink
      English
      arrow-up
      1
      ·
      11 months ago

      Thank you! I’ll do a little studying on tunnels and try and implement it.

      • zfaB
        link
        fedilink
        English
        arrow-up
        1
        ·
        11 months ago

        No worries, HMU if you need anything else but the docs are stellar and once you get your head around the concept and have a play I’m sure you’ll find it just set and forget. GL.