aeleos / cloudflared

Cloudflare Tunnel Instructions and Template for Unraid
171 stars 21 forks source link

Container ignoring config.yaml #5

Closed mcd92 closed 3 years ago

mcd92 commented 3 years ago

Even after preparing the config.yaml file and saving it in the indicated folder (/mnt/user/appdata/cloudflared/, which is passed to the container as /home/nonroot/.cloudflared/), the service on the container does not seem to use it.

I also tried to change the Post arguments to

tunnel --config /home/nonroot/.cloudflared/config.yaml

but without success.

As I was writing this issue, I found what may be the solution: adding the parameter "Config" to the XML, as below.

image

aeleos commented 3 years ago

huh strange, can you post your log output when it fails to find config.yaml

mcd92 commented 3 years ago

So the last days I've been running the container smoothly, but instead of

tunnel run UUID

I used

tunnel --config /home/nonroot/.cloudflared/config.yaml run UUID

Now, I tried again to run the container - this time with the updated parameter --restart unless-stopped. And it seems to be absolutely necessary for the container to run properly.

Thank you!

aeleos commented 3 years ago

You shouldn’t need to pass the config file in, as that is one of the default locations (~/.cloudflared) but if it works it works. Also, if you update to the latest dockerhub version, the cloudflared daemon wouldn’t need to update, so you won’t need to use —restart always, but it’s probably good to have it just in case.