← Back to The Village

ONE-TIME OWNER SETUP

Bring your village together.

This connects notifications from The Village itself. Your family won’t need Discord or Telegram. Complete these steps once for your Cloudflare Pages site.

1. Create a family database

In Cloudflare, open Storage & databases → D1 SQL database. Create a database named village. Open its Console, paste the SQL below, and run it. If your console accepts only one statement at a time, run each statement separately.

Open your Pages project → Settings → Bindings → Add → D1 database. Set the binding name to VILLAGE_DB and select the village database. Use the Production environment. Dashboard labels can vary.

2. Create your notification keys

Tap below once. The keys are generated privately in your browser. Keep the private key in Cloudflare Secrets, never in public code. Keep this page open while you copy the values. Generating a new pair later means all family devices must re-enable notifications.

3. Save three values in Cloudflare

In Pages project → Settings → Variables and Secrets, add these exact names for Production:

Choose Secret for the private and family keys. The public key may be Text or Secret. Do not add quotes or spaces. Old Discord/Telegram secrets are not used by this version.

4. Redeploy this ZIP

Create a new Production deployment by uploading this same ZIP again to your existing Pages project. Keep your original domain. After deployment, close old app windows and reopen the site. Its banner should say Join your family village.

5. Install on each iPhone

  1. Use iOS 16.4 or later. Open your published HTTPS link in Safari.
  2. Tap Share → Add to Home Screen. Enable Open as Web App if shown, then Add.
  3. Open The Village from its Home Screen icon.
  4. Open Settings, enter your name and the shared FAMILY_KEY, then save. Do not share your private VAPID key.
  5. Tap Enable notifications → Allow.
  6. Tap Send me a test. Then test a request from another family device while this app is closed.

Everyone who enabled notifications receives family requests, including the sender if subscribed. A successful send means the push service accepted it; display can be delayed by Focus, notification settings, connectivity, or the operating system.

If a notification doesn’t appear

One private family per deployment, up to 25 subscribed devices. The shared key permits reading requests and sending notifications, so give it only to your family. Request notes can appear on lock screens. History is kept for 30 days and the most recent 50 requests are shown. Notes stay in your Cloudflare database and are encrypted on the way to each push service. Each person can turn off their notifications in the app.

Apple WebKit: iPhone web push requirements
Cloudflare: database bindings and secrets