1# Relay templates23A relay does not have to do everything. Names are cheap, so pick the template4for the job and give each job its own name. The console offers these as5presets, in this order; each is also a file you can apply from a script or6copy as the start of your own.78| Template | Choose it when |9|---|---|10| [default](01-default.jsonc) | you want a plain relay: anyone writes, anyone reads, everything kept. Feature settings stay as they are. |11| [outbox](02-outbox.jsonc) | it is where your own public notes and articles live, for the world to read. |12| [inbox](03-inbox.jsonc) | it is where people reach you: replies, reactions, zaps and reports, kept 90 days. |13| [private](04-private.jsonc) | only you write and only your devices or a trusted few read: drafts, wallets, app data. |14| [chat](05-chat.jsonc) | a group of members talks here: messages and the group's chat, directory hidden. |15| [media](06-media.jsonc) | it is a file host and nothing else: members upload, anyone fetches. |16| [search](07-search.jsonc) | you want a searchable copy of another relay's prose, refreshed every six hours. Needs a source. |17| [articles](08-articles.jsonc) | long-form only, yours or mirrored daily from a source. |18| [dm](09-dm.jsonc) | it is a drop box for private messages: anyone leaves a gift wrap, only members read. |19| [quiet](10-quiet.jsonc) | it should cost nothing and announce nothing: members only, every optional feature off, switched on one at a time as needed. |20| [site](11-site.jsonc) | it hosts NIP-5A static websites: members publish manifests and files, with mirroring on. |21| [marmot](12-marmot.jsonc) | anyone can publish Marmot KeyPackages and opaque group messages; gift wraps keep their recipient checks. |22| [grasp](13-grasp.jsonc) | it hosts GRASP Git repositories: admitted members publish repository state and related events, with reads open. |23| [marmot-members](14-marmot-members.jsonc) | members publish Marmot transport, with authenticated group writes and member limits; encrypted messages stay publicly readable. |24| [home](15-home.jsonc) | one name is your home on nostr: members write, anyone reads, sites, files and Git on, with notes, blog, bookmarks, sites, repos and a private photo library one click away. |2526Each file says more in its comment: what the template does, which Haven relay27it mirrors, and why its kinds are what they are.2829## The files3031A template is a relay configuration (`$schema` names the copy served at32`https://bind.ws/relay-config.schema.json`, the same file as `../relay-config.schema.json`) with a33`template` block for the title and the blurb, and the rules sections only:34policy, kinds, retention, and connections, the app shortcuts the Connect35fold shows, each naming a file in `../connection-templates/` with who may36see it ([Connection templates](../docs/17-connection-templates.md)). People,37bans and addresses are never in a template, and a section a template leaves38out is left alone when it is applied. Default resets the write, read,39directory, kind and retention rules; it leaves feature settings and the40shortcuts alone. Applying Default after Quiet keeps the features switched41off. It is a rules reset, not a full relay reset.4243The number in the file name is the order the console shows them in.4445`npm run build:templates` folds the folder into `src/gen/templates.ts`, which46the relay serves as its presets; `npm run typecheck` checks every file here47against the schema and the relay's parser, fails when the generated module48is stale, and fails when a file is missing from the table above.4950To try one on a relay without applying it, from the repository root:5152```53npm run relay plan relay-templates/10-quiet.jsonc wss://<name>.bind.ws54```