Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Proposed update on Update create-local-tunnel.mdx #18491

Open
Andre-ADPC opened this issue Dec 1, 2024 · 1 comment
Open

Proposed update on Update create-local-tunnel.mdx #18491

Andre-ADPC opened this issue Dec 1, 2024 · 1 comment
Assignees
Labels
content:edit Request for content edits documentation Documentation edits product:cloudflare-one

Comments

@Andre-ADPC
Copy link

Andre-ADPC commented Dec 1, 2024

Existing documentation URL(s)

https://developers.cloudflare.com/cloudflare-one/connections/connect-networks/get-started/create-local-tunnel/#3-create-a-tunnel-and-give-it-a-name

What changes are you suggesting?

I ran into trouble and wasted time trying to figure out how the Cloudflared subdomain .cfargotunnel.com should be applied when creating tunnels via the CLI and subsequent creation of a config.yml file or applied for external configuration purposes like when the tunnel gets used by webhooks (Although I'm still uncertain about this for webhooks, but I struggle to find information to verify this, Reference to Quick Tunnels (trycloudflare.com) and ngrok's approach with their free tier (ngrok-free.app) added to external webhook URL parameters combined with a randomised URL.)

The "naming" of the tunnel threw me off and from my POV it was never made clear that one needs to include one of your "TLDs" registered with Cloudflare as part of the tunnel name.

The proposed edit is an attempt to avoid possible ambiguities and remove uncertainty.

Additional information

Proposed addition to section 3.

The proposal is bordered within the section lines.

3. Create a tunnel and give it a name:

NOTE
<NAME> should consist of <tunnel-name> (optional) [DOT] <my-registered-TLD-on-Cloudflare>

For Example:
You are a Cloudflare client (any tier) and have a <some-org.net> TLD registered with Cloudflare.
You want to use a tunnel to route public traffic safely to <my-api-application> hosted on a private network or computer somewhere in your organisation.

So, <NAME> would become <my-api-application>.<some-org.net>.

You don't have to add the sub-domain section <my-api-application>, but it helps to identify your tunnel should you have more than one on the Cloudflare Zero Trust network offering.

cloudflared tunnel create <NAME>

Running this command will:


NOTE:

1. Cloudflare Automatically Generates the Subdomain ( .cfargotunnel.com):

This happens during the tunnel creation process (i.e., using the cloudflared tunnel create <NAME> command), Cloudflare assigns a unique subdomain in the .cfargotunnel.com namespace to your tunnel. You do not need to manually append .cfargotunnel.com to your tunnel name. This happens automatically.

3. What You Should Do When Using the Generated Subdomain in Configurations:

  • In the config.yml File Case:

    • The hostname field must include the complete subdomain, including .cfargotunnel.com, as generated by Cloudflare.

    • For example: <NAME> = your-tunnel-name

    ingress:
      - hostname: your-tunnel-name.cfargotunnel.com
        service: http://localhost:<port>

This fully-declared hostname defines how external requests are routed through the tunnel to the localhost service instances.

  • In Webhooks or External Integration Cases:

    • Use the same subdomain: .cfargotunnel.com in the FQDN; e.g., https://your-tunnel-name.cfargotunnel.com in configurations like GitHub webhooks.
    • For example:
https://your-tunnel-name.cfargotunnel.com/github-webhook/

@Andre-ADPC Andre-ADPC added content:edit Request for content edits documentation Documentation edits labels Dec 1, 2024
@Andre-ADPC
Copy link
Author

Andre-ADPC commented Dec 2, 2024

I made a few additional edits to my earlier comment.

Additional Edit: It seems I am totally incorrect about using the cfargotunnel.com subdomain addition or its use anywhere, including in the config.yml file.

My bad. I made inferences based on the appended subdomains applied when using the Quick Tunnels, however, with persistent tunnels cfargotunnel.com seems to be used internally to CF's network routing only.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
content:edit Request for content edits documentation Documentation edits product:cloudflare-one
Projects
None yet
Development

No branches or pull requests

3 participants