The self-host install, step by step
npx github:kilncms/kiln
Already set up? Health-check everything with npx github:kilncms/kiln doctor. The numbered steps below are exactly what that wizard does for you, written out by hand. Read them to understand the moving parts, but pick the command or the manual steps, not both.
1Host your code on GitHub, your site anywhere
- Push your static site (plain HTML, CSS, JS) to a GitHub repository. This is where your code and content live.
- Connect that repo to a host that auto-deploys on each commit. Cloudflare Pages is recommended, free and fine for commercial use: in the Cloudflare dashboard, go to Workers and Pages, Create, Pages, Connect to Git, pick your repo, leave build command empty and output directory
/, then Deploy. - Prefer something else? Vercel, Netlify, or GitHub Pages work the same way. Any host that redeploys from a Git push is a valid Kiln host.
- Every commit now auto-deploys. That auto-deploy is Kiln's publish button.
2Deploy your sign-in worker
This is the worker you own. It runs on Cloudflare Workers, which is free, and it handles sign-in plus the commit proxy. The wizard does this for you; by hand it is four commands:
git clone https://github.com/kilncms/kiln && cd kiln
npm install
cd worker
npx wrangler kv namespace create KILN # paste the printed id into wrangler.toml
npx wrangler deploy
Note the worker URL it prints, like https://kiln-auth.yourname.workers.dev. Because the worker lives on a plain workers.dev URL, the OAuth callbacks are registered for you at app-creation time in the next step, so self-host never hits callback drift.
3Register your own GitHub App, one click
- Open
https://YOUR-WORKER.workers.dev/setupand press the button. The app registers under your account via GitHub's manifest flow, and the worker captures its credentials. You never copy a secret. - Click Install, choose Only select repositories, and pick your site's repo. Kiln can only ever touch repos you select.
- Add your site's URL to
ALLOWED_ORIGINSinworker/wrangler.toml, then redeploy the worker once more.
kiln-cms app, installed on your repo instead.4Make your HTML editable
Create /assets/kiln-config.js, then copy kiln.js and kiln-editor.js from the Kiln repo's dist/ folder (the wizard copies them for you) into your site's /assets/, and add two script tags at the end of <body>:
<script src="/assets/kiln-config.js"></script>
<script src="/assets/kiln.js" defer></script>
Then annotate what is editable. This is the one step the wizard cannot do for you, though an AI can:
<h1 data-cms="headline">Welcome</h1>
<img data-cms="hero" data-cms-attr="src" src="/img/hero.jpg">
<div class="cards" data-cms-repeat="services"> …repeatable blocks… </div>
<div class="nav-links" data-cms-menu="main"> …site menu… </div>
5Sign in and edit
Push everything. After the deploy, visit yoursite.com/kiln, the sign-in screen. Choose Continue with GitHub, then browse to any page: outlined text is editable. Click it, type, and hit Publish. About a minute later it is live. There is no edit button on the site; /kiln is the only way in.
Optional: editors and members with Google sign-in
Let your client, team, or community in, with no GitHub accounts. Create your own Google OAuth client, set two secrets on the worker, then add people by their Google email in your Kiln menu under People and access as an Editor or Member, with access lasting 1 to 360 days. For editors you can scope which pages they may touch, or leave it blank for the whole site. Full commands are in the README.
That is the whole self-host stack.
A GitHub repo, a free static host, one small worker you run, and your own GitHub App. No database to patch, no monthly bill, no platform that owns your content. Rather not run the worker yourself? Kiln Cloud runs it for you, or fully managed runs everything. Stuck? Open an issue.
Kiln