A clean Astro client handoff means the client owns every account the site depends on (the Git repository, the hosting project and the domain), has a README that explains how to run, edit and deploy the site, has a way to change content without you, and has a written agreement about who handles updates after launch. Astro makes this easier than most stacks, because a static build has no server or database to hand over.
Key Takeaways
- Transfer ownership, don’t share logins: repo, host and domain should sit in the client’s accounts.
- Write a README that a future developer can follow in ten minutes: Node.js version, commands, content locations, deploy.
- Decide how the client edits content before launch: Markdown on GitHub, a Git-based CMS or a headless CMS.
- List every environment variable and third-party service, with who pays for each.
- Put maintenance, update and licence terms in writing at handoff, not later.
Why handoff matters more than launch
Launch day feels like the finish line, but handoff is what the client remembers. A site that only you can deploy, on a hosting account in your name, becomes a support ticket every time something small changes. Worse, if you stop working together, the client may not be able to get their own site back.
Astro sites are good candidates for a tidy handoff. The output of npm run build is a folder of static files, the source lives in Git, and most hosts deploy straight from a repository. There is very little that has to be “set up on the server”.
The Astro client handoff checklist
Work through this list in the last week of the project. Each item has a short explanation below.
| Area | Hand over | Done when |
|---|---|---|
| Code | Git repository | Client’s organisation owns it, you’re a collaborator |
| Hosting | Host project | Client’s account, billing in their name |
| Domain and DNS | Registrar and DNS access | Client controls the registrar login |
| Content | Editing workflow | Client has published one change themselves |
| Config | Environment variables, API keys | Stored in the host and the client’s password manager |
| Services | Forms, analytics, CMS, email | Each account is in the client’s name |
| Docs | README and handoff notes | A new developer can run the site from the README |
| Agreements | Maintenance and licences | Signed or confirmed in writing |
Transfer the repository
Create the repository in the client’s GitHub (or GitLab) organisation from the start, or transfer it before launch. On GitHub, Settings > General > Transfer ownership moves the repo with its history, issues and settings. Keep yourself as a collaborator if you’ll do maintenance.
Before the transfer, make sure the repo is clean:
# no secrets in the history
git log -p | grep -iE "api[_-]?key|secret|token" | head
# .env files are ignored
cat .gitignore | grep -E "^\.env"
If a secret was ever committed, rotate it. Removing it from the latest commit doesn’t remove it from history.
If the site uses a purchased theme, check the licence before you make anything public. Most commercial theme licences, including ours, allow you to build sites for paying clients but not to redistribute the theme’s source code, so keep client repositories private. Our website template licences explainer covers what’s usually allowed, and the licensing docs spell out the terms for Komal Nakrani themes.
Transfer hosting and the domain
The hosting project should live in an account the client controls and pays for. Cloudflare Pages, Netlify and Vercel all support teams, so the cleanest setup is:
- The client creates the account with a company email address, not a personal one.
- They invite you as a member.
- You connect the client-owned repository and configure the build: command
npm run build, output directorydist, and the Node.js version. - You add the custom domain and confirm HTTPS.
Check your host’s plan terms for commercial use; some free tiers are limited to personal projects. The domain should be registered to the client, with the registrar login in their password manager. If you manage DNS on their behalf, use a delegated user rather than their main login.
Write a README a stranger can follow
The README is the most important handoff document. Assume the next person to open it is a developer who has never seen the project, possibly a year from now:
<!-- README.md -->
# Example Co website
Built with Astro 7. Static output, deployed to Cloudflare Pages from `main`.
## Requirements
- Node.js 22.23.4 or later (see `.nvmrc`)
- npm
## Run locally
npm install
npm run dev # http://localhost:4321
## Build
npm run build # writes dist/
npm run preview # serves dist/ locally
## Where things live
- Pages: src/pages/
- Blog posts: src/content/blog/ (Markdown)
- Team members: src/content/team/ (one file per person)
- Images: src/assets/ (optimized at build) and public/ (served as is)
- Site settings (name, nav, social links): src/config.ts
## Deploy
Push to `main`. Cloudflare Pages builds and deploys automatically.
Preview deploys are created for every pull request.
## Environment variables
| Name | Used for | Where it's set |
|---|---|---|
| PUBLIC_FORM_ENDPOINT | Contact form action URL | Cloudflare Pages > Settings |
## Services
- Forms: <provider>, account owned by Example Co
- Analytics: <provider>, account owned by Example Co
Pin the Node.js version so builds don’t break on a host upgrade. Astro 7 requires Node.js 22.23.4 or later, so put that in .nvmrc and in package.json:
{
"engines": {
"node": ">=22.23.4"
}
}
Commit the lockfile (package-lock.json, pnpm-lock.yaml or bun.lock) so the client’s next build installs the same versions you tested. The project structure docs are a good link to include for anyone new to Astro.
Set up content editing before launch
Decide how the client edits content during the project, not at the end. The right answer depends on who edits and how often.
| Client situation | Editing approach | Trade-off |
|---|---|---|
| Rare edits, comfortable with GitHub | Edit Markdown in GitHub’s web editor | No extra tools; plain text editing |
| Regular edits by non-developers | Git-based CMS (Keystatic, Decap, TinaCMS) | Form-based editing, content stays in the repo |
| Marketing team, many editors | Headless CMS with a publish webhook | Best editor experience, another subscription |
| Almost never | You make changes on request | Cheapest, but every edit goes through you |
Whatever you choose, have the client make one real change themselves before handoff: edit a sentence, publish, see it live. Our guide on how non-developers can edit an Astro site compares these options in more detail.
Document environment variables and services
List every value the build or the site needs. Astro only exposes variables prefixed with PUBLIC_ to client-side code, and astro:env can validate them at build time:
// astro.config.mjs
import { defineConfig, envField } from 'astro/config';
export default defineConfig({
env: {
schema: {
PUBLIC_FORM_ENDPOINT: envField.string({ context: 'client', access: 'public', url: true }),
},
},
});
With a schema, a missing or malformed variable fails the build with a clear message instead of shipping a broken contact form. Put the real values in the host’s settings and in the client’s password manager, never in the README.
Do the same for every third-party service: forms, analytics, newsletter, CMS, image CDN, search. For each one, write down who owns the account, who pays and what breaks if it’s cancelled.
Agree on maintenance and updates
An Astro site with no server code needs little maintenance, but it isn’t zero. Dependencies get security fixes, Astro ships new major versions, and hosts change their build images. Agree in writing which of these the client gets:
- No maintenance. The client or a future developer handles updates. Your README is their guide.
- On-request work. You quote changes as they come up.
- A retainer. You update dependencies on a schedule, test the build and fix issues.
If you’ll maintain the site, add Dependabot or Renovate so updates arrive as pull requests with a preview deploy. Our Astro maintenance checklist lists what to check each month and before a major upgrade.
Run a final handoff meeting
Book 30 to 60 minutes and walk through:
- Where the code, hosting and domain live, and that the client can log in to each.
- How to make a content change and publish it.
- How to see a preview before publishing.
- What to do if a deploy fails (check the host’s build log, revert the last commit).
- Who to contact for what, and what the maintenance terms are.
Record the meeting if the client agrees, and send the README, the services list and the recording in one email. That email becomes the reference everyone goes back to.
FAQ
Should the client own the hosting account for their Astro site?
Yes. The client should own the hosting account, the repository and the domain, with you invited as a member. Shared logins or accounts in your name make it hard for the client to change developers or recover access later.
How do I transfer an Astro site to a client’s GitHub?
Use GitHub’s transfer ownership setting to move the repository to the client’s organisation, then reconnect it in the hosting dashboard if the host was linked to your account. Check the repo history for committed secrets first and rotate any you find.
Can I give a client a site built on a purchased theme?
Usually yes, if the licence allows client work. Commercial theme licences commonly let you build sites for paying clients but not redistribute the theme source, so keep the repository private and read the licence terms before handoff.
What should an Astro site README include for a client?
The Node.js version, install and dev commands, how to build and deploy, where each type of content lives, every environment variable and where it’s set, and the third-party services the site uses with who owns each account.
How much maintenance does a static Astro site need after handoff?
Very little day to day, because there’s no server or database. Plan for periodic dependency updates, an occasional Astro major version upgrade, and checks that the host’s build environment still matches the pinned Node.js version.