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

💡When running cloudflared tunnel route dns tunnel-name tunnel.x.com use the x.com zone #1295

Open
remorses opened this issue Jul 17, 2024 · 1 comment
Labels
Priority: Normal Minor issue impacting one or more users Type: Feature Request A big idea that would be split into smaller pieces

Comments

@remorses
Copy link

Describe the feature you'd like
Currently to create a tunnel you have to run the following commands (dx is already very bad, should be 1 command)

cloudflared tunnel  create tunnel-name
cloudflared tunnel route dns tunnel-name tunnel.example.com
cloudflared tunnel run --url http://localhost:5467  tunnel-name

This won't create a tunnel on tunnel.example.com if for some reason you used the cloudflared on another domain previously (for example x.com), instead it will create one on tunnel.example.com.x.com

Describe alternatives you've considered
Use the website with domain example.com if i am trying to create a tunnel there, not tunnel.example.com.x.com

Additional context
Maybe you have to run cloudflared tunnel login again? But there is only 1 global cloudflared config at /Users/user/.cloudflared/cert.pem, this doesn't make sense

@remorses remorses added Priority: Normal Minor issue impacting one or more users Type: Feature Request A big idea that would be split into smaller pieces labels Jul 17, 2024
@remorses
Copy link
Author

I think i managed to get this working, congrats on making the most user hostile cli i ever used, and i used a lot of clis

  1. Create the tunnel on the cloudflare website, the cli is useless, it will use whatever domain you selected the first time you logged in
  2. Now you have to download another tunnel token even if you already are logged in, because why not
  3. To do this run cloudflared tunnel token --cred-file .cloudflared/tunnel.json tunnel-name
  4. Now create a file .cloudflared/config.yml and add the contents
tunnel: tunnel-name
credentials-file: ./.cloudflared/tunnel.json
  1. Now you can finally run the tunnel with cloudflared tunnel --config ./.cloudflared/config.yml run --url http://localhost:8040 tunnel-name. Notice how you have to pass the config manually and not after run because otherwise it breaks. Cloudflared only searches ~/.cloudflared because everyone knows non reproducible user based global configs are the best

@remorses remorses changed the title 💡When running cloudflared tunnel route dns tunnel-name tunnel.x.com use the x.com website 💡When running cloudflared tunnel route dns tunnel-name tunnel.x.com use the x.com zone Jul 17, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Priority: Normal Minor issue impacting one or more users Type: Feature Request A big idea that would be split into smaller pieces
Projects
None yet
Development

No branches or pull requests

1 participant