Example YAML for cloudflared service?

Love the new DNS.

The instructions are great and I would really like to get the DNS to HTTPs resolver working as a service on one of our linux boxes. When you execute the instructions on the tutorial - it only runs on terminal and can be terminated. I would like it to run as a linux service.

The problem is that the Cloudflared dameon, whilst it does allow the install as:

Cloudflared service install

returns the following error:

INFO[0000] Failed to copy user configuration. Before running the service, ensure that /etc/Cloudflared contains two files, cert.pem and config.yml error=“open cert.pem: no such file or directory”

I can easily create the files, blank, in the directory, but I need a valid YAML to start the proxy-dns service and then set the address.

I tried with this as the config.yml as /etc/Cloudflared/config.yml - but it fails - looks like I have the syntax wrong.

I tried to guess the structure with:

address: 192.168.x.x (obfuscated!)

but this did not work.

As this is a new implementation of the Cloudflare Tunnel - there is no reference to it on the main Cloudflare Tunnel documentation.


Could I please have an example .yml file to load the proxy-dns and set the listening address. This would be a great help and assist with implementation.

Please accept my apologies if I have not framed this correctly - this is my first post to the forum.

The website has been updated with the YAML code - thank you.

1 Like

Just added it today! Make sure to upgrade to 2018.4.2 and let me know if you have any other problems.

I have tried by not functioning

  1. Had to create a cert.pem blank file in the /usr/local/etc/Cloudflared directory (not in instructions)
  2. Cannot get to run - appears too, but on netstat -tulpn no listening on port 53/UDP

Logging in as root direct on serial console:

root@dns:/usr/local/etc/Cloudflared# Cloudflared service install
INFO[0000] Applied configuration from /usr/local/etc/Cloudflared/config.yml
INFO[0000] Using Systemd
INFO[0000] systemctl daemon-reload

appears to load, but I get this:

root@dns:/usr/local/etc/Cloudflared# netstat -tulpn | grep “53”

Not listening on port 53

@matthewhaigh After attempting to run your service, what does systemctl status Cloudflared return when you run it?