You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
docs(install): surface the env-var-vs-pipe trap before the var table
Restructure the install page so the curl|bash env-var gotcha is
documented immediately after the one-line install — readers see three
explicit examples (two ✓ shapes, one ✗) before they encounter the list
of supported variables. Previously the explanation came after the
table, by which point most readers will have already constructed the
broken `VAR=... curl ... | bash` form.
Fold the standalone "Custom domain" section into "Customizing the
install" since it's the same mechanism, and update the hub doc's link
to the new anchor.
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
The variable must be on the **bash** at the tail of the pipe, not the `curl`. `SPANNORA_ALLOWED_ORIGINS=... curl ... | bash` does nothing — the var lives in curl's environment and never reaches bash. See [install docs](/docs/install/#passing-env-vars-correctly) for the full explanation.
30
+
The variable must be on the **bash** at the tail of the pipe, not the `curl`. `SPANNORA_ALLOWED_ORIGINS=... curl ... | bash` does nothing — the var lives in curl's environment and never reaches bash. See [Customizing the install](/docs/install/#customizing-the-install) for the full explanation.
31
31
32
32
To clear the allowlist later, re-run the installer with the variable **unset** — the drop-in is removed.
Copy file name to clipboardExpand all lines: packages/site/src/pages/docs/install.mdx
+14-21Lines changed: 14 additions & 21 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -36,19 +36,27 @@ What it does:
36
36
37
37
Visit `https://<your-vm-ip>.sslip.io/setup`, paste the setup token, create your account, and you're in.
38
38
39
-
## Custom domain
39
+
## Customizing the install
40
40
41
-
Point an A record at your VM, then run:
41
+
The installer reads a handful of environment variables. **The variable must be set on `bash`at the end of the pipe, not on `curl` in front** — `curl` and `bash` are separate processes and a pipe doesn't carry environment across them.
The installer will configure the proxy and request a certificate for that hostname instead of `sslip.io`.
55
+
That last shape is what the prefix looks like in most `cmd | bash` recipes online, so it's a natural thing to type — but it silently does nothing here. The installer prints which overrides it saw at the top of its output; if your variable doesn't show up there, you've hit this trap.
48
56
49
-
## Other install options
57
+
If you're setting `SPANNORA_DOMAIN`, point an A record at your VM first — Let's Encrypt's HTTP-01 challenge needs DNS to resolve before the installer can provision a cert.
50
58
51
-
The installer respects a handful of environment variables:
59
+
### Supported variables
52
60
53
61
| Variable | Purpose |
54
62
|---|---|
@@ -58,22 +66,7 @@ The installer respects a handful of environment variables:
58
66
|`SPANNORA_ACME_EMAIL`| Email registered with Let's Encrypt. |
59
67
|`SPANNORA_ALLOWED_ORIGINS`| Comma-separated origins permitted to talk to this install (needed for cross-origin [hub](/docs/hub/) access). Re-run unset to clear. |
60
68
61
-
### Passing env vars correctly
62
-
63
-
The variable must be set in the **bash** process at the end of the pipe, not the `curl` in front. Two shapes that work:
`SPANNORA_ALLOWED_ORIGINS=... curl ... | bash` does **not** work — the variable lives in curl's environment and never reaches bash. Same trap applies to all the variables above.
75
-
76
-
The installer is idempotent: re-running with `SPANNORA_ALLOWED_ORIGINS` set writes a systemd drop-in at `/etc/systemd/system/spannora.service.d/origins.conf`; re-running with it unset removes that drop-in.
69
+
The installer is idempotent: re-running with `SPANNORA_ALLOWED_ORIGINS` set writes a systemd drop-in at `/etc/systemd/system/spannora.service.d/origins.conf`; re-running with it unset removes that drop-in. The main systemd unit is rewritten on every install, so the drop-in is how CORS config survives upgrades.
0 commit comments