I am trying to set up CloudFlare Tunnels on a Raspberry Pi running 64 bit Ubuntu.
I followed the Tunnel Guide instructions and that part seemed seemed to work.
Now I’m trying to follow the Run as a service instructions because I want this tunnel to run all the time whenever the Raspberry Pi is turned on, but I keep on getting this error, even though I think I created the file in the expected location.
[email protected]:~$ sudo cloudflared service install
Cannot determine default configuration path. No file [config.yml config.yaml] in [~/.cloudflared ~/.cloudflare-warp ~/cloudflare-warp /etc/cloudflared /usr/local/etc/cloudflared]
[email protected]:~$ ls ~/.cloudflared
xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx.json cert.pem config.yml
I’ve already tried starting from scratch with a fresh install of Ubuntu and I ran into the same error again. Any ideas?
I suspect it’s not working because sudo isn’t looking at your “ubuntu” user home directory.
Ultimately, all my files end up in /etc/cloudflared/ and readable by all.
I’d suggest you leave local config files where they are meant to be.
I think the problem is with cloudflared not looking in the correct directory and reporting to you that it can’t find the file.
Use the --config option and pass the full path to where your config file resides to cloudflared. For example:
sudo cloudflared --config /home/username/.cloudflared/config.yml service install
This will force cloudflared to look exactly where you want it to.
That makes sense, though I always ended up with duplicate copies in /etc/cloudflared, and I haven’t taken the time to try some cleanup.
That definitely seemed to be the problem, thanks!
This works. I think it’s because it is lacking the permission as @sdayman said.
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.