Hello - I have set up one tunnel and it is working really well.
I have created a second subdomain and would like to set up a second tunnel
ie first tunnel is subdomain1 . mydomain . com,
second tunnel is subdomain2 . mydomain . com
I have configured it as a tunnel but when I try to run the “cloudflared.exe service install …” on my Windows device on the local network I get this error:
“Installing cloudflared Windows service
cloudflared service is already installed at Cloudflared; if you are running a cloudflared tunnel, you can point it to multiple origins…”
Any advice on how I do this? I can’t find a solution online. Thanks
As it’s saying, use your single tunnel to serve both domains if both of the origins/web servers are on the same machine.
If you’re using Dashboard managed tunnels (modifying settings in the Zero Trust dashboard), it’s as simple as adding a second Public Hostname to your existing tunnel, just specify the new subdomain and the different service, and done.
If you’re managing the configuration locally, use ingress rules: Ingress rules · Cloudflare Zero Trust docs
and perhaps consider switching to dashboard managed tunnels at some point, they’re a lot less manual to work with and easier overall.
Then just create the necessary DNS Records after. The tunnel can do this for you, cloudflared tunnel route dns <tunnel name/id> subdomain2.mydomain.com