Community Packages

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#75999 - [cloudflared] Package Is Missing Systemd Service File

Attached to Project: Community Packages
Opened by buzz (steadybright) - Saturday, 24 September 2022, 16:21 GMT
Last edited by George Rawlinson (rawlinsong) - Sunday, 25 September 2022, 01:18 GMT
Task Type Feature Request
Category Packages
Status Researching
Assigned To George Rawlinson (rawlinsong)
Architecture x86_64
Severity Medium
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 0%
Votes 0
Private No

Details

Description: No systemd service file appears to exist for the cloudflared package

Additional info:
* I migrated from cloudflared-bin to cloudflared today (9/24/22)
* Systemd was not able to start cloudflared following installation
* Systemd service file for cloudflared does not exist
* Copied backup service file from cloudflared-bin package into service folder
* Now able to use systemd to automatically run cloudflared at startup

Request that the cloudflared package be updated to include the systemd service file.
This task depends upon

Comment by loqs (loqs) - Saturday, 24 September 2022, 20:22 GMT
cloudflared embeds its suggested service files and config in the binary to be installed with `cloudflared service install`
Needs some way to have that installed in $pkgdir.
Comment by George Rawlinson (rawlinsong) - Sunday, 25 September 2022, 01:09 GMT
The reason that the files were missing from the package in community is because cloudflared & cloudflared-bin had vastly different configuration file(s) and systemd integration.

I'm looking into adding upstream's recommended configuration to the package in an update soon.
Comment by George Rawlinson (rawlinsong) - Sunday, 25 September 2022, 01:18 GMT
cloudflared can run in a few different modes depending on the sub-command (tunnel or proxy-dns), so I think an acceptable solution would be to have two separate systemd service files:

1. cloudflared@.service (mainly for proxy-dns)
2. cloudflared-tunnel@.service (for tunnel(s))

In both instances, %i would be the name of the configuration file in `ExecStart=/usr/bin/cloudflared --no-autoupdate --config /etc/cloudflared/%i.yml` (add `tunnel run` to end for cloudflared-tunnel@.service)

I'd appreciate some feedback, as no other downstream ships systemd integration. Even cloudflared's own deb/rpm packages only ship the binary.
Comment by buzz (steadybright) - Wednesday, 28 September 2022, 00:51 GMT
Hi George, I opened this request, but I do not consider myself qualified to give you useful feedback. I usually figure out what I need to know in Arch Linux using brute force. I will say that I use cloudflared per your use case #1 above (as a proxy-dns). Also, and I'm not disputing your statement above that "cloudflared-bin and cloudflared had vastly different configuration file(s)," although I was able to get cloudflared working simply by copying a backup of cloudflared-bin's .yml file to the clouflared folder. I don't know if that means anything significant; it just worked for me. Thank you again!
Comment by Stephen Cox (stephencox) - Saturday, 01 October 2022, 00:39 GMT
cloudflared-proxy-dns.service and cloudflared-tunnel.service makes sense for me

Loading...