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?
What version of cloudflared are you using (
cloudflared --version)? Service was only supported a couple releases ago.
The Version is 2022.4.0 (built unknown)
I would upgrade to the latest, which is
2022.6.3. I want to say that service stuff was added around 2022.5.X but not certain.
Okay thanks i look into that!
Btw you got an idea how to update this service? Im kind of new to this
You can try
cloudflared update. Full instructions are here.
Hmm strange. When updating im greeted by the error “no release found”
Try manually downloading a newer version
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
You don’t want a deb package on FreeBSD. You need to use pkg or ports to obtain the FreeBSD binary.
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:
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.)
What errors do you see when attempting to start the service manually from the terminal?