[Bug]: `step` (client) does not properly run when using `launchd` to trigger the script (MacOS Sequoia 15.5)
Maintainers usually reply within 1 day
@hslatman is already working on this.
Since Nov 11, 2025.
Assessment
This issue has not been assessed yet.
Description
Steps to Reproduce
shell script to renew on a MacBook
#!/bin/bash
CERT_PATH="$HOME/cert.pem"
KEY_PATH="$HOME/key.pem"
PASSWORD_FILE="$HOME/.step-password"
PROVISIONER="[email protected]"
# Renew certificate
/opt/homebrew/bin/step ca certificate "$(whoami)@$(hostname)" \
"$CERT_PATH" \
"$KEY_PATH" \
--provisioner "$PROVISIONER" \
--password-file "$PASSWORD_FILE" \
--not-after=16h \
--force
launchd com.user.renew-cert.plist file
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd">
<plist version="1.0">
<dict>
<key>Label</key>
<string>com.user.docker-cert-renewal</string>
<key>ProgramArguments</key>
<array>
<string>/Users/<user>/renew-cert.sh</string>
</array>
<key>StartInterval</key>
<integer>57600</integer>
<key>RunAtLoad</key>
<true/>
<key>StandardOutPath</key>
<string>/Users/<user>/renewal-stdout.log</string>
<key>StandardErrorPath</key>
<string>/Users/<user>/renewal-stderr.log</string>
<key>EnvironmentVariables</key>
<dict>
<key>PATH</key>
<string>/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/opt/homebrew/bin</string>
</dict>
<key>ProcessType</key>
<string>Background</string>
</dict>
</plist>
- Copy the content of the shell file excerpt to
~/renew-cert.sh(/Users/<user>/renew-cert.sh). - Run
chmod +x ~/renew-cert.sh. - Ensure
stepis installed (brew install step). - Copy the content of the
plistfile excerpt to~/Library/LaunchAgents. - Replace
<user>with an actual user. - Trigger the new Launch agent off and back on.
It should run and create the logging outputs.
Your Environment
- MacOS Sequoia 15.7
stepversion: Smallstep CLI/0.28.7 (darwin/arm64), Release Date: 2025-07-14 05:36 UTCstep-caversion (on my remote machine): Smallstep CA/0.28.1 (linux/amd64), Release Date: 2025-05-12 21:09 UTC
Expected Behavior
The renew-cert.sh should be executed using launchd properly and create the expected cert.pem and key.pem files, the output should look something like:
✔ Provisioner: <redacted_provisioner> (JWK) [kid: _<redacted_id>]
✔ CA: https://<redacted_url>
✔ Certificate: /Users/<user>/cert.pem
✔ Private Key: /Users/<user>/key.pem
This should be the output you get when running renew-cert.sh from terminal.
Actual Behavior
The /Users/<user>/renewal-stderr.log will contain this:
client GET https://step-ca.my.world/provisioners?limit=100 failed: dial tcp 192.168.178.155:443: connect: no route to host
And the certificate creation will fail.
Additional Context
I can't exactly say for sure why this is, but I do have an idea:
- https://github.com/cirruslabs/orchard/issues/221
- https://github.com/hashicorp/consul/issues/21765
- https://github.com/hashicorp/consul/issues/21765#issuecomment-2943411845
I don't understand all the details, but judging by what I see it seems, that either an old version of Go is used or a particular flag is not set to generate the necessary UUID for MacOS to identify the application and show the popup regarding "Local Network access". I also don't see step ever requesting it.
Perhaps adding -B gobuildid to the ldflags would solve this?
$ dwarfdump --uuid /opt/homebrew/bin/step
UUID: 9FD8B88C-F25F-3B18-E2D6-576D65EAA410 (arm64) /opt/homebrew/bin/step
It has a UUID... this is not the issue it seems.
Contributing
Vote on this issue by adding a 👍 reaction.
To contribute a fix for this issue, leave a comment (and link to your pull request, if you've opened one already).
- Dominant language
- Go
- Stars
- 8.9k
- Forks
- 599
- Avg merge
- 21h 20m
- Merged PRs (30d)
- 15
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from smallstep/certificates
-
bug needs triage
Difficulty 1/5 Under an hour Newbie friendliness 84/100
smallstep/certificates#2863 ·
Maintainers usually reply within 1 day
-
needs triage
Difficulty 1/5 Under an hour Newbie friendliness 65/100
smallstep/certificates#2788 ·
Maintainers usually reply within 1 day
-
enhancement needs triage
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
smallstep/certificates#2730 · 1 comment · 2 reactions ·
Maintainers usually reply within 1 day
-
Difficulty 3/5 1-2 days Newbie friendliness 68/100
smallstep/certificates#2860 · 2 comments ·
Maintainers usually reply within 1 day
-
[Bug]: Tokens fail validation after the identity provider rotates its signing key until the JWKS cache expiresPossibly taken @APWHY claimed this 99 days ago. Openbug needs triage
Difficulty 3/5 1-2 days Newbie friendliness 35/100
smallstep/certificates#2831 · 3 comments ·
Maintainers usually reply within 1 day
All issues in smallstep/certificates
Similar issues
-
bug(terraform): a `kubernetes_manifest` the scan can't fully read is dropped and nothing says soOpen
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
OneBusAway/watchdog#455 ·
Maintainers usually reply within 1 day
-
help wanted
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
rootsiemen/loophole#97 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
SocialGouv/iterion#3889 ·
Maintainers usually reply within 1 day
-
Docs / Zero-code Instrumentation / Go - Outdated `Work In Progress` and Archived Repo ReferenceOpendocs
Difficulty 1/5 Under an hour Newbie friendliness 82/100
open-telemetry/opentelemetry.io#12890 ·
Maintainers usually reply within 1 day