Run 2 cloudflared instances on 1 machine

Hi all,

I’m trying to add some application tunnels together with a network tunnel, and as far as I know, I need to run 2 separate cloudflared instances for that, right?

Question I have is now: I’ve got 2 separate config files with corresponding other needed files. But I don’t have a clue on how to install both as a service next to eachother. 1 service is already up and running, but as soon as I want to install a 2nd service, I get the following error:

# cloudflared --config /root/.cloudflared/instance2/config.yml service install
Possible conflicting configuration in /root/.cloudflared/instance2/config.yml and /etc/cloudflared/config.yml. Either remove /etc/cloudflared/config.yml or run `cloudflared --config /etc/cloudflared/config.yml service install`

Any idea on how to install this 2nd service next to the 1st one?


I followed these instructions from @matteo:

1 Like

Thanks a lot @sdayman ! This indeed is how to do it.

Much appreciated,

1 Like

You can run a single tunnel for both purposes.


credentials-file: /path/to/uuid.json
tunnel: uuid

- hostname:
  service: http://localhost:23986
- hostname:
  service: ws://localhost:23982
- hostname: *
  service: http_status:404

  enabled: true
1 Like

But there is no way to actually specify the CIDR ranges in the config file, right? They have to be specified via the command line, on any machine that has cloudflared installed?

I thought it needed a 2nd instance, based on this discussion

That is correct. Any cloudflared that has a cert.pem for that account will be able to define which CIDRs are routable to the tunnel ID.

Maybe there was some limitation at some point in time.
I assure you it is possible to do what I described above.


Didn’t know… tried it and it indeed works with only 1 instance! Great!

Thanks a lot for these wonderful solutions!

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