CLI reference

x402-hosting renew: command reference.

renew extends the prepaid hosting time of an existing project. It costs $0.20 per added day — the duration price only, with no upload charge.

Synopsis

$ npx x402-hosting@latest status            # free — check expiresAt first
$ npx x402-hosting@latest renew --days 30

Run it from the directory that holds x402-hosting.json. The free status read shows the current expiry, so you know what you are extending before paying.

Flags

  • --days <days> — required; the duration to add, an integer from 1 through 730
  • --deployment <id> — optional; defaults to the pending deployment if one exists, otherwise the current deployment
  • --payer / --payer-cmd — how the payment is signed, as on every paid command
  • Cost: $0.20 × days in USDC, from the project owner wallet

Renewing while active

Renewing while the project is ACTIVE extends from the current expiry — thirty days added on top of the days that remain. Nothing is lost by renewing early, so the safe habit is to renew before the deadline rather than at it.

Renewing in the grace window

activeexpiredgrace: 30 daysdeletedRenew while active to extend expiry; renew in grace to republish at the same URL.
Prepaid projects end by expiring, and a 30-day grace window keeps recovery simple.

After expiry, a project spends 30 days in a grace window. Renewal during that window still works and republishes the project at the same URL — visitors never need a new link. Once the window closes, the project is gone for good. Starting over then means deleting x402-hosting.json and running deploy again, which creates a new project with a new URL. Running deploy with the stale record still in place would charge $0.01 for an upload that can never be published.

Cost

Thirty days of renewal costs $6.00; a full year, $73.00. The HTTP 402 payment challenge is the authoritative quote before the wallet signs, and the full schedule is on the pricing page. Renewal is a queued operation: after the payment settles, the CLI polls until the new expiry is recorded in x402-hosting.json.

When to use it

Any time the expiry approaches and the site should stay up. There is no subscription to manage — renewal is the only way hosting time ever increases, which also means cancelling is simply not renewing.

Related guides