Repository navigation
Document colocated localhost Grok Bot bridge setup - #2
Merged
Merged
Conversation
Describe running the Node bridge on the Grok Bot computer (127.0.0.1:1340/8788) as a first-class option, and keep the split-machine Tailscale/tunnel path for when the bridge is elsewhere. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
FlyOverCoderKY
marked this pull request as ready for review
August 14, 2026 18:18
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: be1de5ecfb
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Exclude Docker Compose from the 127.0.0.1 topology, and document that the while-loop only restarts a crashed child — it does not survive a Grok Bot computer Update. Co-authored-by: Fly Over Coder <FlyOverCoder@gmail.com>
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.
Summary
The working grok-bot path today is a host-process-only topology:
npm starton the Grok Bot computer so both the gateway and the callback stay on that host's localhost:GROK_BOT_GATEWAY_URL=http://127.0.0.1:1340BRIDGE_PUBLIC_URL=http://127.0.0.1:8788BRIDGE_HTTP_HOST=127.0.0.1This is not
docker composeon that computer. Inside a container,127.0.0.1:1340is the container, not the host gateway, and binding the callback to the container loopback makes Compose's published port unreachable. Docker on the same host is documented as a different setup (host.docker.internal/extra_hosts; do not bind the callback to container localhost if you need a published port).The split-machine + Tailscale/tunnel path remains for when the bridge runs elsewhere.
Also documented:
.env.example→.env, setAGENT_BACKEND=grok-botand the localhost URLsGROK_BOT_TOKENfrom that computer’sgateway.json(example path used by Grok Bot computers:/home/box/sand-data/gateway.json)GROK_BOT_AGENT_IDfromPOST /api/listAgents(no real id in the repo)BRIDGE_REPLY_TOKEN; do not commit itnpm ci && npm run build && npm startwhile trueloop only restarts a crashed child while that shell stays alive. A Grok Bot computer Update stops running processes, including the wrapper; something outside that shell must start the bridge again after an UpdateIdentity sweep: no operator-specific Discord app secrets, snowflakes, personal names, emails, or real agent UUIDs in tracked files. Tests keep obviously fake values.
.gitignorestill excludes.envand*.log. Runtime behavior is unchanged;.env.examplecomments only.Test plan
.env.examplecomments match both topologies without changing defaultsnpm test(53 tests) andnpm run buildpass