Skip to content

cloudflared service install broken on macOS #327

@adamfeldman

Description

@adamfeldman

Doc: https://github.com/cloudflare/cloudflare-docs/blob/production/products/cloudflare-one/src/content/connections/connect-apps/run-tunnel/run-as-service.md

Steps to reproduce

  1. sudo cloudflared service install
  2. tail -f /Library/Logs/com.cloudflare.cloudflared.err.log /Library/Logs/com.cloudflare.cloudflared.out.log
  3. Observe repeating line in error log Use `cloudflared tunnel run` to start tunnel MY_TUNNEL

Expected result:

Seeing the usual tunnel startup info in the logs

A fix that worked for me

Edit /Library/LaunchDaemons/com.cloudflare.cloudflared.plist

Original (runs /usr/local/bin/cloudflared)

                <array>
                        <string>/usr/local/bin/cloudflared</string>
                </array>

Fixed (runs /usr/local/bin/cloudflared tunnel run)

                <array>
                        <string>/usr/local/bin/cloudflared</string>
                        <string>tunnel</string>
                        <string>run</string>
                </array>

ref: https://developer.apple.com/library/archive/documentation/MacOSX/Conceptual/BPSystemStartup/Chapters/CreatingLaunchdJobs.html

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions