I am trying to setup the argo tunnel for my domain with my local service

After running cloudflared tunnel, cloudflared is not able to create a DNS records for the new service which is present inside the config.yaml. Can someone please guide me if i am missing something?

[[email protected] .cloudflared]# cat config.yaml

after running cloudflared tunnel --config config.yaml run. It runs a tunnel successfully but couldn’t create DNS records so xyz.atyourstation.in is not accessible.

Did you create a tunnel via cloudflared tunnel create yourTunnel and specify the tunnel ID inside YML file? It looks like you only specify Ingress rule in the YML file.

Also, you need to do this after creating a tunnel:


yes i did.
[[email protected] .cloudflared]# cat config.yaml
tunnel: atyourstation
credentials-file: /root/.cloudflared/5d2f5b3f-373d-4377-a140-705220b9a025.json


This is my actual file.
[[email protected] .cloudflared]# cat config.yaml
tunnel: atyourstation
credentials-file: /root/.cloudflared/5d2f5b3f-373d-4377-a140-705220b9a025.json


[[email protected] .cloudflared]# cloudflared tunnel --config config.yaml run
2021-08-22T07:27:23Z INF Starting tunnel tunnelID=5d2f5b3f-373d-4377-a140-705220b9a025
2021-08-22T07:27:23Z INF Version 2021.8.2
2021-08-22T07:27:23Z INF GOOS: linux, GOVersion: devel +11087322f8 Fri Nov 13 03:04:52 2020 +0100, GoArch: amd64
2021-08-22T07:27:23Z INF Settings: map[config:config.yaml cred-file:/root/.cloudflared/5d2f5b3f-373d-4377-a140-705220b9a025.json credentials-file:/root/.cloudflared/5d2f5b3f-373d-4377-a140-705220b9a025.json]
2021-08-22T07:27:23Z INF Generated Connector ID: fe581285-fc3e-444a-8f0a-41319781483c
2021-08-22T07:27:23Z INF cloudflared will not automatically update if installed by a package manager.
2021-08-22T07:27:23Z INF Initial protocol http2
2021-08-22T07:27:23Z INF Starting metrics server on
2021-08-22T07:27:24Z INF Connection c20322eb-8b15-4965-a385-4c724be25066 registered connIndex=0 location=SOF
2021-08-22T07:27:25Z INF Connection 5551f1de-1f25-4914-8cc5-edc6da0c48c3 registered connIndex=1 location=BOM
2021-08-22T07:27:26Z INF Connection 05f8b34a-4b6c-43a5-a6bf-0f0c0bacc1fa registered connIndex=2 location=SOF
2021-08-22T07:27:27Z INF Connection 1979c8a8-a9a1-45c3-860b-e611ff3e199a registered connIndex=3 location=BOM

Nothing happens after this.

I believe you didn’t run cloudflared tunnel dns route command.

Refer to my previous reply (the link that I posted)

You are correct earlier i didn’t run dns route command. But i ran it now and it has created a CNAME record for me with my tunnelid.cfargotunnel.com. But now should i just run cloudflared tunnel --config config.yaml run and my traffic from xyz.atyourstation.in should be routed to my local service i.e. http://localhost:8002 ?

and if i have 100 services do i need to create 100 CNAME or i can just create it for root domain (atyourstation.in) and value of tunnelid.cfargotunnel.com?

My end goal is to create 100’s of services in the config.yaml and route the traffic according to their domain name.

if domain name user is trying to access is abc.atyourstation.in → http://localhost:8001
if domain name user is trying to access is xyz.atyourstation.in → http://localhost:8002

and i assumed that cloudflared will create AAA entry for me.

Yeah. You need 100 CNAMEs.

Whoa!! It started working. Then i think i was missing the creation of CNAME part (cloudflared tunnel dns route) which should route me to my tunnelId.cfargotunnel.com.

It was real quick. I really appreciate your response [erictung] (Profile - erictung - Cloudflare Community) thank you so much. :slight_smile: Have a nice day.

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.