-
Notifications
You must be signed in to change notification settings - Fork 7
Expand file tree
/
Copy path.env.example
More file actions
199 lines (153 loc) · 6.66 KB
/
.env.example
File metadata and controls
199 lines (153 loc) · 6.66 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
# Relatr Environment Configuration
# Copy this file to .env and customize with your values
# =============================================================================
# REQUIRED CONFIGURATION
# =============================================================================
# Server's Nostr private key (hex format, 64 characters)
# Generate with: openssl rand -hex 32
SERVER_SECRET_KEY=your_server_private_key_here
# =============================================================================
# OPTIONAL CONFIGURATION
# =============================================================================
# =============================================================================
# CONFIG MANAGER AUTHENTICATION
# =============================================================================
# Credentials for the web-based config manager (port 3000)
# If not set, a random password will be generated on startup and printed to the console
# MANAGER_USER=admin
# MANAGER_PASSWORD=your_secure_password_here
# Default perspective pubkey for trust calculations (hex format)
# Default: Gigi's pubkey (6e468422dfb74a5738702a8823b9b28168abab8655faacb6853cd0ee15deee93)
DEFAULT_SOURCE_PUBKEY=6e468422dfb74a5738702a8823b9b28168abab8655faacb6853cd0ee15deee93
# Nostr relays for fetching social graph data (comma-separated)
# Default: wss://relay.damus.io,wss://relay.nostr.band,wss://relay.snort.social
NOSTR_RELAYS=wss://relay.damus.io,wss://relay.nostr.band,wss://relay.snort.social
# Nostr relays for MCP transport
# Default: wss://relay.contextvm.org
SERVER_RELAYS=wss://relay.contextvm.org
# =============================================================================
# OPTIONAL FEATURES
# =============================================================================
# Enable Trusted Assertions (TA) publishing (NIP-85 kind 30382).
# When enabled, Relatr can act as a Trusted Assertion provider and expose TA tools.
# Default: false
TA_ENABLED=false
# =============================================================================
# ELO PLUGINS (PORTABLE PLUGINS) CONFIGURATION
# =============================================================================
# Directory containing portable plugin JSON events
# Default: ./plugins/elo
ELO_PLUGINS_DIR=./plugins/elo
# Timeout for a single plugin evaluation (ms)
# Default: 30000
ELO_PLUGIN_TIMEOUT_MS=30000
# Timeout for a single capability invocation (ms)
# Default: 30000
CAP_TIMEOUT_MS=30000
# Persistent NIP-05 success/null cache TTL (seconds)
# Default: 172800 (48 hours)
NIP05_CACHE_TTL_SECONDS=172800
# Persistent NIP-05 domain cooldown for transport-style failures (seconds)
# Default: 3600 (1 hour)
NIP05_DOMAIN_COOLDOWN_SECONDS=3600
# Max number of plugins evaluated concurrently for a single pubkey
# Default: 3
ELO_PLUGIN_CONCURRENCY=3
# Host policy limits
# These protect the host from pathological plugins.
# Defaults: 8 / 32 / 128
ELO_MAX_ROUNDS_PER_PLUGIN=8
ELO_MAX_REQUESTS_PER_ROUND=32
ELO_MAX_TOTAL_REQUESTS_PER_PLUGIN=128
# Optional: override plugin weights (JSON map keyed by "<pubkey>:<pluginName>")
# Example: {"<pubkey>:root_nip05": 0.2, "<pubkey>:activity_notes": 0.1}
ELO_PLUGIN_WEIGHTS={}
# =============================================================================
# TA (TRUSTED ASSERTIONS) CONFIGURATION
# =============================================================================
# Extra relays for TA event publishing (comma-separated)
# These relays are added to the final list where TA events are published
# alongside user relays and server relays
# Default: (empty)
TA_EXTRA_RELAYS=
# =============================================================================
# MCP SERVER CONFIGURATION
# =============================================================================
# Whether the MCP server is public (accessible to anyone) or private
# Default: false
IS_PUBLIC_SERVER=false
# Server name displayed in MCP server info
# Default: Relatr
SERVER_NAME=Relatr
# Server description/about text
# Default: Relatr is a social graph analysis and trust score service for Nostr.
SERVER_ABOUT=Relatr is a social graph analysis and trust score service for Nostr.
# Server website URL
# Default: https://relatr.net
SERVER_WEBSITE=https://relatr.net
# Server picture/avatar URL
# Default: https://image.nostr.build/30d7fdef1b3d3b83d9e33f47b7d15388deeb47428041f0656612d1450cdb1216.jpg
SERVER_PICTURE=https://image.nostr.build/30d7fdef1b3d3b83d9e33f47b7d15388deeb47428041f0656612d1450cdb1216.jpg
# =============================================================================
# RATE LIMITING
# =============================================================================
# Maximum tokens for rate limiter (burst capacity)
# Default: 25
RATE_LIMIT_TOKENS=25
# Tokens per second to refill
# Default: 2
RATE_LIMIT_REFILL_RATE=2
# =============================================================================
# PERFORMANCE TUNING
# =============================================================================
# Alpha parameter in distance formula (0.0 - 1.0)
# Lower values = distance matters more
# Default: 0.1
DECAY_FACTOR=0.1
# Social graph traversal depth (1-4 recommended)
# Higher values = more comprehensive but slower
# Default: 1
NUMBER_OF_HOPS=1
# Cache time-to-live in hours
# Default: 72 (3 days)
CACHE_TTL_HOURS=72
# Sync interval in hours
# Default: 21
SYNC_INTERVAL_HOURS=21
# Cleanup interval in hours
# Default: 7
CLEANUP_INTERVAL_HOURS=7
# Validation sync interval in hours
# Default: 3
VALIDATION_SYNC_INTERVAL_HOURS=3
# Max number of per-pubkey fallback validations to run concurrently
# when batch validation fails
# Default: 4
VALIDATION_FALLBACK_CONCURRENCY=4
# =============================================================================
# RELAY CAPPING
# =============================================================================
# Maximum relays to store per user in pubkey_kv table
# Reduces storage pressure for users with 100+ relays
# Default: 15
MAX_STORED_RELAYS=15
# Maximum relays to publish TA events to
# Reduces network congestion when publishing to many relays
# Default: 15
MAX_PUBLISH_RELAYS=15
# =============================================================================
# DATA PATHS
# =============================================================================
# Path to social graph binary file
# Default: ./data/socialGraph.bin
GRAPH_BINARY_PATH=./data/socialGraph.bin
# SQLite database path
# Default: ./data/relatr.db
DATABASE_PATH=./data/relatr.db
# =============================================================================
# DOCKER CONFIGURATION
# =============================================================================
# User and group IDs for file permissions (typically your host user)
# Get with: id -u and id -g
UID=1000
GID=1000