ive got my Tunnel-Service Running via ‘cloudflared tunnel run’
but i want to run this process as a service.
According to the docs // developers Cloudflare com/Cloudflare-one/connections/connect-apps/run-tunnel/as-a-service/linux/
It can be done very simple with the ‘cloudflared service install’
Sadly i cant access this. Entering the command only returns:
"Use ‘cloudflared tunnel run’ to start tunnel "
This return happens when the tunnel is active and not active.
Have i overlooked something?
Kind regards,
Erik
Ive now tried to update my cloudflared to the newest amd64 .deb version. I could not install the package using dpkg -i because im running freebsd-amd64
Great! I managed to upgrade to the 2022.6.2 version. But my problem is not solved. ‘cloudflared service install’ still returns “Use ‘cloudflared tunnel run’ to start tunnel”
‘cloudflared service install’ is not the command to run cloudflared on FreeBSD. The command displayed in the error tells you how to manually invoke cloudflared.
If you want to run it as a service on FreeBSD you need to set it up in your /etc/rc.conf or other adjacent config files such as /etc/rc.conf.local or under /etc/rc.conf.d/ as appropriate to your particular system.
You man find the rc.conf options from the ports tree relevant.
I added these lines to my rc.conf:
’
cloudflared_enable=“YES”
cloudflared_conf=“./cloudflared/config.yml”
cloudflared_mode=“tunnel run”
’
is this correct?
I tested it but my tunnel did not start. Thanks for your Help.
That looks off to me. The dot at the beginning of your config filename indicates a path relative to the current, but what is the current directory in the context of the FreeBSD rc init system?
What is the absolute path to your config.yml? Is there a reason you are not simply putting it where the default value expects to find it and not specifying a value in your rc.conf? (Presumably that would be /etc/cloudflared/config.yml, but short of spinning up my own FreeBSD vm and testing, I don’t know with absolute certainty.)