Quickstart
Go from a fresh Astro project to a live site at slug.9d9.dev in three minutes.
This walks through deploying a brand new Astro
site. Any framework that emits a static dist/ directory works
the same way — Next.js static export, Hugo, SvelteKit static, vanilla HTML.
1. Build a site
npm create astro@latest my-site -- --template minimal --yes
cd my-site
npm install
npm run build You should now have a dist/ directory with the built site.
2. Claim a site on 9d9
In the dashboard, click Create a site, pick a slug
(e.g. my-site), and you'll land on the org page. From there:
- Open Settings and click New key.
- Give it a name ("my laptop") and save.
- Copy the secret. It's shown once.
3. Point the CLI at your site
npx @9d9dev/cli set-key ak_xxx --org=org_xxx
Replace ak_xxx with the secret and org_xxx with
your org ID (visible at the top of the Settings page). Config is saved
to .9d9.json in the current directory — each repo gets its
own binding. Add .9d9.json to your .gitignore.
4. Deploy
npx @9d9dev/cli deploy ./dist The CLI walks the directory, content-hashes each file, uploads them in parallel, commits a manifest, and atomically activates the deploy. Output:
Deploying 13 file(s), 127.2 KB total...
Deploy dep_qXpgSbWcNGfoWy3PxJfE24Ls created.
10/13
13/13
Active. Deploy dep_qXpgSbWcNGfoWy3PxJfE24Ls is live.
https://my-site.9d9.dev/ 5. Push updates
Every 9d9 deploy ./dist creates a new version and atomically
swaps the pointer. Old deploys stick around for a week (rollback via the
Deploys tab or 9d9 deploys list).
What next?
- Wire up a custom domain — see Custom domains.
- Add a CMS-backed posts list — see Public content API.
- Let your AI assistant push updates — see MCP setup.