upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/docs/reference/configuration.md
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2026-01-21 13:28:37 +0000
committerDanConwayDev <DanConwayDev@protonmail.com>2026-01-21 13:38:11 +0000
commit46fbcc0a4c8a8dbf6cd345d6eaa6fe33a82100bb (patch)
tree6ab52486732077dbab80907d974c195b1e2f7216 /docs/reference/configuration.md
parent780d09b0c1eb823f02fc61de6dbf99b2d5cefaca (diff)
feat: add archive-grasp-services configuration option
Enables relay operators to backup/archive specific GRASP servers by domain. Includes configuration, validation, documentation, and integration tests.
Diffstat (limited to 'docs/reference/configuration.md')
-rw-r--r--docs/reference/configuration.md80
1 files changed, 77 insertions, 3 deletions
diff --git a/docs/reference/configuration.md b/docs/reference/configuration.md
index c1cb712..b24b498 100644
--- a/docs/reference/configuration.md
+++ b/docs/reference/configuration.md
@@ -574,11 +574,79 @@ NGIT_ARCHIVE_WHITELIST=npub1alice23...,npub1bob23.../linux,bitcoin-core
574 574
575--- 575---
576 576
577#### `NGIT_ARCHIVE_GRASP_SERVICES`
578
579**Description:** Comma-separated list of GRASP server domains to archive
580**Type:** String (comma-separated domain names)
581**Default:** (empty)
582**Required:** No
583
584**Format:**
585- `<domain>` - Archive all repositories from this GRASP server domain
586- **Must be bare domains only** (e.g., `git.example.com`, NOT `wss://git.example.com`)
587- Matching extracts domains from announcement clone URLs and compares them exactly (case-sensitive)
588
589**Examples:**
590
591```bash
592# Archive all repos from a single GRASP server
593NGIT_ARCHIVE_GRASP_SERVICES=git.example.com
594
595# Archive repos from multiple GRASP servers
596NGIT_ARCHIVE_GRASP_SERVICES=git.example.com,git.nostr.dev,relay.gitnostr.com
597
598# Archive from localhost (testing)
599NGIT_ARCHIVE_GRASP_SERVICES=localhost:7334
600```
601
602**Validation:**
603
604- Domain entries must be bare domains without scheme prefixes (ws://, wss://, https://, etc.)
605- Whitespace is trimmed
606- Empty entries are ignored
607- **Mutually exclusive** with `NGIT_ARCHIVE_ALL` and `NGIT_ARCHIVE_WHITELIST`
608
609**Security Notes:**
610
611- Archives ALL repositories from the specified GRASP server domains
612- Use with caution - ensure you trust the GRASP servers you're archiving from
613- Storage requirements depend on the size of repositories on the archived servers
614- Automatically sets `NGIT_ARCHIVE_READ_ONLY=true` by default
615
616**Error Conditions:**
617
618```bash
619# ERROR: Cannot use with NGIT_ARCHIVE_ALL
620NGIT_ARCHIVE_GRASP_SERVICES=git.example.com
621NGIT_ARCHIVE_ALL=true
622# → Server fails to start: "NGIT_ARCHIVE_GRASP_SERVICES cannot be used with
623# NGIT_ARCHIVE_ALL=true. These options are mutually exclusive."
624
625# ERROR: Cannot use with NGIT_ARCHIVE_WHITELIST
626NGIT_ARCHIVE_GRASP_SERVICES=git.example.com
627NGIT_ARCHIVE_WHITELIST=npub1alice...
628# → Server fails to start: "NGIT_ARCHIVE_GRASP_SERVICES cannot be used with
629# NGIT_ARCHIVE_WHITELIST. These options are mutually exclusive."
630```
631
632**Use Cases:**
633
634```bash
635# Backup/mirror a specific GRASP server
636NGIT_ARCHIVE_GRASP_SERVICES=git.example.com
637NGIT_ARCHIVE_READ_ONLY=true # Default
638
639# Archive multiple trusted GRASP servers
640NGIT_ARCHIVE_GRASP_SERVICES=git.nostr.dev,relay.gitnostr.com
641```
642
643---
644
577#### `NGIT_ARCHIVE_READ_ONLY` 645#### `NGIT_ARCHIVE_READ_ONLY`
578 646
579**Description:** Configure relay as read-only sync of archived repositories 647**Description:** Configure relay as read-only sync of archived repositories
580**Type:** Boolean 648**Type:** Boolean
581**Default:** `true` if `NGIT_ARCHIVE_ALL` or `NGIT_ARCHIVE_WHITELIST` is set, `false` otherwise 649**Default:** `true` if `NGIT_ARCHIVE_ALL`, `NGIT_ARCHIVE_WHITELIST`, or `NGIT_ARCHIVE_GRASP_SERVICES` is set, `false` otherwise
582**Required:** No 650**Required:** No
583 651
584**Examples:** 652**Examples:**
@@ -591,7 +659,7 @@ NGIT_ARCHIVE_READ_ONLY=true
591NGIT_ARCHIVE_READ_ONLY=false 659NGIT_ARCHIVE_READ_ONLY=false
592 660
593# Automatic (default behavior) 661# Automatic (default behavior)
594# - If NGIT_ARCHIVE_ALL or NGIT_ARCHIVE_WHITELIST is set → true 662# - If NGIT_ARCHIVE_ALL, NGIT_ARCHIVE_WHITELIST, or NGIT_ARCHIVE_GRASP_SERVICES is set → true
595# - Otherwise → false 663# - Otherwise → false
596# NGIT_ARCHIVE_READ_ONLY= 664# NGIT_ARCHIVE_READ_ONLY=
597``` 665```
@@ -615,8 +683,9 @@ NGIT_ARCHIVE_READ_ONLY=false
615NGIT_ARCHIVE_READ_ONLY=true 683NGIT_ARCHIVE_READ_ONLY=true
616NGIT_ARCHIVE_ALL=false 684NGIT_ARCHIVE_ALL=false
617NGIT_ARCHIVE_WHITELIST= 685NGIT_ARCHIVE_WHITELIST=
686NGIT_ARCHIVE_GRASP_SERVICES=
618# → Server fails to start: "NGIT_ARCHIVE_READ_ONLY=true requires either 687# → Server fails to start: "NGIT_ARCHIVE_READ_ONLY=true requires either
619# NGIT_ARCHIVE_ALL=true or NGIT_ARCHIVE_WHITELIST to be set" 688# NGIT_ARCHIVE_ALL=true, NGIT_ARCHIVE_WHITELIST, or NGIT_ARCHIVE_GRASP_SERVICES to be set"
620 689
621# ERROR: Cannot use repository whitelist with archive read-only 690# ERROR: Cannot use repository whitelist with archive read-only
622NGIT_ARCHIVE_READ_ONLY=true 691NGIT_ARCHIVE_READ_ONLY=true
@@ -633,6 +702,7 @@ When `NGIT_ARCHIVE_READ_ONLY=true`:
633- `curation`: Set to one of: 702- `curation`: Set to one of:
634 - `"Read-only sync of all repositories found on network"` (if `NGIT_ARCHIVE_ALL=true`) 703 - `"Read-only sync of all repositories found on network"` (if `NGIT_ARCHIVE_ALL=true`)
635 - `"Read-only sync of whitelisted repositories and maintainers"` (if `NGIT_ARCHIVE_WHITELIST` set) 704 - `"Read-only sync of whitelisted repositories and maintainers"` (if `NGIT_ARCHIVE_WHITELIST` set)
705 - `"Read-only sync of repositories from specified GRASP servers"` (if `NGIT_ARCHIVE_GRASP_SERVICES` set)
636 706
637**Use Cases:** 707**Use Cases:**
638 708
@@ -648,6 +718,10 @@ NGIT_ARCHIVE_READ_ONLY=true # Default
648# Writable mirror (advanced, not typical) 718# Writable mirror (advanced, not typical)
649NGIT_ARCHIVE_WHITELIST=npub1alice... 719NGIT_ARCHIVE_WHITELIST=npub1alice...
650NGIT_ARCHIVE_READ_ONLY=false 720NGIT_ARCHIVE_READ_ONLY=false
721
722# Archive specific GRASP servers
723NGIT_ARCHIVE_GRASP_SERVICES=git.example.com,git.nostr.dev
724NGIT_ARCHIVE_READ_ONLY=true # Default
651``` 725```
652 726
653--- 727---