docs: complete configuration reference (all env vars, verified against code)#76
Open
dchaudhari7177 wants to merge 1 commit into
Open
docs: complete configuration reference (all env vars, verified against code)#76dchaudhari7177 wants to merge 1 commit into
dchaudhari7177 wants to merge 1 commit into
Conversation
New docs/configuration.md: every env var RoamCode reads — one table per area (core, ROAMCODE_*, advanced/installer), each row with the default, effect, and source file, all verified against server-config.ts, data-dir.ts, start.ts, updater.ts, terminal-process.ts, config.ts, origin-check.ts, auth.ts, and scripts/install.sh. Drift found and fixed while verifying: - README and --help advertised VAPID_SUBJECT, but the code only reads ROAMCODE_VAPID_SUBJECT (or the legacy REMOTE_CODER_VAPID_SUBJECT) - README's TRUST_PROXY row only mentioned 1/true; the code's preferred form is a specific proxy IP/CIDR (trusting every hop is spoofable) README's config table links to the full reference; --help points at it too. Closes burakgon#71
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #71
What
New
docs/configuration.md— every environment variable RoamCode reads, one table per area as the issue asked (Core,ROAMCODE_*, Advanced/installer), each row = variable · default · effect · linked source file. Every default and behavior was read out of the code, not copied from the README:server-config.ts—PORT(0 = OS-picks, out-of-range = boot error),BIND_ADDRESS,TRUST_PROXY(three forms: IP/CIDR preferred,1/truetrusts every hop, else off),FS_ROOT,MAX_UPLOAD_BYTES,SESSION_IDLE_TTL_MS(opt-in reaper, sweep cadence fromtransport.ts), theROAMCODE_*limits and theirREMOTE_CODER_*legacy fallback, plus the shared int-parsing rule (absent/unparseable → default, out-of-range → refuse to start)data-dir.ts— full data-dir resolution order incl. the pre-renameremote-coderpreference;ACCESS_TOKENprecedence and the 0600 persisted tokenstart.ts—NO_TOKEN(exactly1, loopback-only),ROAMCODE_VAPID_SUBJECT(invalid → push disabled, not a crash),WEB_DIRupdater.ts—ROAMCODE_SERVICE_MANAGER/_LABELresolution order (service.json → env → platform default)terminal-process.ts—RC_TMUX_SOCKETand why its default keeps the pre-rename nameconfig.ts/auth.ts— the 'not configurable by design' notes (token never in argv,ANTHROPIC_API_KEYstripped, fixed 60s rotation grace)scripts/install.sh—ROAMCODE_DIR,RC_NO_START, installerPORTDrift found while verifying (fixed, per the acceptance criteria)
--helpadvertisedVAPID_SUBJECT— the code only readsROAMCODE_VAPID_SUBJECT(or legacyREMOTE_CODER_VAPID_SUBJECT). Anyone following the docs set a variable that does nothing. Both corrected.TRUST_PROXYrow documented only1/true; per the code comment the preferred form is a specific proxy IP/CIDR (trusting every hop lets a client spoofrequest.ipvia a prepended XFF entry). Row updated.README's config table now links to the full reference, and
--helppoints at it too.Verification
pnpm typecheck,pnpm format:check(on the changed files), and the CLI arg/help tests all green (the onerun.test.tsinstall failure on my machine is the pre-existing Windows chmod-assert issue, same as onmain).