Updated 23 November 2026
You can put a static template online on any host that serves files. This page covers the 115 static templates. Feature templates are covered in Deploy a Node site.
Build the site
- Set your endpoint for forms in
content/owner.ts. See Forms. - Run
SITE_URL=https://your-domain.com npm run build, with your own address. The sitemap usesSITE_URL, and without it the sitemap points athttps://example.com. - Check the
out/folder.next.config.tsusesoutput: "export", soout/holds plain HTML, CSS, JavaScript and pictures.
Netlify
- Add your project to a Netlify site.
- Set the build command to
npm run build. - Set the publish directory to
out.
Vercel
- Import your project into Vercel.
- Use the build command
npm run build. - Set the output directory to
out.
GitHub Pages
- If the site is served from a project address such as
/repo-name/, setbasePathinnext.config.tsto"/repo-name". A custom domain or a user site at the root does not need it. - Run
SITE_URL=https://your-domain.com npm run build. - Publish the contents of
out/through GitHub Pages.
Deploy to Cloudflare Workers
This is for the 115 static templates. Templates with features need a Node server and a database, so they use a Node host. See Deploy a Node site.
Requests to static assets on Workers are free and unlimited. The free plan allows 20,000 files per site and 25 MiB per file.
- Add a file named
wrangler.jsoncin the project root. It is not included in the template. Use today's date forcompatibility_date.
{
"name": "my-site",
"compatibility_date": "yyyy-mm-dd",
"assets": {
"directory": "./out",
"html_handling": "auto-trailing-slash",
"not_found_handling": "404-page"
}
}
- Build the site with
SITE_URL=https://your-domain.com npm run build. - Run
npx wrangler login. It opens your browser. - Run
npx wrangler deploy. It uploadsout/.
auto-trailing-slash serves folder pages such as about/index.html at /about/. 404-page serves the site's 404.html with a 404 status. No Worker script is needed.
Deploy from Git
- In the Cloudflare dashboard, open Workers and choose Create application.
- Connect your GitHub or GitLab repository.
- Set the build command to
npm run buildand the deploy command tonpx wrangler deploy. - Make sure the Worker name in the dashboard matches
nameinwrangler.jsonc.
Use a custom domain
- Check that the domain is on Cloudflare.
- Open your Worker, then Settings, then Domains & Routes.
- Choose Add, then Custom Domain, and enter the domain.
An nginx or Apache server, or shared hosting
- Run
npm run build. - Upload the contents of
out/to the folder your server or host serves.
Before you launch
- Turn off
noindexincontent/owner.ts. See SEO. - Open every page and send a test through each form.
