#24045·netdata

[Bug]: [Bug]: kickstart.sh rejects every --claim-url / --claim-proxy on macOS (BSD grep: "repetition-operator operand invalid")

Author: methanoyaCreated Sep 26, 2026Updated Sep 26, 2026
Labelsbugneeds triage

Bug description

On macOS, if you pass --claim-url to kickstart.sh, it aborts every time, even when the URL is the default:

grep: repetition-operator operand invalid
 ABORTED  https://app.netdata.cloud is not a valid claim URL

The cause is the regex in is_valid_url() (packaging/installer/kickstart.sh, around line 396):

(/[-A-Za-z0-9._~:/?#\[\]@!$&'()*+,;=]*)?$ In POSIX ERE, a backslash inside a bracket expression is a literal character, not an escape. BSD grep therefore ends the bracket expression at the ] that follows \[\, and reads the remainder @!$&'()*+,;=]* as a pattern. There, ()*+ applies + to a repetition, which BSD grep refuses to compile. grep -qE exits non-zero, and the URL is reported as invalid. GNU grep is lenient about this pattern, so the bug does not appear on Linux. --claim-proxy uses the same function, so it fails the same way.

Expected behavior

--claim-url https://app.netdata.cloud is accepted on macOS and FreeBSD.

Steps to reproduce

  1. On macOS, with the system /usr/bin/grep: curl https://get.netdata.cloud/kickstart.sh > /tmp/netdata-kickstart.sh && sh /tmp/netdata-kickstart.sh --stable-channel --claim-token --claim-rooms --claim-url https://app.netdata.cloud
  2. The script aborts
bash
grep: repetition-operator operand invalid
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
 A FATAL ERROR WAS ENCOUNTERED!
 \/ \/ \/ \/ \/ \/ \/ \/ \/ \/

 ABORTED  https://app.netdata.cloud/ is not a valid claim URL

 /\ /\ /\ /\ /\ /\ /\ /\ /\ /\
 A FATAL ERROR WAS ENCOUNTERED!
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

Installation method

kickstart.sh

System info

bash
Darwin Hi.local 25.6.0 Darwin Kernel Version 25.6.0: Fri Jul 31 19:11:03 PDT 2026; root:xnu-12377.161.14~5/RELEASE_ARM64_T8132 arm64
ProductName:		macOS
ProductVersion:		26.6.2
BuildVersion:		25G83

Netdata build info

bash
not applicable

Additional info

Workaround is

bash
brew install grep
PATH="$(brew --prefix)/opt/grep/libexec/gnubin:$PATH" \
  sh /tmp/netdata-kickstart.sh ...