Diffinery

homeflare/diffinerypublic

Open-source, agent-first GitHub and GitHub Actions alternative that runs on your own Cloudflare account: git hosting, pull requests, code review and drop-in GitHub Actions YAML on Workers, Durable Objects, R2 and Containers.

diffinery/HOMEFLARE.md
47 lines · 2.4 KBRaw History
1# Diffinery on Homeflare
2
3[Homeflare](https://github.com/jason-s13r/homeflare) runs Workers on your own machines (celld) behind a
4Cloudflare-compatible API. These scripts deploy to it when `CLOUDFLARE_API_BASE_URL` points at that API,
5which `homeflare-wrangler run` sets, along with `CLOUDFLARE_CONTAINER_REGISTRY` (Homeflare's registry) and a
6`docker` command on your Podman.
7
8On another API than Cloudflare's, `scripts/setup.sh` and `scripts/bootstrap.sh` skip what needs Cloudflare
9itself:
10
11| Skipped | What it means |
12| --- | --- |
13| Zone check | The hostname is a Homeflare custom domain, not a route in a Cloudflare zone. |
14| R2 lifecycle rules | Logs, artifacts, archives and exports don't age out by themselves. |
15| Email Sending setup and its event subscription | Onboard the sending domain in Cloudflare yourself (Homeflare relays email through it with `HOMEFLARE_EMAIL=cloudflare`). Bounces and complaints don't reach the suppression list. |
16| Turnstile widget | Make one in the Cloudflare dashboard and pass its keys: `TURNSTILE_SITE_KEY` and `TURNSTILE_SECRET`. Without them open sign-up and anonymous security reports stay off. |
17| Cloudflare Access | Email recovery and the `/auth/access` first sign-in stay off. Passkeys work. |
18
19## Deploy
20
21Put the settings in a file outside the repository (it holds the Turnstile secret), for example
22`~/.config/homeflare/diffinery.env`, readable by you only:
23
24```sh
25CLOUDFLARE_ACCOUNT_ID=<Homeflare's account id>
26DIFFINERY_DOMAIN=git.homeflare.example.com
27MAIL_DOMAIN=example.com
28[email protected]
29TURNSTILE_SITE_KEY=0x4AAA...
30TURNSTILE_SECRET=0x4AAA...
31```
32
33`MAIL_DOMAIN` is a domain onboarded to Email Sending in your Cloudflare account. Homeflare's account id is
34in the Dashboard, or from `GET /client/v4/accounts`. Then, from the repository:
35
36```sh
37homeflare-wrangler --env-file ~/.config/homeflare/diffinery.env run scripts/setup.sh --yes
38```
39
40`homeflare-wrangler` reads the Homeflare API token from `~/.config/homeflare/wrangler.env` and sets
41`CLOUDFLARE_API_BASE_URL` itself. Run it again to update.
42
43## The first administrator
44
45Without Access, the first account comes from open sign-up, which needs Turnstile and email. Deploy once with
46`"SIGNUP": "open"` under `vars` in `apps/diffinery/wrangler.jsonc`, sign up at `https://<host>/signup` with an
47address in `BOOTSTRAP_ADMINS`, add a passkey, then remove `SIGNUP` and deploy again.