Approved addresses and a stable IP
Overview
A StoreFront CLI sign-in works only from the IPv4 addresses you have approved. The first approved address is the one the sign-in was made from. When the same sign-in is used from any other address, every command that talks to UltraCart stops with location_approval_required until you approve that address too.
This protects you if a sign-in is copied off a disk, a backup or an agent's transcript: it cannot be used from somewhere you have not approved. It also means an agent whose outgoing address keeps changing will keep asking you for approval. Plan where your agent runs so that its address stays the same.
The check applies to every agent and every machine: a desktop, a server, a container or a hosted agent such as Grok Bot.
Approve a new address
When a command stops with location_approval_required, the agent runs:
uc-storefront auth approve-location
It prints a link and a short code, and UltraCart emails you about the request. Open the link, check that the code matches, and approve in UltraCart with your authenticator app. The agent relays the link and code to you; it never opens the page or approves the request itself.
- The command waits up to 90 seconds for your decision (
--waitsets 0 to 600). If you have not decided by then, it exits3and prints the approval. The agent then runsuc-storefront sf approvals wait <id>, and once you approve,uc-storefront auth approve-location --approval <id>to finish. - If a colleague on the account should decide instead, the agent passes
--delegate <email>with the address you give it. - If a request arrives that you did not expect, deny it, then sign the CLI out under Authorized Applications in UltraCart. Someone else may have your sign-in.
uc-storefront auth status --remote checks the sign-in against UltraCart, including whether the current address is trusted.
Why a stable address matters
Each new outgoing address means another approval. Addresses change more often than you might expect:
- A home or office connection whose provider assigns a new address from time to time.
- A laptop that moves between networks, or a VPN that changes exits.
- A container that is redeployed or moved to another host.
- A hosted agent or cloud service that sends traffic from a pool of addresses.
- A CI runner, which is usually a new machine with a new address on every run.
None of these is unsafe, but each change stops the agent until you approve. The more the address moves, the less practical unattended work becomes.
Keep in mind what the check cannot do. It cannot tell apart two machines behind the same outgoing address, so anyone on that network or host who has the sign-in passes it. Keep the sign-in itself protected as described in Connect your store.
Give your agent a stable address
Pick the option that fits where your agent runs.
Run it where the address already stays put
An agent on a desktop or server at an office with a static IP address needs one approval and then keeps working. If your connection's address rarely changes, the occasional approval may be all you need.
Send the agent's traffic out through your home or office
A mesh VPN with an exit node routes a machine's internet traffic out through another machine you choose. If the agent runs in the cloud or on the move, route it through a machine at your home or office, and UltraCart sees that one stable address.
With Tailscale, for example:
- On a machine at home or the office, advertise it as an exit node:
tailscale set --advertise-exit-node. - Allow it as an exit node in the Tailscale admin console.
- On the machine where the agent runs, use that exit node:
tailscale set --exit-node=<exit node name or IP>.
Approve the exit node's public address once, and the agent keeps that address wherever it runs. Tailscale's documentation covers containers and other platforms. Other VPNs and tunnels that route traffic through a fixed exit work the same way.
Use your platform's static outbound address
Some cloud platforms can give a service a fixed outbound address, for example through a NAT gateway. If yours can, send the agent's traffic through it and approve that address.
Grok Bot
Grok Bot works on a cloud computer. By default that computer reaches the internet through static egress IP addresses that xAI shares across all Grok Bot customers; dedicated addresses are not available (Grok Bot security). The address stays put, but if you approve it, you approve an address other Grok Bot customers also use, which weakens the protection described above.
Instead, route the Bot's traffic through your own computer (Route traffic through your desktop):
- Open the Grok Bot desktop app on your computer.
- Go to Settings, then Computer, and under Your computer turn on Route traffic through this computer. If the setting asks you to Update Bot's computer, do that first; until you do, traffic still goes through the cloud.
- Ask the Bot to run a StoreFront CLI command such as
uc-storefront sf storefronts. If it stops withlocation_approval_required, the Bot runsuc-storefront auth approve-locationand relays the link and code. With--json, the refusal reports the address UltraCart saw aserror.ip. Check that it is your own internet address, not a cloud address, before you approve it.
Things to know about the route:
- xAI documents it for the Bot computer's web traffic, and destinations then see your computer's address. Step 3 confirms that the CLI's requests, which go to UltraCart over HTTPS, take that route. If
error.ipstill shows a cloud address, the route does not cover the CLI on your setup; do not approve that address on the strength of the route. - Only one of your computers routes at a time, and changes apply to new connections.
- The address is your home or office connection's, so it changes when that connection's does. A connection with a stable address works best.
- It applies when the Bot works on your computer: your own chats and Slack direct messages. In a shared Team Bot chat, the Bot works on its own shared computer, not yours (Team Bots).
- On the Enterprise plan, an admin can set Local Egress Routing to Always on, Members decide (the default) or Always off. With Always on, when none of your computers is connected, the Bot refuses the sites it would route rather than falling back to the cloud (Grok Bot for teams and enterprises).
- Enterprise teams can instead run Tailscale on their Bot computers through a team setup script and route through an exit node inside their network (Tailscale on Grok Bot).
CI runners
A CI runner usually gets a new address on every run, so each run would need an approval. Run signed-in CI work on a self-hosted runner with a stable address, or route the runner's traffic through an exit node or static outbound address as above. Offline commands such as validate, tree and cjson need no sign-in and are not affected.
Next steps
- Connect your store: sign in and bind a workspace
- Agents and environments: setup for each agent
- Hosted agents, containers and CI: the sign-in on machines without a keychain
- Troubleshooting: other sign-in refusals