How to point tunnel to multiple origins on one server?

hello. I am already using cloudflare tunnel for one domain on an ubuntu server.

And when I try to connect other domain to the tunnel on the same server, I get the following error.

error="cloudflared service is already installed at /etc/systemd/system/cloudflared.service; if you are running a cloudflared tunnel, you can point it to multiple origins, avoiding the need to run more than one cloudflared service in the same machine; otherwise if you are really sure, you can do `cloudflared service uninstall` to clean up the existing service and then try again this command"

But I am not sure how to point to multiple origins.

In my config.yml, it looks like this

tunnel: 66c2cd0a-349f-4a3e-8100-xxxxxxxx
credentials-file: /root/.cloudflared/66c2cd0a-349f-4a3e-8100-xxxxx.json
  enabled: true

Can somone tell me how I can change it to point to multiple origins?

Thank you.

You need to create Ingress Rules:

And then create DNS Records pointing to the tunnel (either manually or using cloudflared tunnel route dns).

You can create Zero Trust Dashboard controlled tunnels as well, where everything is controlled via the GUI and automatically updates your tunnel config, with that you’d just create new Public Hostnames and it would take care of DNS for you, recommended over local tunnel configs: Via the dashboard · Cloudflare Zero Trust docs

1 Like

HI Chaika,
I’ve setup a ssh tunnel through zero trust dashboard.
Now I want to add another http service on the same machine. But I got the same error as user20145 .

  • Can you please give explanation about how to create ingress rules in order to point my tunnel to multiple origins ?
  • In which folder should I create the config.yml file ?
  • where can I find my credentials file ?

Thanks for your help