CLI reference
The --days parameter: hosting duration.
--days sets how many days a project stays online, prepaid at $0.20 per project-day in USDC. It accepts an integer from 1 through 730 and is required on the first activation of a project.
Synopsis
$ npx x402-hosting@latest deploy --days 30 $ npx x402-hosting@latest renew --days 90
The flag appears on two commands: deploy, where it sets the initial hosting duration, and renew, where it adds more time. Any other value than an integer between 1 and 730 is rejected by the CLI before anything is built or paid.
Validation
The value must be a whole number — --days 30.5 or --days 0 fail with a validation error, as does anything above 730. The two-year ceiling keeps prepaid balances bounded; longer horizons are handled by renewing again later.
Price math
The duration price is $0.20 × days. On a first deployment the CLI adds a $0.01 upload payment on top, so the totals are:
- 7 days: $1.41 with the first-deployment upload, $1.40 on renewal
- 30 days: $6.01 with the upload, $6.00 on renewal
- 365 days: $73.01 with the upload, $73.00 on renewal
- 730 days: the maximum single purchase, $146.01 with the upload
The HTTP 402 payment challenge the wallet signs is always the authoritative quote — check it against these figures before paying. The full schedule is on the pricing page.
Choosing a duration
Short durations suit experiments: a hackathon project, a demo, or a preview that only needs to survive the week costs a dollar or two. Long durations suit sites you do not want to think about — a documentation site or a personal page can be prepaid for a year and left alone. Because renewal extends from the current expiry, nothing is lost by starting short and topping up once the project proves itself.
What happens when the days run out
When the prepaid period ends, the project enters a 30-day grace window. Renewal during that window republishes the project at the same URL. Once the window closes, the project is deleted for good, and starting over means a new project with a new URL.