CLI reference

x402-hosting rollback: command reference.

rollback promotes a previous deployment to be the live one at the project's existing URL. It costs $0.01, paid in USDC from the owner wallet.

Synopsis

$ npx x402-hosting@latest rollback 7b2e1c4a-…-…-…-…

The command takes exactly one argument: the deployment id to roll back to. Like every command after the first deploy, it finds the project through x402-hosting.json in the current directory.

Finding the deployment id

Deployment ids are UUIDs; anything that does not parse as a UUID is rejected before payment. List them with the free deployments command:

$ npx x402-hosting@latest deployments
d3 7b2e… READY current
d2 4a91… READY
d1 0f6c… READY

Each line shows the deployment number, its id, its state, and whether it is current. Rolling back to d2 means passing its UUID as the argument.

What happens

The rollback is a queued operation: the wallet pays $0.01, the platform promotes the chosen deployment, and the CLI polls the operation until it settles and prints the result. The project record in x402-hosting.json is updated with the new current deployment id. The deployment that was current is not deleted — it remains in the history and can itself be rolled back to later. The rollback changes which build serves the URL; it never changes the expiry.

Flags and facts

  • rollback <deployment-id> — the id must be a UUID from the deployments list
  • Cost: $0.01, settling from the project owner wallet
  • --payer / --payer-cmd choose how that payment is signed, as on every paid command
  • A payment from any other wallet is rejected before settlement

Verify afterwards

Confirm the result with the free status read rather than re-running anything paid — status refreshes the record and reports the current deployment. If the command is interrupted after paying, run finalize before paying again; never retry a possibly-paid operation blindly. The full price schedule is on the pricing page.

Related guides