Repository navigation
Expand file tree
/
Copy pathconfig.example.json
More file actions
775 lines (774 loc) · 113 KB
/
Copy pathconfig.example.json
File metadata and controls
775 lines (774 loc) · 113 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
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
{
"port": 3000,
"maxHopDist": 1.8,
"_comment_maxHopDist": "Optional. Longest hop, in degrees of lat/lon (not km; 1.8 is about 200 km), the browser accepts when it guesses a path's hops itself (route view, packet feed, node paths). A guessed hop farther than this from both neighbours, or from its only neighbour, is marked unreliable and not drawn. Accepted: above 0 up to 10; a number outside that range logs one warning and keeps 1.8. A non-number (e.g. \"abc\") is a JSON type error and the whole config file is rejected, as for any mistyped key. Hops the server already resolved (resolved_path) are not affected. Key is case-sensitive. Read at startup.",
"apiKey": "your-secret-api-key-here",
"nodeBlacklist": [],
"_comment_nodeBlacklist": "Public keys of nodes to hide from all API responses. Use for trolls, offensive names, or nodes reporting false data that operators refuse to fix.",
"hiddenNamePrefixes": ["🚫"],
"_comment_hiddenNamePrefixes": "Node name prefixes that mark a node as hidden from this dashboard (#1181). Mirrors a convention used by other MeshCore map dashboards: an operator who wants their node hidden renames it to start with one of these prefixes and sends an advert. A hidden node (also one in nodeBlacklist or observerBlacklist) is dropped from /api/nodes, /api/nodes/search and /api/nodes/{pubkey}, and its adverts and ANON_REQ packets, which carry its public key and an advert also its name and position, are not served by /api/packets (list, grouped, ?node=, ?nodes=), /api/packets/{hash} with its path and traces (they answer as an unknown packet), the batch observations, node health, observer analytics, the audio lab or the WebSocket, including the adverts sent before the rename (#1023). Hiding follows the current name: renamed back, the node and all its adverts are shown again (within about 30 s). Packet counts still include them and DB rows are preserved, so observation history (paths, hops, distances) stays intact for analytics. A hidden node can still be named as a relay hop in other packets and in some analytics views. The node is NOT hidden from the mesh itself — only from this dashboard: turn its position off on the device too. Set to [] to disable. Default: [\"🚫\"].",
"observerIATAWhitelist": [],
"_comment_observerIATAWhitelist": "Global IATA region whitelist. When non-empty, only observers whose IATA code (from MQTT topic) matches are processed. Case-insensitive. Empty = allow all. Unlike per-source iataFilter, this applies across all MQTT sources. A dropped region is logged by the ingestor as one '[region-filter] dropping region \"XYZ\"' line, repeated at most every iataWarnIntervalSec while it keeps arriving.",
"iataWarnIntervalSec": 21600,
"_comment_iataWarnIntervalSec": "Optional (ingestor). Seconds between repeated '[region-filter]' warnings for a region dropped by observerIATAWhitelist. Default 21600 (6h); 0 or omitted = default; maximum 86400 (24h), larger values are capped. At most 512 regions are tracked individually (region codes come from the MQTT topic, so this is bounded); beyond that, drops share one overflow warning with the same interval.",
"retention": {
"nodeDays": 7,
"observerDays": 14,
"packetDays": 30,
"channelDays": 0,
"clientRxDays": 30,
"clientRegionsDays": 0,
"inactiveNodeDays": 0,
"nodeChangeDays": 0,
"observerPurgeDays": 0,
"_comment_tableRetention": "Opt-in (ingestor, #329) retention for the tables nothing else prunes; each is in days, 0 or omitted = keep forever (the default). Applied at ingestor startup and daily with the observer retention pass, in batches. inactiveNodeDays: inactive_nodes rows whose last advert is older than N days are deleted, unless the node has come back or is an observer still uploading; a deleted node that adverts again later counts as new (no 'resurrected' change, listed in New Nodes). Set it above nodeDays. nodeChangeDays: node_changes rows (Tools > Node Changes) detected more than N days ago are deleted. observerPurgeDays: observers already marked inactive by observerDays AND not seen in N days are hard-deleted with their observer_neighbors snapshot, but only when no observation, observer_metrics, observer_neighbor_metrics or dropped_packets row still references them. Set it above observerDays, packetDays (and channelDays) and metricsDays; below those an observer waits until that data has aged out. Example: an operator honouring a 30-day retention period sets all three to 30. ping_triggers (Ping Scores triggers, with sender names) has no window and is kept forever, because the all-time Ping Scores records need it.",
"_comment": "nodeDays: nodes not seen in N days moved to inactive_nodes (default 7). observerDays: observers not sending data in N days are removed (-1 = keep forever, default 14). packetDays: transmissions older than N days are deleted (0 = disabled). channelDays: channel messages (GRP_TXT) and their observations are kept until they are N days old instead of packetDays; only takes effect when packetDays is set and channelDays is larger (0 = channel messages follow packetDays, default) (#296). The server's in-memory window (packetStore.retentionHours) is separate; channel history is read from the database. clientRxDays: mobile client-RX coverage rows (client_receptions/client_observers) older than N days are deleted (0 = disabled) — bounds the opt-in coverage tables (#1727). clientRegionsDays: declared-region reports (client_declared_regions, by reported_at) older than N days are deleted, and reports older than that are refused at ingest; 0 or omitted follows clientRxDays, and 30 days when that is 0 too — this table is never unbounded (#126, docs/client-regions.md). NOTE (#1283): all retention fields are consumed by the INGESTOR process. The server is read-only and never prunes."
},
"db": {
"vacuumOnStartup": false,
"incrementalVacuumPages": 1024,
"load": {
"chunkSize": 10000,
"_comment": "chunkSize: rows fetched per chunk by PacketStore.LoadChunked during startup (#1009). Default 10000. Lower values surface the early-HTTP-readiness signal sooner (the listener binds after the first chunk) at the cost of more SQL round-trips. Higher values reduce per-chunk overhead but delay first-chunk readiness. The X-CoreScope-Load-Status response header reports loading|ready and progress=<rows> until the load completes."
},
"_comment": "vacuumOnStartup: run one-time full VACUUM to enable incremental auto-vacuum on existing DBs. Executed by the INGESTOR at startup, BEFORE the MQTT subscriber starts (#1283), so there is no contention with concurrent writes. Blocks ingestor startup for minutes on large DBs; requires 2x DB file size in free disk space. incrementalVacuumPages: free pages returned to OS after each retention reaper cycle (default 1024). See #919. load.chunkSize: see nested _comment (#1009).",
"_comment_slowWriterMs": "#1340 — SQLite writer-lock log threshold (default 500). Any wrapped writer call (tagged neighbor_builder, mqtt_handler, prune_packets, prune_observers, prune_metrics, vacuum) whose hold_ms exceeds this emits a single [db-slow-writer] log line. Configured per-process via the CORESCOPE_DB_SLOW_WRITER_MS environment variable on the INGESTOR (e.g. CORESCOPE_DB_SLOW_WRITER_MS=200 for tighter alerting). Per-component wait_ms / hold_ms / contention_total histograms are surfaced via /api/perf/write-sources under .writer_perf regardless of this threshold."
},
"resolvedPathBackfill": {
"disabled": false,
"batchSize": 500,
"pauseMs": 250,
"_comment": "Optional (ingestor, #188). Once per ingestor start, re-resolves observations stored with resolved_path = NULL, from a persisted watermark up to the newest observation at the start of the pass. It waits until a neighbour-edge build has caught up with the stored observations and found at least one edge, then works in batches: each batch reads batchSize rows, resolves them outside any lock, and writes the results and the new watermark in one short write transaction, then sleeps pauseMs. Rows that still do not resolve stay NULL and are not retried. disabled: true skips the pass. batchSize: rows per batch, default 500. pauseMs: milliseconds between batches, default 250, which caps the pass at about 2,000 rows/s. For both numbers, 0 or omitted means the default, so the pause cannot be turned off; the smallest pause is 1. The server sees backfilled values only after its next restart."
},
"decodeBackfill": {
"disabled": false,
"batchSize": 300,
"idWindow": 20000,
"pauseMs": 250,
"pollSeconds": 30,
"_comment": "Optional (ingestor, #380). Re-decodes historical rows whenever the effective key set grows: a hashChannels/channelKeys addition plus a SIGHUP or restart, an approved shared channel, or an approved region scope. Stored enc_<HEX> GRP_TXT rows and transport-scoped rows whose region is unknown are re-decoded through the normal decode path, so a rewritten channel_hash, decoded_json or scope_name is byte-identical to the same packet ingested fresh. Already-resolved rows are never touched and an ambiguous region match abstains. One run at a time, resumed from a persisted watermark after a crash or a restart: each batch scans at most idWindow transmission ids and at most batchSize matching rows, writes them in one short transaction together with the new watermark, then sleeps pauseMs. disabled: true runs no pass; it only keeps forgetting keys that are revoked or removed, so turning the pass back on re-reads what arrived while they were gone. A key is its name and its value: a new value under a configured name starts a pass of its own. pollSeconds: how often the effective key set is checked for growth, default 30. For every number, 0 or omitted means the default, so the pause cannot be turned off. Progress is on /api/healthz under decode_backfill and in /api/perf/write-sources as backfill_decode_channel / backfill_decode_scope. Measure first: scripts/decode-backfill-estimate.sh prints the candidate counts and the estimated cost of one pass, read-only. A running server picks the rewrites up on its next poll for the SQL-backed channel and scope surfaces; its in-memory copies of rows loaded earlier refresh at its next start."
},
"listLimits": {
"packetsMax": 10000,
"nodesMax": 2000,
"analyticsMax": 200,
"channelMessagesMax": 500,
"bulkHealthMax": 200,
"_comment": "Maximum row counts returned by list API endpoints. These enforce a DoS-bounded ceiling for both UI and external requests. Operators with small/embedded deployments can tighten these; operators running large regional meshes can raise them. bulkHealthMax is intentionally separate from nodesMax: /api/nodes/bulk-health is per-row much heavier than /api/nodes (it joins per-node observer health + recent-packet stats) so its ceiling stays low (default 200) even if nodesMax is raised."
},
"_comment_ingestorStats": "Ingestor publishes a 1-Hz stats snapshot consumed by the server's /api/perf/io and /api/perf/write-sources endpoints (#1120). Path is configured via the CORESCOPE_INGESTOR_STATS environment variable on the INGESTOR process. Default: /tmp/corescope-ingestor-stats.json. The writer uses O_NOFOLLOW + 0o600, so a pre-planted symlink in /tmp cannot be used to clobber an arbitrary file. SECURITY: in shared-tmp environments (multi-tenant hosts), point CORESCOPE_INGESTOR_STATS at a private directory like /var/lib/corescope/ingestor-stats.json that only the corescope user can write to.",
"corsAllowedOrigins": [],
"_comment_corsAllowedOrigins": "Cross-origin allowlist for embed scenarios (#1369) AND for /ws WebSocket upgrades (#1793 — CSWSH defense per OWASP WebSocket Security Cheat Sheet). Exact-match origins, e.g. [\"https://blog.example.com\", \"https://embed.example.com\"]. Same-origin requests (Origin host == request Host) and non-browser clients (no Origin header) are always allowed for /ws. When empty (default), no Access-Control-* headers are sent and browsers enforce same-origin; cross-origin /ws upgrades are rejected. When non-empty, only the listed origins receive CORS headers, and Access-Control-Allow-Methods is limited to GET, HEAD, OPTIONS (the cross-domain surface is read-only — same-origin admin writes are unaffected). Use [\"*\"] to allow any origin for CORS XHR (NOT recommended for write-capable deployments); note that \"*\" is deliberately NOT honored for /ws upgrades — list explicit origins to permit cross-origin WebSocket clients (OWASP guidance: avoid wildcards in CSWSH defense). Operators can override per-deployment with the CORS_ALLOWED_ORIGINS environment variable (comma-separated). No credentialed CORS is enabled. To embed the map or channels pages cross-domain, add the embedding origin here and use the URL pattern '/#/map?embed=1' or '/#/channels?embed=1' — embed mode hides the top-nav, bottom-nav, and side drawer for full-bleed iframe rendering.",
"radio": {
"defaultFreqMHz": null,
"_comment_defaultFreqMHz": "#681 - frequency in MHz used for the terrain profile's Fresnel zone. null = automatic: the most common frequency in the radio string of observers seen in the last 7 days, else the MeshCore firmware default 869.618 MHz. Set it to pin the value (150-2500). A request's own freq parameter still wins.",
"kFactor": null,
"_comment_kFactor": "#681 - effective earth-radius factor for the curvature bulge (0.5-10). null = 4/3, the standard atmosphere; 1 is geometric, 0.6 a pessimistic sub-refraction case.",
"antennaHeightsM": {},
"_comment_antennaHeightsM": "#681 - antenna heights above ground in metres (0-100) for the terrain profile, keyed by role (repeater, room, companion, sensor, point = a free map point) or by a node's 64-hex public key, e.g. {\"repeater\": 12, \"<public key>\": 18}. Built-in role defaults are repeater 10, room 5, companion 2, sensor 2, point 2. A per-node value counts as known; role values are shown as assumed. Mesh adverts carry no height, so these are always estimates unless you set them. The predicted reach (map.coverage) uses the same heights for its transmitter.",
"txPowerDbm": 22,
"_comment_txPowerDbm": "#941 - transmit power in dBm (-10 to 30) the Predicted reach panel starts from: 22 is the most common LORA_TX_POWER in the MeshCore firmware variants. Together with the four values below it is the link budget, margin = power + antennaGainDbi + rxGainDbi - path loss - lossDb - sensitivityDbm, minus the environment loss (map.coverage.environmentLossDb). The server computes only the path loss; the browser applies the budget, so a viewer can move these in the panel without a new computation. A later milestone exposes them in the customizer.",
"antennaGainDbi": 3,
"_comment_antennaGainDbi": "#941 - transmitter antenna gain in dBi (-10 to 20) for the predicted reach: a typical small whip or dipole.",
"rxGainDbi": 3,
"_comment_rxGainDbi": "#941 - receiver antenna gain in dBi (-10 to 20) for the predicted reach.",
"lossDb": 0,
"_comment_lossDb": "#941 - cable and connector loss in dB (0-30) for the predicted reach.",
"sensitivityDbm": -130,
"_comment_sensitivityDbm": "#941 - receiver sensitivity in dBm (-150 to -80) for the predicted reach: about SF8 at 62.5 kHz, the firmware's default preset (thermal noise -174 + 10*log10(62500) + a 6 dB noise figure + the SF8 SNR limit). Interim until validation against observed links calibrates it."
},
"webSocket": {
"maxClients": 512,
"_comment_maxClients": "#369 - GLOBAL ceiling on concurrent /ws clients, across every address. On by default at 512, because unlike the per-IP limits below it still works behind a reverse proxy: it counts connections, not clients. Sizing: the web UI opens exactly one socket per browser tab, and each accepted client costs roughly 12 KB of server heap, two goroutines, one file descriptor and a 256-message send queue (the queue is the part worth bounding — a stalled client can hold a quarter of a megabyte of pending broadcasts). 512 therefore sits far above any realistic tab count for a regional mesh while capping the worst case at a few hundred MB and keeping descriptors to half of the common 1024 soft limit. Excess clients get 503 with Retry-After before the handshake, and the refusals are counted in /api/stats under websocket.rejectedGlobalCap - watch that together with websocket.clients and raise this if real visitors are being turned away. Set 0 to remove the ceiling entirely (not recommended on a public instance).",
"maxConnsPerIP": 0,
"_comment_maxConnsPerIP": "#1794 - concurrent /ws connections allowed from one client address. 0 = off, and that is the shipped default ON PURPOSE: carrier-grade NAT puts thousands of unrelated mobile subscribers behind one public IPv4, so a low cap refuses real visitors while a scraper simply rents more addresses. Set it only if you know your audience is not behind shared NAT.",
"upgradesPerMinPerIP": 30,
"_comment_upgradesPerMinPerIP": "#1794 - handshakes per minute from one client address. On by default. Safe under CGNAT: a real client upgrades a handful of times per minute even while reconnecting, so 30 leaves ordinary traffic alone while flattening a scraper reconnect loop. Set 0 to disable.",
"trustedProxies": [],
"_comment_trustedProxies": "#1794 - addresses or CIDRs of YOUR reverse proxy (and of any CDN or load balancer in front of it). REQUIRED for the per-IP limits to do anything behind nginx/Caddy/Traefik/ingress: without it every visitor shares the proxy's address, so the limits are skipped and one warning is logged at startup. X-Forwarded-For is believed only when the request comes from one of these addresses, because anyone else can forge it. It is read from the RIGHT (#691): entries that are themselves listed here are skipped, and the first address that is not listed is the client, so it works whether your proxy appends to X-Forwarded-For (e.g. nginx $proxy_add_x_forwarded_for) or replaces it, and a client cannot pick its own address by prefixing forged entries. List every proxy hop you run, or the inner hop is taken for the client and all visitors share its budget. A malformed or empty entry stops the walk at the nearest listed hop, which then counts as the client. Never list an address you do not control.",
"deny": [],
"_comment_deny": "#1794 - addresses or CIDRs refused at the /ws upgrade, before the handshake. Accepts both \"1.2.3.4\" and \"1.2.3.0/24\". Applies even behind an unconfigured proxy, since it is your explicit instruction. Rejections are counted in /api/stats under websocket.rejectedDeny."
},
"https": {
"cert": "/path/to/cert.pem",
"key": "/path/to/key.pem",
"_comment": "TLS cert/key paths for direct HTTPS. Most deployments use Caddy (included in Docker) for auto-TLS instead."
},
"branding": {
"siteName": "CoreScope",
"tagline": "Real-time MeshCore LoRa mesh network analyzer",
"logoUrl": null,
"faviconUrl": null,
"homeUrl": null,
"ogImageUrl": null,
"publicBaseUrl": null,
"_comment": "Customize site name, tagline, logo, and favicon. logoUrl/faviconUrl can be absolute URLs or relative paths. homeUrl (#1518) overrides the navbar logo link target — set to an absolute http(s):// URL for operators embedding CoreScope inside a larger site, or a '#'-prefixed app route (e.g. '#/home') to keep it in-app. Validator rejects javascript:, data:, vbscript:, file:, about:, protocol-relative '//', and bare paths to block XSS. Cross-origin URLs open in the SAME tab (no target=_blank); wrap with your own anchor if you need new-tab behavior. The mobile bottom-nav 🏠 button is intentionally NOT overridden — it stays in-app to preserve SPA back-stack on phones. Link previews (#646): siteName and tagline are rendered server-side once at startup (changes to config.json or theme.json take effect on restart; theme.json overrides config.json) into <title>, og:*/twitter:* tags (HTML-escaped; defaults apply when unset). ogImageUrl is an absolute http(s) URL or a path of an image under public/ (e.g. og-image-meshview.png); default og-image.png; github hosts are refused. publicBaseUrl (e.g. https://meshview.example) is the origin used to make og:image absolute; when unset it is derived from the request Host, with the scheme taken from X-Forwarded-Proto only if the peer is listed in webSocket.trustedProxies. Behind a TLS-terminating proxy, SET publicBaseUrl in production, otherwise og:image is emitted as http://. An unusable value is ignored with a startup warning. TODO: expose in the customizer (AGENTS rule 8)."
},
"theme": {
"accent": "#4a9eff",
"accentHover": "#6db3ff",
"navBg": "#0f0f23",
"navBg2": "#1a1a2e",
"navActiveBg": "rgba(74,158,255,0.15)",
"statusGreen": "#45644c",
"statusYellow": "#b08b2d",
"statusRed": "#b54a4a",
"_comment": "CSS color overrides. Use the in-app Theme Customizer for live preview, then export values here. navActiveBg (#1509) controls the background of the currently-active top-nav link (the 'pill'); accepts any CSS color, typically a translucent rgba() so the nav gradient shows through."
},
"nodeColors": {
"repeater": "#dc2626",
"companion": "#2563eb",
"room": "#16a34a",
"sensor": "#d97706",
"observer": "#8b5cf6",
"_comment": "Marker/badge colors per node role. Used on map, nodes list, and live feed."
},
"markerStroke": {
"color": "#fff",
"width": 2,
"opacity": 1,
"_comment": "#1488/#1506 — outline around each map marker (live + map pages). Defaults restored to v3.7.2 visual (solid white, 2px). 'color' accepts any CSS color (hex, rgb, rgba); use rgba() or drop 'opacity' below ~0.5 to soften the outline when hundreds of nodes feel overwhelming. 'width' is the SVG stroke width (0 hides the outline entirely). Operators can override per-browser via the in-app Theme Customizer (Colors tab → Marker Stroke)."
},
"map": {
"_comment": "Key matching: the block names directly under map (tiles, dhm, heritage, coverage, ...) must be spelled exactly as documented. The server reads them exactly (a case variant such as \"DHM\" or \"Heritage\" is ignored, with a warning for the typed blocks), and the browser reads the map.tiles keys exactly. Field names inside the typed blocks (map.dhm, map.heritage, map.dhm.profile.share) are decoded by Go JSON and also match a different case, but use the documented spelling anyway.",
"datafordeler": {
"_comment": "#1065 — server-only API key for Datafordeleren (datafordeler.dk), which serves Danmarks Højdemodel since 2026-11-30: the DHM WMS overlays (terrain and surface hillshade, contours) from wms.datafordeler.dk, the elevation WCS (terrain profile, predicted reach, colour by elevation) from wcs.datafordeler.dk (#1065 M2), the spring orthophoto WMTS (map.dhm.ortho, #1065 M4) from wmts.datafordeler.dk, and the GeoDanmark building footprints of the terrain profile (map.dhm.profile.buildings, #1065 M5). Create an IT-system under 'Privat bruger' in Datafordeler Administration (portal.datafordeler.dk) and an API key under it; the key lasts 2 years and is active 15 minutes after it is created. map.dhm needs it. The server sends it to Datafordeleren as the apikey query parameter (the only way that platform takes a key) and never to a browser, a response or a log line; if the same value appears anywhere the client config ships an operator value (all of map, above all the Skærmkort browser key map.tiles.providers.datafordeler.apiKey; the deprecated top-level tiles and mapDarkTileProvider; roles, snrThresholds, distThresholds, limits and externalUrls; timestamps.customFormat, customizer.disabledTabs, kiosk.tour and the nodes.recommendedAdverts source), it is removed from the client config with a warning that names the place, never the value. Both server secrets, this key and map.dhm.token, are matched by substring, so they must be the real, long keys: a short or placeholder value would also remove every client-config value that merely contains it. It is not a customizer setting.",
"apiKey": ""
},
"dhm": {
"_comment": "#680 — optional 'Terrain (DHM hillshade)' overlay on the Map and Live pages (Denmark only). Since 2026-11-30 DHM is served by Datafordeleren (#1065): it needs map.datafordeler.apiKey (below, outside this block). Off unless enabled is true and map.datafordeler.apiKey is non-empty; otherwise the overlay is not offered, the endpoint returns 404, and the server logs once at startup that the key is missing. Browsers fetch tiles from /api/map/dhm/wms; the server adds the key, which is never sent to clients, written to responses or logged.",
"_comment_token": "#1065 — token is a Dataforsyningen token (free, from dataforsyningen.dk) and is now optional. It is used only for the exaggerated hillshade (wms/dhm_temp, see layer) and the Skråfoto search (the orthophoto moved to Datafordeleren too, #1065 M4); it is sent in a header, never in a URL. A key made on a personal Dataforsyningen account lasts at most 14 days; organisation keys and keys migrated from before 2026-11-30 last longer. Without it, the terrain overlay is the Datafordeleren terrain hillshade.",
"_comment_layer": "#687 — which DHM hillshade the server fetches: 'exaggerated' (default; the clearer quickDHM_skyggekort_terraen_overdrevet from wms/dhm_temp) or 'terrain' (dhm_terraen_skyggekort from Datafordeleren's DHM WMS, #1065). With 'exaggerated', any tile that fails upstream is served from the terrain layer instead: Dataforsyningen refuses wms/dhm_temp (403) until it opens, announced for Q1 2027, so every tile falls back until then. 'exaggerated' needs map.dhm.token; without it the server logs once and uses 'terrain'. Any other value logs a warning and uses 'terrain'. Browsers are unaffected either way.",
"_comment_overlays": "#734 - the tile proxy serves DHM overlays by id: 'terrain' (the hillshade 'layer' picks, as above), 'surface' (dhm_overflade_skyggekort from Datafordeleren's DHM WMS, the surface hillshade with buildings and trees, zoom 7-19) and 'contours' (dhm_kurve_traditionel in the red style, 2.5 m contour lines, zoom 14-19). Browsers send the id, never an upstream layer name. surface and contours have no fallback, and every overlay draws on the same tileRateLimitPerMin budget and upstream limits. /api/config/client offers all three whenever map.dhm is enabled with map.datafordeler.apiKey: the Map and Live layer control shows terrain and surface as an either-or hillshade pair and contours as its own toggle. There is no key to set.",
"enabled": false,
"token": "",
"layer": "exaggerated",
"tileRateLimitPerMin": 2400,
"_comment_tileRateLimitPerMin": "#682/#681 - tiles one client address may pull from upstream per minute; beyond it the proxy answers 429 with Retry-After. Tiles already in the server cache and tiles outside Denmark are not counted. One budget covers every DHM overlay. Measured on a large 1920x1080 map: with one overlay, looking around (load, a few zoom steps and pans) takes about 300 tiles and zooming through the whole range and back with 16 pans about 800; with a hillshade and the contour lines on from zoom 15 (#734), the geometric ceiling of looking around at 2.5 s per view with 1.3x headroom is 2288 tiles a minute, and zooming 15-19 and back with 16 pans is at most 1692 as one burst, so people never meet 2400; a script walking DHM's ~97 million tiles on your token is held to 40 per second. 0-60000 (0 = off); out of range warns and uses the default, like profile.rateLimitPerMin. 60000 is 25x the shipped default, comfortably under the point where perMin/minute arithmetic would silently stop limiting. Like the /ws limits it needs webSocket.trustedProxies behind a reverse proxy, otherwise every visitor shares one address and the limit is skipped with a warning.",
"ortho": {
"_comment": "#728 - optional Danish spring orthophoto (GeoDanmark 'Ortofoto forår') as a base-map tile at /api/map/dhm/ortho/{z}/{x}/{y}. Since #1065 M4 it comes from Datafordeleren's WMTS (GeoDanmarkOrto/orto_foraar_webm) on map.datafordeler.apiKey, like the DHM WMS overlays; map.dhm.token plays no part. Off unless enabled is true AND map.dhm is active (enabled with map.datafordeler.apiKey); otherwise the endpoint returns 404 and /api/config/client has no dhm.ortho. Ortho tiles draw on the same per-client budget (tileRateLimitPerMin) and the same upstream limits as the hillshade, and are cached apart from it (2048 tiles / 96 MB / 7 days). Tiles the foreign-land mask marks (Skåne, Schleswig, Rügen) are never fetched. The key is never sent to clients.",
"enabled": false,
"maxZoom": 20,
"_comment_maxZoom": "#1065 M4 - the top zoom served and offered, 7-20 (default 20, the last tile matrix of the old service). Datafordeleren lists its tile matrices only in capabilities behind the key; lower this if they stop earlier. Out of range warns and uses 20."
},
"profile": {
"_comment": "#681 - GET /api/terrain/profile: terrain, line of sight and first Fresnel zone between two nodes or map points, from the DHM elevation model (Datafordeleren's WCS, with map.datafordeler.apiKey; #1065 M2). Off unless enabled is true AND map.dhm is enabled with map.datafordeler.apiKey. Public, but each client address may only start rateLimitPerMin uncached profiles per minute, since every one spends upstream requests on your key. All values are bounded; an out-of-range value logs a warning and uses the default shown here.",
"enabled": false,
"maxPathKm": 80,
"_comment_maxPathKm": "Longest path in km, at most 80 (the largest raster the WCS client requests). Longer paths are refused with 400 before any upstream call.",
"maxSamples": 3200,
"_comment_maxSamples": "Most elevation samples computed along a path (16-3200). The step is 10 m, growing to 25 m on long paths; at most 1024 samples are returned, always including the worst point.",
"chunkKm": 2.5,
"_comment_chunkKm": "Path length per upstream raster. WCS rasters are axis-aligned, so smaller chunks fetch fewer pixels for a diagonal path; a profile never uses more than 16 rasters per elevation model (32 with both DTM and DSM). 0 = one raster per model below about 79 km; every raster edge must stay inside the 80 km WCS span, so a path at the 80 km maximum splits into 2. Cheaper in requests but coarser (about 39 m per pixel at 20 km, 156 m at 80 km).",
"cacheEntries": 256,
"_comment_cacheEntries": "Profiles kept in memory (1-4096), about 25.6 KB each at most (model=both, maxSamples=3200), or 28.8 KB with buildings.enabled (a class byte per sample, plus 2): about 105 MB worst case at the documented maxima of both settings, about 118 MB with buildings.enabled. Antenna heights, k and frequency are computed per request, so changing them is a cache hit.",
"cacheTTLHours": 24,
"_comment_cacheTTLHours": "How long a cached profile is reused (up to 168). DHM is re-flown every few years.",
"upstreamTimeoutMs": 10000,
"_comment_upstreamTimeoutMs": "Timeout per upstream raster, 500-10000 ms (the shared DHM client's own limit is 10 s). A whole profile is also cut off after 25 s.",
"rateLimitPerMin": 10,
"_comment_rateLimitPerMin": "Uncached profiles one client address may request per minute; beyond it 429 with Retry-After. Cache hits are not counted. 0 = off. Needs webSocket.trustedProxies behind a reverse proxy, like tileRateLimitPerMin.",
"maxInFlight": 4,
"_comment_maxInFlight": "Uncached profiles fetched at once across all clients (1-16); beyond it 503 with Retry-After: 5, before any upstream request; such a refusal is not charged to the per-client budget, and is counted and logged (at most one line a minute). Requests for a profile already being fetched share it and are not counted, but are refused with it if its fetch is. Each profile runs up to 32 rasters, and the shared DHM upstream budget is 4 requests at a time, so a higher value mostly queues work; 16 is 4x that budget, and each blocked profile holds about 20 goroutines.",
"share": {
"_comment": "#727 - shareable profile links. With enabled true (and the profile above on), the panel's copy button hands out /p?profile=... links instead of #/map?profile=..., and the server answers /p with link-preview tags for that profile (title with the distance, the two endpoint names, the elevation model and an 'antenna heights assumed' caveat), plus og:url and robots noindex. Endpoint names follow the same visibility rule as the profile itself: a hidden, blacklisted or unpositioned node is 'not found'. A browser opening /p moves straight on to the #/map link. Click-tracking keys that apps append to shared links (fbclid, gclid, dclid, msclkid, igshid, mc_eid, utm_*) are ignored; any other unknown key is refused with 400. Set branding.publicBaseUrl when you enable this: og:url is built from it, and without it from the request's Host header. Off by default; /p links that already exist keep opening the profile either way.",
"enabled": false,
"upstreamPerMin": 2,
"_comment_upstreamPerMin": "#727 shareUpstreamPerMin - the server-wide number of upstream profile fetches per minute that shared links may cause, 0-60 (0 = sharing never goes upstream). Only the share card (GET /api/terrain/profile.png, the og:image of /p) spends it, and only when the profile's elevations are not cached: a link measured in a browser before it was shared costs nothing. Per-client limits do not bound a crawler fleet that fetches from many addresses; this does. When it is spent, or upstream fails or takes over 10 s, the card is served degraded (no verdict, re-fetched by crawlers within a minute) and one log line a minute says how many. A slow fetch is not wasted: it runs on to the profile's 25 s deadline and is cached, so the re-fetched card is complete."
},
"card": {
"_comment": "#727 - the share card, GET /api/terrain/profile.png: a 1200x630 PNG of the profile (both endpoints, the chart, the verdict, the antenna heights and the DHM credit), drawn on the server and used as og:image of /p. Served only with share.enabled. Colours come from theme.json (terrainFill, terrainClutter, losLine, fresnel100, fresnel60, profileBlocked and the base colours), as the site uses them; a viewer's own customizer colours stay in their browser.",
"theme": "dark",
"_comment_theme": "dark (default: previews mostly sit on dark chat backgrounds) or light: which theme.json palette the card uses; dark merges theme and themeDark as the site's dark mode does.",
"names": true,
"_comment_names": "Node names on the card and in its alt text. false draws 'Node A' and 'Node B'. Hidden, blacklisted or unpositioned nodes are never named either way: they are 'not found'.",
"cacheEntries": 64,
"_comment_cacheEntries": "Rendered cards kept in memory (1-1024), for 24 h; a card is 80-100 KB, and the cache is also bounded at 128 KiB per entry (8 MiB at the default). A cached card costs nothing; a card that is not cached is charged to the per-client rateLimitPerMin."
},
"foreignFill": {
"_comment": "#738 - cross-border profiles. DHM covers Denmark only, so a path into Germany or across Øresund is partial with no verdict. With enabled true, the samples DHM does not cover (Swedish, German, Polish and Norwegian land, the 1.25 km off their coasts, and everything outside DHM's raster extent) are filled from Copernicus DEM GLO-30, and the profile gets a verdict on the mixed terrain model. Only a profile with at least one DHM sample is filled. GLO-30 is a ~30 m surface model: forests and towns read high, which can only make a verdict more pessimistic; the surface (DSM) verdict of a mixed profile stays unknown. The response marks it mixed, lists the filled stretches and their resolution, and carries the Copernicus credit. At most 16 upstream calls per profile; a path that needs more at full resolution uses the 1/2 overview (~60 m), and one that needs more still is not filled. If the fill fails, the profile is partial with no verdict, as without it; its DHM part is cached as usual and a later request tries only the fill again. Heights abroad are EGM2008 next to DHM's DVR90 and are not corrected (a sub-metre step). With maxPathKm at most 80, Sweden and Germany are in reach, Norway and Poland in practice not.",
"_comment_traffic": "Off unless enabled is true, because it sends requests to a third party: anonymous HTTPS range requests to the AWS Open Data bucket copernicus-dem-30m.s3.amazonaws.com, the only host the fill ever contacts (no token, no account, no redirects followed). One header read per 1x1 degree tile and one read per 1024x1024 block: 5 requests and about 6.4 MB for a cold 80 km profile from Copenhagen into Skåne, nothing for a cached one. No client data is sent, but the bucket sees which tiles and byte ranges are read, i.e. the coarse area being profiled. The DHM token is never sent there.",
"_comment_licence": "Copernicus DEM GLO-30: free of charge, worldwide, with attribution (https://documentation.dataspace.copernicus.eu/APIs/SentinelHub/Data/DEM/resources/license/License-COPDEM-30.pdf). The organisations in charge of the Copernicus programme by law or by delegation do not incur any liability for any use of the Copernicus WorldDEM-30",
"enabled": false,
"blockCacheMB": 32,
"_comment_blockCacheMB": "Compressed GLO-30 blocks kept in memory, 1-256 MB (a block is about 0.04 to 2.8 MB). Tile headers are cached on their own, at most 64 of at most 64 KB.",
"timeoutMs": 10000,
"_comment_timeoutMs": "Timeout per upstream request to the bucket, 500-10000 ms; a whole profile is still cut off after 25 s."
},
"buildings": {
"_comment": "#730 - tell buildings from trees in the surface model (DSM). With enabled true, where the surface stands more than 2.5 m above the terrain on a model=both profile, the server asks GeoDanmark Vektor's buildings (bygning_current) on Datafordeleren's WFS (#1065 M5; it uses map.datafordeler.apiKey, which map.dhm needs anyway, so there is no extra key; credited 'GeoDanmark Vektor - Bygning (GeoDanmark, @geodanmark)', CC BY 4.0) for the building footprints within 15 m of the path. Only the 2D outline is used: every height still comes from the DHM terrain and surface models, one request per 10 km of path that has such samples, and the answer says per sample whether it is a building or trees/other, and what blocks the surface verdict. This runs inside the same profile fetch: no extra per-client charge, the same maxInFlight slot, at most 4 footprint requests at once server-wide and 5 s per profile, and a cached profile asks nothing. If the service fails, the profile is still answered, marked unclassified, and cached for 10 minutes only; within those, a request for it at least 2 minutes after the last try asks the footprint service again (charged and admitted like a miss) on the cached DHM data, and the requests in between, and those that arrive while that retry runs, are plain cache hits. A retry that classifies is cached like any profile; once the 10 minutes run out unclassified, the next request fetches the profile afresh, DHM data included. Off by default; the radius, threshold and limits are fixed in code for now.",
"enabled": false
}
}
},
"heritage": {
"_comment": "#723 — optional 'Protected ancient monuments' overlay on the Map and Live pages (Denmark only): the Slots- og Kulturstyrelsen register of protected monuments (points) and their protection zones (polygons), credited '© Slots- og Kulturstyrelsen'. No token or account: browsers fetch the tiles directly from the agency's public WMS (https://www.kulturarv.dk/ffgeoserver/public/wms), which allows cross-origin use. The service, layers, credit and zoom range are fixed in code. Tiles exist from zoom 12 in, so the overlay draws nothing further out. Off unless enabled is true; when off the overlay is not offered and neither browsers nor this server contact the service. Viewers switch it on per browser, and it is remembered there and in the link (?heritage=1).",
"_comment_info": "#723 M2 — with enabled true this server also answers GET /api/terrain/heritage: a click on the Map or Live page with the overlay on (zoom 12+) shows the protection zone at that point, or the nearest one within radiusM, with the register's own type, dating, status and numbers. For that the SERVER asks the agency's public WFS (https://www.kulturarv.dk/ffgeoserver/public/wfs) for one fixed 250 m cell around the click, never more; the agency's terms forbid harvesting the register, so the limits below are there to keep it that way. All values are bounded; an out-of-range value logs a warning and uses the default shown here.",
"_comment_profile": "#723 M3 — with enabled true the Map page's Path profile (map.dhm.profile) asks the same endpoint about both ends of a measured path, once per end, and shows a neutral advisory note beside the verdict when an end is inside or within radiusM of a protection zone. The verdict itself is unchanged, and a failed lookup shows nothing. Height edits and model switches ask nothing new, so a profile costs at most two lookups, charged to rateLimitPerMin only when not cached.",
"enabled": false,
"radiusM": 100,
"_comment_radiusM": "How far from a clicked point a protection zone is still reported, 0-250 m (0 = only a zone holding the point). Each upstream request covers the 250 m cell grown by this on every side.",
"cacheEntries": 256,
"_comment_cacheEntries": "Cells kept in memory (1-4096), a few KB each; the cache is also capped at 32 MB whatever this says.",
"cacheTTLHours": 168,
"_comment_cacheTTLHours": "How long a cached cell is reused (up to 168). Protection zones change rarely.",
"upstreamTimeoutMs": 10000,
"_comment_upstreamTimeoutMs": "Timeout of one upstream request, 500-10000 ms; beyond it the click gets 504.",
"rateLimitPerMin": 20,
"_comment_rateLimitPerMin": "Uncached lookups one client address may make per minute; beyond it 429 with Retry-After. Cache hits are not counted. 0 = off. Needs webSocket.trustedProxies behind a reverse proxy, like map.dhm.profile.rateLimitPerMin.",
"maxInFlight": 4,
"_comment_maxInFlight": "Upstream lookups running at once across all clients (1-16); beyond it 503 with Retry-After: 5 before any upstream request, not charged to the per-client budget, and counted and logged (at most one line a minute). Clicks in a cell already being looked up share that lookup."
},
"masts": {
"_comment": "#724 — optional antenna sites layer (Denmark only): existing antenna positions from Mastedatabasen (Digitaliseringsstyrelsen, CC0), served by GET /api/masts?cell=E,N for one fixed 2 km grid cell at a time. No key or account. The server fetches a cell from the agency's documented WFS only when a viewer's map needs it and it is not in the server cache (7 days); it never prefetches or walks the country, because the data's catalogue record forbids scraping. Viewer addresses are not sent to the agency. The service and cell size are fixed in code. Off unless enabled is true; when off the layer is not offered and the endpoint returns 404.",
"enabled": false,
"cellRateLimitPerMin": 120,
"_comment_cellRateLimitPerMin": "Uncached cells one client address may make the server fetch per minute; beyond it the endpoint answers 429 with Retry-After. Cached cells are not counted. A first look at zoom 13 is about 70 cells, at zoom 14 about 18. 0-6000 (0 = off); out of range warns and uses the default. Like the /ws limits it needs webSocket.trustedProxies behind a reverse proxy, otherwise every visitor shares one address and the limit is skipped with a warning.",
"maxInFlight": 16,
"_comment_maxInFlight": "Distinct uncached cells fetched at once, server-wide (1-256); beyond it a request is 503 with Retry-After and is not charged to its client. Of these, at most upstreamSlots talk to Mastedatabasen at the same time. It is never below upstreamSlots: a lower value warns and is raised to it. Out of range warns and uses the default.",
"upstreamSlots": 16,
"_comment_upstreamSlots": "#872 — requests open towards Mastedatabasen at the same time, server-wide (1-256). A first look at zoom 13 is about 70 uncached cells; admitted fetches beyond this wait for a slot, up to 30 s. maxInFlight always admits at least this many. Out of range warns and uses the default.",
"minZoom": 13,
"_comment_minZoom": "#724 M5 — the zoom the map starts fetching antenna sites at (13-18). 13 is also the lowest: the browser paces one view against the per-client budget at zoom 13. Viewers may raise it for themselves in the customizer (Display tab), never lower it. Out of range warns and uses the default.",
"hintDistanceM": 500,
"_comment_hintDistanceM": "#724 M5 — the Path profile hint names a 700/800/900 MHz antenna site within this many metres of an end (100-990; at most four 2 km cells per end). Viewers may change it for themselves in the customizer, within the same bounds. Out of range warns and uses the default.",
"hintStrongM": 100,
"_comment_hintStrongM": "#724 M5 — within this many metres the hint says the transmitter may be on the same building or mast (0 = no strong tier, up to hintDistanceM). A value past hintDistanceM warns and uses the default.",
"breakerFailures": 3,
"_comment_breakerFailures": "#872 — circuit breaker: after this many consecutive upstream failures (timeouts, connection errors or 5xx answers from Mastedatabasen) the server stops asking Mastedatabasen for breakerCooldownSec. Meanwhile an uncached cell answers at once with 503, header X-CoreScope-Masts-Source: down and Retry-After the remaining cool-down, not charged to its client; cached cells are still served (also stale ones, see maxStaleDays), and the map says the source is not responding. After the cool-down one request probes: success resumes, failure pauses again. One log line per change. 1-20; out of range warns and uses the default.",
"breakerCooldownSec": 300,
"_comment_breakerCooldownSec": "#872 — how long the breaker pauses requests to Mastedatabasen before probing again, in seconds (30-3600). Out of range warns and uses the default.",
"maxStaleDays": 90,
"_comment_maxStaleDays": "#872 — stale-if-error: a cell older than the 7-day cache time stays in the server cache (within its existing entry and byte limits, least recently used first out) until this many days after it was fetched. While Mastedatabasen fails (a timeout, connection error or 5xx) or the breaker is open, that copy is served instead of an error, marked with header X-CoreScope-Masts-Stale: 1 and never cached by the browser, and the map says 'Antenna data may be out of date'. An older cell gets the error as before. 7-365 (7 = no stale copies); out of range warns and uses the default."
},
"coverage": {
"_comment": "#941 - optional Predicted reach: pick a node or a map point and see where a radio there is predicted to be heard, shaded by signal margin. The server computes the path loss on a raster: free-space loss plus ITU-R P.526 Bullington diffraction over the terrain (DHM's terrain model inside Denmark; with map.dhm.profile.foreignFill.enabled Copernicus GLO-30 elsewhere in its region), with the earth bulge (radio.kFactor) and the terrain profile's antenna heights (radio.antennaHeightsM); the browser colours it with the link budget in radio.txPowerDbm and its neighbours. Off unless enabled is true AND there is terrain: map.dhm enabled with map.datafordeler.apiKey (#1065), or the foreign fill on. Served as GET /api/terrain/coverage and /api/terrain/coverage/raster; when off both return 404 and nothing is contacted. A cold 40 km reach fetches about 33-49 DHM rasters (512 px at 30 m) on the operator's Datafordeleren key; they are cached as elevation tiles, so neighbouring and repeated reaches reuse them. All values are bounded; an out-of-range value logs a warning and uses the default shown here.",
"enabled": false,
"maxRadiusKm": 40,
"_comment_maxRadiusKm": "Largest radius a request may ask for, in km (5-60). The default request radius is 40 km, or this if lower. Cost grows about with the cube of the radius: 60 km is about 3.4x the work of 40 km.",
"resolutionM": 30,
"_comment_resolutionM": "Elevation grid and radial step in metres (20-60). 30 m resolves the first Fresnel zone of 869 MHz links (about 59 m mid-path at 40 km); 20 m costs about 2.4x the compute and 1.8x the DHM rasters.",
"maxInFlight": 1,
"_comment_maxInFlight": "Computations running at once, server-wide (1-4). Each uses half the CPUs and up to about 64 MB; beyond it 503 with Retry-After: 5, not charged to the client. Identical requests share one computation.",
"rateLimitPerMin": 2,
"_comment_rateLimitPerMin": "Computations not in the cache one client address may start per minute (0-600, 0 = off); beyond it 429 with Retry-After. Cached reaches and the power, gain and sensitivity sliders cost nothing. Needs webSocket.trustedProxies behind a reverse proxy, like the other per-client limits.",
"upstreamPerMin": 240,
"_comment_upstreamPerMin": "DHM rasters the predicted reach may fetch per minute, server-wide (0-6000; 0 = cached tiles only). A cold computation the budget cannot pay is refused with 503 and Retry-After before any request; one larger than the whole budget runs only when it is full. The reach also never uses more than 2 of the shared DHM client's 4 upstream slots, so map tiles and profiles keep the rest.",
"cacheEntries": 32,
"_comment_cacheEntries": "Computed reaches kept in memory (1-256), each about 0.1-1 MB, for cacheTTLHours. Changing power, gains or sensitivity reuses the cached loss.",
"cacheTTLHours": 24,
"_comment_cacheTTLHours": "How long a computed reach and an elevation tile are reused, in hours (above 0, at most 168).",
"elevationCacheMB": 64,
"_comment_elevationCacheMB": "Memory for cached elevation tiles (8-1024 MB), 512 KB each: 64 MB holds about three 40 km disks.",
"model": "delta",
"_comment_model": "#941 M2 - the default propagation model: \"bullington\" (ITU-R P.526 section 4.5.1) or \"delta\" (the complete method of section 4.5.2, delta-Bullington: adds the smooth-earth diffraction beyond the radio horizon, about 1.4x the compute). A request or the panel may pick the other; each model is cached on its own. The default is delta, as the validation report on real links decided (docs/predicted-reach-validation.md); set \"bullington\" to keep the cheaper model.",
"environmentLossDb": 25,
"_comment_environmentLossDb": "#962 - environment loss in dB (0-60, default 25 dB) that the Predicted reach panel subtracts from the link budget: buildings, trees and other clutter the terrain model does not include (inside Denmark the terrain is DHM's bare-earth model). The #941 validation found the observed SNR a median of about 27 dB below the bare-terrain prediction, most on short links. Like the radio budget it only shifts the margin, so the browser applies it to the cached loss and a viewer can change it in the panel (the renv link parameter) without a new computation; 0 gives the bare-terrain prediction. The server's own reach counts (budgetDb) and the validation harness stay raw. A later milestone exposes it in the customizer."
},
"skraafoto": {
"_comment": "#737 — optional Skråfoto: the oblique aerial photos of Denmark from Klimadatastyrelsen (north, east, south, west and straight down), credited 'Klimadatastyrelsen, Skråfotos, CC BY 4.0'. With enabled true this server answers GET /api/skraafoto/search?lat=&lon=[&year=] (the photos of a point, newest year by default, 2017 not offered) and GET /api/skraafoto/preview/{collection}/{item} (one photo as a JPEG of at most 1024 px). The search needs a Dataforsyningen token: it uses map.dhm.token, which stays on the server (a token alone does not switch this on, and map.dhm.enabled is not needed). The previews are read from the agency's image CDN, which needs no token and is never sent one; only one small overview of each photo is read, by range requests. Off unless enabled is true; when off, or without a map.dhm.token, both endpoints return 404 and nothing is contacted. All values are bounded; an out-of-range value logs a warning and uses the default shown here.",
"enabled": false,
"searchRateLimitPerMin": 30,
"_comment_searchRateLimitPerMin": "Uncached searches one client address may make per minute (0-6000, 0 = off); beyond it 429 with Retry-After. Cached answers are not counted. Needs webSocket.trustedProxies behind a reverse proxy, like the other per-client limits.",
"previewRateLimitPerMin": 120,
"_comment_previewRateLimitPerMin": "Uncached previews one client address may fetch per minute (0-6000, 0 = off); a click shows up to five.",
"dailyCap": 2000,
"_comment_dailyCap": "Uncached searches and previews per UTC day, server-wide (0-1000000, 0 = off), so many clients together cannot exhaust the shared token; beyond it 503 with Retry-After until 00:00 UTC, cached photos are still served, and one line a minute is logged.",
"maxInFlight": 8,
"_comment_maxInFlight": "Distinct uncached searches and previews being fetched at once, server-wide (1-16); beyond it 503 with Retry-After: 5, not charged to the client or the daily budget.",
"cacheMB": 64,
"_comment_cacheMB": "Memory for cached previews (1-512 MB), some 50-150 KB each, kept 7 days. Searches are cached 24 hours on top of this, within 16 MB."
},
"tiles": {
"_comment_defaults": "#332 — the built-in defaults are 'osm-dark' / 'osm-standard' (keyless OpenStreetMap, tiles to zoom 18). Set darkDefault/lightDefault to any enabled style id to override; they take priority over the built-in fallback. A default whose provider is not enabled (opentopomap, usgs and esri are opt-in) is skipped, as if it were not set. Carto is opt-in too (#845), but a Carto default is not skipped: while carto is off it is migrated to its nearest keyless map (see _comment_carto). Either way the browser console names the configured id and why it is not used (#859). Carto is NOT the default any more: since August 2026 keyless Carto raster tiles come back HTTP 200 with 'API KEY REQUIRED' stamped into the PNG, and CoreScope has no Carto basemap-key plumbing.",
"_comment_legacy": "Legacy raw tile-URL overrides — \"tiles.dark\" / \"tiles.light\" at the top level, or \"darkUrl\" / \"lightUrl\" here — are still honoured: they apply when no provider was chosen in the browser and no darkDefault/lightDefault is set, i.e. precedence is browser choice > darkDefault/lightDefault > raw URL > built-in fallback. A raw URL carries no vendor metadata, so such a map shows the generic \"\u00a9 OpenStreetMap contributors\" credit (no vendor-specific or licence attribution), is never CSS-inverted in dark mode, and is capped at zoom 18 like the built-in OpenStreetMap default. Prefer darkDefault/lightDefault with a registered style id when you need the correct credit, licence link or a different zoom ceiling.",
"darkDefault": "osm-dark",
"lightDefault": "osm-standard",
"providers": {
"_comment_carto": "#845 — Carto is OFF unless enabled is the JSON boolean true: since August 2026 keyless Carto raster tiles are watermarked 'API KEY REQUIRED' (see _comment_defaults) and CoreScope has no Carto basemap-key plumbing. While it is off, a viewer's saved Carto choice (and a Carto darkDefault/lightDefault) is shown as the nearest keyless map: Positron and Voyager as OSM Standard, Carto Dark as Esri Dark Gray Canvas when esri is enabled, otherwise OSM Standard (dark); the browser console then warns once, naming the configured Carto id and the map used instead (#859). Set enabled: true only if you have a Carto arrangement; optional: specify 'domain' for Carto enterprise (e.g. 'mycompany' for 'https://{s}.mycompany.cartocdn.com').",
"carto": {
"enabled": false,
"domain": ""
},
"_comment_osm": "OSM providers: 'mapbox', 'thunderforest', 'maptiler'. WARNING: Tokens are sent to the browser. Apply origin/referrer restrictions in your provider dashboard.",
"osm": {
"enabled": false,
"provider": "",
"token": ""
},
"_comment_opentopomap": "OpenTopoMap topographical tile provider. Enabling this makes USERS' BROWSERS fetch tiles from tile.opentopomap.org, exposing their IP and approximate viewing area to that third party. Tiles are CC-BY-SA: the credit and licence link must stay on the map. Limited to zoom level 17, and it is a small volunteer-run service with informal fair-use expectations.",
"opentopomap": {
"enabled": false
},
"_comment_stamen": "Stamen (hosted by Stadia). WARNING: Tokens are sent to the browser. Apply origin/referrer restrictions.",
"stamen": {
"enabled": false,
"token": ""
},
"_comment_usgs": "USGS topographical tile providers (USGS Topo, USGS Imagery). Enabling these makes USERS' BROWSERS fetch tiles from basemap.nationalmap.gov, exposing their IP and approximate viewing area to that third party. Limited to zoom level 16, and The National Map only serves the United States and its territories — elsewhere these layers render blank with no on-screen explanation.",
"usgs": {
"enabled": false
},
"_comment_esri": "Esri tile providers (Esri Dark Gray Canvas, Esri World Imagery). Off unless enabled is true. Since #728 this also gates Esri Dark Gray Canvas, which used to be offered unconditionally: a config whose darkDefault or lightDefault names an esri-* style must set enabled to true, otherwise browsers skip that default (and log a console warning), and the server logs a warning at startup. The map then uses the next fallback (a legacy darkUrl/lightUrl, else osm-dark / osm-standard). Enabling these makes USERS' BROWSERS fetch tiles from server.arcgisonline.com, exposing their IP and approximate viewing area to Esri. The tiles are licensed under the Esri Master License Agreement, and Esri says this public endpoint is for licensed ArcGIS use; check that your use is covered before enabling. The credit must stay on the map. World Imagery is an aerial photo, never inverted in dark mode; style ids esri-imagery (light) and esri-imagery-dark (dark), tiles to zoom 19.",
"esri": {
"enabled": false
},
"_comment_dataforsyningen": "Danish base map from Klimadatastyrelsen / Dataforsyningen (#741 M2): Natur- og Friluftskort, the Natur_Friluft_basis layer of the wms/natur_friluftskort WMS in EPSG:3857, as style id dataforsyningen-natur-friluft, light only (no inverted dark variant; picked in the dark theme it shows as published). Skærmkort is no longer here: Dataforsyningen closed topo_skaermkort_DAF on 2026-11-30, and it now comes from Datafordeleren with its own key (map.tiles.providers.datafordeler below, #1065). Off unless enabled is true AND token is a non-empty string. WARNING: while it is on, this token is sent to the browser on purpose (with enabled not true, the server leaves it out of the client config) — every viewer can read it, as Dataforsyningen intends for tokens used in public web applications. Create a NEW, separately named token for it in your Dataforsyningen account; never reuse map.dhm.token, which stays server-only (the server refuses to ship a value that contains map.dhm.token and logs it). If the token is copied and misused, Dataforsyningen can block it: only the base map is affected, never DHM, and you rotate it. Enabling these makes USERS' BROWSERS fetch tiles from api.dataforsyningen.dk, exposing their IP and approximate viewing area to the agency, as with Carto and Esri today. Coverage is Denmark only: elsewhere the layer renders blank with no on-screen explanation. Tiles from zoom 6 to 19; the credit (Klimadatastyrelsen, Natur- og Friluftskort, CC BY 4.0) must stay on the map. Natur- og Friluftskort is slower upstream (about 1 s a tile cold).",
"dataforsyningen": {
"enabled": false,
"token": ""
},
"_comment_datafordeler": "Skærmkort from Klimadatastyrelsen / Datafordeleren (#741, moved by #1065 M6): the standard, grå (grey) and dæmpet (muted) variants, through the WMS at wms.datafordeler.dk/Dkskaermkort/topo_skaermkort/1.0.0/wms in EPSG:3857 (layers dtk_skaermkort, dtk_skaermkort_graa, dtk_skaermkort_daempet, WMS 1.3.0, 512 px tiles), as style ids dataforsyningen-skaermkort, dataforsyningen-skaermkort-graa and dataforsyningen-skaermkort-daempet (light) and dataforsyningen-skaermkort-graa-dark (dark: the grey map under the dark-mode invert filter). The ids are unchanged from #741, so saved choices keep working. Off unless enabled is true AND apiKey is a non-empty string; otherwise the styles are not offered (no broken tiles). WARNING: while it is on, this key is sent to the browser on purpose, as the apikey query parameter of every tile (the only way Datafordeleren takes a key); with enabled not true the server leaves it out of the client config. Every viewer can read it, and a Datafordeleren key opens all unprotected data of its IT-system, so create a SEPARATE IT-system for it in Datafordeler Administration (portal.datafordeler.dk) with its own API key (2 years, active 15 minutes after it is created); never reuse map.datafordeler.apiKey, which stays server-only (the server refuses to ship a value that contains map.datafordeler.apiKey, in map.tiles, the deprecated top-level tiles or mapDarkTileProvider, and logs it). If the key is copied and misused, delete it in Datafordeler Administration: only the base map is affected, never DHM, and you make a new one. Enabling this makes USERS' BROWSERS fetch tiles from wms.datafordeler.dk, exposing their IP and approximate viewing area to the agency. Coverage is Denmark only. Tiles from zoom 6 to 19; the credit (Klimadatastyrelsen and GeoDanmark, Skærmkort, CC BY 4.0) must stay on the map. It is not a customizer setting.",
"datafordeler": {
"enabled": false,
"apiKey": ""
}
}
}
},
"share": {
"nodes": {
"_comment": "#811 - shareable node links with link previews. With enabled true, /p?node=<64-hex public key> answers link-preview crawlers with that node's name and role, the configured area it is in (from areas, only when it is in one), when it was last heard, its relays and seen airtime (repeaters and rooms) and its neighbour count, and a 1200x630 card, GET /api/nodes/{pubkey}/card.png, as og:image. Cards exist for repeaters, rooms and sensors only: a companion link gets the plain site preview. No position, map or packet content is shown. Hidden nodes (nodeBlacklist, observerBlacklist, hiddenNamePrefixes), unknown and inactive nodes get the plain site preview with 404. Only full 64-hex keys are accepted. A browser opening /p?node= moves straight on to the node page, and Copy URL on the node page and in the nodes side pane hands out /p?node= links for those roles (#811 M4; a viewer can turn that off in the customizer). The card uses the theme and names settings of map.dhm.profile.card, is cached for 10 minutes (64 cards) and, when not cached, is charged to map.dhm.profile.rateLimitPerMin per client. It needs no upstream service and works without map.dhm. Set branding.publicBaseUrl when you enable this. Off by default.",
"enabled": false
},
"packets": {
"_comment": "#812 - shareable packet links with link previews. With enabled true, /p?packet=<16-hex packet hash> answers link-preview crawlers with the packet's payload type, route and hop count, the observer that heard it first and how many did, its spread, farthest observer and estimated flood airtime, the touched areas' names, and a 1200x630 card, GET /api/packets/{hash}/card.png, as og:image: the path drawn as a schematic with no basemap. Every payload type gets a card, but nothing of the payload is shown: no message text, no channel and no sender. Only an advert names its origin. Branches through hidden nodes or observers (nodeBlacklist, observerBlacklist, hiddenNamePrefixes) are removed whole, a hidden first observer leaves counts only, and adverts from hidden nodes, unknown packets and packets no longer stored get the plain site preview with 404. A browser opening /p?packet= moves straight on to the packet page. The card uses the theme and names settings of map.dhm.profile.card, is cached (64 cards) for 2 minutes while the packet is under 10 minutes old and 24 hours after that and, when not cached, is charged to map.dhm.profile.rateLimitPerMin per client. It needs no upstream service. Set branding.publicBaseUrl when you enable this. Off by default.",
"enabled": false
},
"areas": {
"_comment": "#1030 - shareable DAGI area links with link previews. With enabled true, /p?kommune=<code>, /p?landsdel=<code>, /p?dkregion=<code> and /p?postnr=<code> answer link-preview crawlers with the area's name (Danish place names, e.g. 'Lemvig Kommune on <branding.siteName>'), what it is (e.g. 'Kommune in Region Midtjylland, Denmark') and the DAGI credit, plus og:url and robots noindex, and (#1030 M2) a 1200x630 card, GET /api/dagi/{layer}/{code}/card.png, as og:image: the area on a map of Denmark and its neighbours (DAGI; Natural Earth, public domain) with a locator inset, and its nodes as active / total for repeaters, companions, room servers and observers (an observation in the last 24 h), sensors when there are any. The counts come from the Areas (DAGI) analytics snapshot and leave hidden identities out; a card request never starts a pass. The card uses the theme of map.dhm.profile.card, is cached for 10 minutes (64 cards) and, when not cached, is charged to map.dhm.profile.rateLimitPerMin per client. The keys are the map's hash keys (dkregion, never region, which is the observer region filter); exactly one with a 1-8 digit code, v and the click-tracking keys ignored, any other key 400; an unknown code gets the plain site preview with 404. Postnummer links (/p?postnr=, #1030 M4) are previewed as e.g. '7620 Lemvig'; a street postcode of central Copenhagen or Frederiksberg previews its whole group under the group's code (e.g. /p?postnr=1051 is '1050–1473 København K', og:url /p?postnr=1050). A browser opening /p moves straight on to #/map?<key>=<code>. Needs dagi.enabled; reads only the in-memory DAGI index (no database, no upstream). Set branding.publicBaseUrl when you enable this. Off by default.",
"enabled": false
}
},
"nodes": {
"recommendedAdverts": {
"_comment": "#1076 - recommended advert settings check. With enabled true, the My Mesh card and the health panel of a claimed repeater or room server compare its observed advert intervals (the advertIntervals estimate the card already has; no extra request) with these recommended settings and show a deviation with the CLI command to fix it, credited to sourceName and linked to sourceUrl. zeroHopIntervalMinutes is the recommended advert.interval (0 = off, else 60-240; an odd value is rounded down to the even minutes the firmware runs) and floodIntervalHours the recommended flood.advert.interval (0 = off, else 3-168), the firmware's ranges. Room servers run the same advert timers as repeaters. Only what is certain is claimed: missed receptions make an observed interval longer, never shorter, so an interval more than tolerancePercent shorter than recommended (or a regular interval for a class recommended off) is a deviation and anything longer is only 'not in conflict'; under minObservations adverts (3-20) it says 'not enough data', and while the route classes are still provisional (route-mask backfill not complete) a deviation is only 'may differ'. The card shows one summary line; the details open on tap. The values below (advert.interval 240 min, flood.advert.interval 47 h) are this deployment's recommendation and the defaults when a key is left out. Only the admin sets them, here; there is no customizer setting and viewers cannot change them. Set sourceName (and sourceUrl, an absolute http(s) URL, or empty for no link) to wherever your recommendation is published; left out, the card credits this server's admin with no link. A bad value logs a warning and takes its default. Off by default.",
"enabled": false,
"zeroHopIntervalMinutes": 240,
"floodIntervalHours": 47,
"minObservations": 3,
"tolerancePercent": 10,
"sourceName": "this server's admin",
"sourceUrl": ""
}
},
"home": {
"heroTitle": "CoreScope",
"heroSubtitle": "Find your nodes to start monitoring them.",
"steps": [
{
"emoji": "\ud83d\udce1",
"title": "Connect",
"description": "Link your node to the mesh"
},
{
"emoji": "\ud83d\udd0d",
"title": "Monitor",
"description": "Watch packets flow in real-time"
},
{
"emoji": "\ud83d\udcca",
"title": "Analyze",
"description": "Understand your network's health"
}
],
"checklist": [
{
"question": "How do I add my node?",
"answer": "Search for your node name or paste your public key."
},
{
"question": "What regions are covered?",
"answer": "Check the map page to see active observers and nodes."
}
],
"footerLinks": [
{
"label": "\ud83d\udce6 Packets",
"url": "#/packets"
},
{
"label": "\ud83d\uddfa\ufe0f Network Map",
"url": "#/map"
},
{
"label": "\ud83d\udd34 Live",
"url": "#/live"
},
{
"label": "\ud83d\udce1 All Nodes",
"url": "#/nodes"
},
{
"label": "\ud83d\udcac Channels",
"url": "#/channels"
}
],
"_comment": "Customize the landing page hero, onboarding steps, FAQ, and footer links."
},
"mqtt": {
"broker": "mqtt://localhost:1883",
"topic": "meshcore/+/+/packets",
"_comment": "Legacy single-broker config. Prefer mqttSources[] for multiple brokers."
},
"mqttSources": [
{
"name": "local",
"broker": "mqtt://localhost:1883",
"topics": [
"meshcore/+/+/packets",
"meshcore/#"
]
},
{
"name": "lincomatic",
"broker": "mqtts://mqtt.lincomatic.com:8883",
"username": "your-username",
"password": "your-password",
"rejectUnauthorized": false,
"topics": [
"meshcore/SJC/#",
"meshcore/SFO/#",
"meshcore/OAK/#",
"meshcore/MRY/#"
],
"iataFilter": [
"SJC",
"SFO",
"OAK",
"MRY"
],
"region": "SJC",
"connectTimeoutSec": 45
},
{
"_comment": "WebSocket MQTT broker (e.g. meshcore-mqtt-broker). Use ws:// for plain WebSocket or wss:// for TLS. Username/password supported.",
"name": "wsmqtt",
"broker": "wss://wsmqtt.example.com/mqtt",
"username": "corescope",
"password": "your-password",
"topics": [
"meshcore/#"
]
}
],
"channelKeys": {
"Public": "8b3387e9c5cdea6ac9e5edbaa115cd72"
},
"hashChannels": [
"#LongFast",
"#test",
"#sf",
"#wardrive",
"#yo",
"#bot",
"#queer",
"#bookclub",
"#shtf"
],
"channelProposals": {
"enabled": false,
"autoApprove": false,
"maxPending": 100,
"maxApproved": 128,
"maxQueuedRequests": 256,
"retentionDays": 30,
"submissionsPerHour": 20
},
"_comment_channelProposals": "Shared hashtag channels: visitors suggest public hashtag channels (names only, never keys) on the Channels page. Submissions open only when enabled is true AND apiKey is strong (16+ characters, not a placeholder). By default an administrator approves or rejects suggestions at #/channels?view=proposals with the apiKey. Opt-in autoApprove immediately approves only brand-new names; existing pending, rejected and revoked names are not auto-approved. Approved channels are decrypted by the ingestor and listed for everyone, even before they carry traffic; they stay active if enabled is later set to false. Limits: maxPending/maxApproved bound the table, maxQueuedRequests bounds the request queue next to the database, submissionsPerHour is a global sliding window, and rejected or unreviewed suggestions are deleted after retentionDays. Read by both server and ingestor; changing this policy requires an ingestor restart.",
"antennaClaims": {
"enabled": false,
"detailsEnabled": false,
"autoApproveProven": false,
"autoApproveDetails": false,
"submissionsPerHour": 20,
"maxPending": 256,
"maxPendingPerNode": 3,
"maxQueuedRequests": 256,
"retentionDays": 30,
"staleMoveM": 50,
"reviewDeltaM": 60,
"pollInitialMs": 2000,
"pollBackoff": 1.5,
"pollMaxMs": 30000,
"pollMaxAttempts": 60,
"adminDefaultFilter": "proven"
},
"_comment_antennaClaims": "Owner antenna heights (#789): a node's owner claims its antenna height with POST /api/nodes/{pubkey}/antenna-claims, gets a 6-character code, puts it into the node's advert name (appended, within the first 23 bytes) and sends an advert. A new advert with a valid signature from that key proves the claim; the code is single-use and expires after 24 h. Claims open only when enabled is true AND apiKey is strong. A proven height waits for an administrator (GET/POST /api/admin/antenna-claims) unless autoApproveProven is true, and even then a height far from the surface estimate waits. Only repeater and room claims with a cached surface estimate can be flagged, so with autoApproveProven on every companion and sensor claim, and every claim whose surface is not cached yet, is approved without review at any height from 0 to 100 m. An approval of a proof older than the node's claim already in force is refused (409). A proven clear removes the owner's height at once. detailsEnabled (#898, default false; needs enabled) also lets owners set station details in the same claim: antenna type, gain (-5 to 20 dBi), power, installation and two optional contacts, contactPublic (shown to everyone on the node page and by GET /api/nodes/{pubkey}/station) and contactAdmin (admin queue only, never public, never logged). A claim that sets details waits for an administrator unless autoApproveDetails is true (#1007, default false; needs detailsEnabled): then a proven claim that sets details is approved without an administrator, height, details and both contacts included, unless it is flagged for review (a flagged claim always waits). WARNING: with autoApproveDetails on, the contactPublic free text goes public without review; revoke is the only remedy. autoApproveProven and autoApproveDetails are independent: autoApproveProven covers claims without details, autoApproveDetails claims with them, so both must be true for every unflagged claim to be approved without an administrator. Turning a switch on does not approve claims that are already proven. One approval decides the whole claim. Both contacts are deleted when the details are removed, replaced, rejected, revoked or expire, and when retention deletes the claim; admin database backups (GET /api/backup, scripts/backup-sqlite.sh) and SQLite free pages can still hold a deleted contact, because deletion is logical. With detailsEnabled off, setting details is refused (403) but removing them still works. All four switches are read by their exact spelling. Approved heights rank below radio.antennaHeightsM per node and above the surface estimate, and are ignored once the node moves more than staleMoveM (default 50 m, at most 5000) from where the height was proven. reviewDeltaM (default 60 m, at most 1000) is how far above the surface estimate + 2 m a height may be before it is flagged for review (more than 2 m below the surface is always flagged). Limits: maxPending (all nodes) and maxPendingPerNode bound unproven claims (a claim over a limit is refused, never evicts another), maxQueuedRequests bounds the request queue next to the database, submissionsPerHour is a global sliding window, and finished claims are deleted after retentionDays (the approved one is kept). Read by both server and ingestor; changing this policy requires an ingestor restart. Owner page and admin queue (server only, sent to the browser by GET /api/antenna-claims/config): the claim status is checked after pollInitialMs (default 2000, 500-60000), each later wait grows by pollBackoff (default 1.5, 1-4) up to pollMaxMs (default 30000, at most 600000) per wait, for at most pollMaxAttempts checks (default 60, at most 1000) before the page offers Check again; adminDefaultFilter (default proven; pending, approved, rejected, revoked, expired or superseded) is the admin queue's first view. A value out of its range is the default. Owner guide: docs/user-guide/antenna-height-claims.md.",
"accounts": {
"enabled": false,
"sessionDays": 30,
"sessionMaxDays": 90,
"loginCodeMinutes": 15,
"maxMyNodes": 200,
"loginsPerHour": 120,
"loginsPerMinutePerIP": 2,
"writesPerHour": 600,
"writesPerHourPerAccount": 120,
"maxPendingLogins": 512,
"maxPendingPerKey": 8,
"maxQueuedRequests": 256,
"inactiveMonths": 24,
"maxOwnersPerNode": 5,
"objectionDays": 30,
"maxNodesPerCode": 20,
"maxLinkedNodes": 200,
"linkCodesPerHourPerAccount": 30,
"newOwnersPerNodePerDay": 3
},
"_comment_accounts": "Owner accounts (#1018 M1): an owner signs in with their companion radio (no password, no e-mail) and gets a My Mesh list that follows them to every device. The page (#/account) issues a 6-character code bound to the companion's key; the owner puts it in the companion's name (appended, within the first 31 bytes, 23 when the companion shares its position) and sends a FLOOD advert. A new, signature-valid companion advert with the code proves the sign-in; repeater, room and sensor adverts never do, and a blacklisted key is refused like an unknown node. The browser then gets an HttpOnly, Secure, SameSite=Strict session cookie (__Host-mv_session): it lasts sessionDays (default 30, at most 90), is renewed on use, and never lasts past sessionMaxDays (default 90) after the sign-in; both are clamped to the 90-day hard cap. Serve the site over HTTPS (or localhost): browsers drop a Secure cookie on plain http. Sign-in opens only when enabled is true AND apiKey is strong; enabled is read by its exact spelling. The ingestor creates the signing key account-session.key (0600) next to the database when enabled is true; the server only reads it, and replacing it signs everyone out. It is not in GET /api/backup. Limits: loginCodeMinutes (default 15, at most 60) is a code's lifetime; loginsPerHour is a global sliding window on new sign-ins and loginsPerMinutePerIP a per-client one that only works behind webSocket.trustedProxies; writesPerHour is a global window on account changes and writesPerHourPerAccount the same per account (sign out everywhere and delete are never counted, so an owner can always revoke a stolen session); maxPendingLogins and maxPendingPerKey bound unproven sign-ins; maxQueuedRequests bounds the account-requests queue next to the database; maxMyNodes (default 200, at most 1000) bounds one account's list. Accounts without a sign-in for inactiveMonths (default 24, at most 120) are deleted with their list. A value out of its range is the default (sessionDays and sessionMaxDays are clamped to 90 instead). Node links (#1018 M2a): an owner links repeaters and room servers to the account with one code for up to maxNodesPerCode nodes (default 20, at most 50; also the account's waiting link codes), each proven by its own advert carrying the code; a node has at most maxOwnersPerNode owners (default 5, at most 20), a new owner never removes a verified one, and a node gains at most newOwnersPerNodePerDay owners per 24 h (default 3). The existing owners get a notice, and those linked before the new one may object to the administrator within objectionDays (default 30, at most 365). maxLinkedNodes (default 200, at most 1000) bounds one account's links and linkCodesPerHourPerAccount (default 30) its link codes per hour. Read by both server and ingestor; changes need a restart of both. Owner guide: docs/user-guide/owner-account.md.",
"healthThresholds": {
"infraDegradedHours": 24,
"infraSilentHours": 72,
"nodeDegradedHours": 1,
"nodeSilentHours": 24,
"relayActiveHours": 24,
"observerOnlineMinutes": 60,
"observerStaleMinutes": 1440,
"_comment": "How long (hours) before nodes show as degraded/silent. 'infra' = repeaters & rooms, 'node' = companions & others. relayActiveHours: a repeater is shown as 'actively relaying' if its pubkey appeared as a path hop in a non-advert packet within this window (issue #662).",
"_comment_observerThresholds": "Observer health classification. Online: last_seen < observerOnlineMinutes ago. Stale: between Online and observerStaleMinutes. Offline: beyond observerStaleMinutes. Defaults 60 / 1440 (1h / 24h) match the node thresholds for consistency and eliminate flap on low-traffic / CDN-fronted instances (#1552). Operators who want the old aggressive 10-min Online threshold can set observerOnlineMinutes: 10."
},
"defaultRegion": "SJC",
"mapDefaults": {
"center": [
37.45,
-122.0
],
"zoom": 9
},
"geo_filter": {
"polygon": [
[37.80, -122.52],
[37.80, -121.80],
[37.20, -121.80],
[37.20, -122.52]
],
"bufferKm": 20,
"_comment": "Optional. By default, also restricts GET /api/nodes (and therefore the live map) to nodes within the polygon + bufferKm — foreign_advert-tagged nodes are always kept regardless (#730, see foreignAdverts below); see geoFilterExemptNodeList to opt out of that. The prune-geo-filter admin flow always uses this polygon regardless of geoFilterExemptNodeList. Polygon is an array of [lat, lon] pairs (minimum 3). Use the GeoFilter tab in the Customizer (requires apiKey) or the GeoFilter Builder (`/geofilter-builder.html`) to draw a polygon visually and export a config snippet. Remove this section to disable filtering entirely. Nodes with no GPS fix are always allowed through."
},
"foreignAdverts": {
"mode": "flag",
"_comment": "Controls how the ingestor handles ADVERTs whose GPS is OUTSIDE the geo_filter polygon (#730). 'flag' (default): store the advert/node and tag it foreign_advert=1 so operators can see bridged/leaked nodes via the API ('foreign': true on /api/nodes). 'drop': legacy behavior — silently discard the advert (no log, no node row). Only applies when geo_filter is configured; otherwise has no effect."
},
"geoFilterExemptNodeList": false,
"_comment_geoFilterExemptNodeList": "Optional, default false. When geo_filter is configured, GET /api/nodes (and therefore the live map) excludes out-of-polygon nodes by default — the long-standing #730 declutter behavior, preserved automatically for every deployment upgrading from before this field existed. Set to true if you want geo_filter purely for foreign_advert classification/analytics (e.g. a 'Foreign Traffic' investigation) WITHOUT also hiding out-of-polygon nodes from the node list/map. Per-request ?geoFilter=0 / ?geoFilter=1 on /api/nodes overrides either default for a single call. Has no effect on ingestion (foreignAdverts.mode) or the prune-geo-filter admin flow, both of which are unaffected by this flag.",
"_comment_areas": "Optional. GPS-based display filter. Each entry defines a geographic area by polygon ([lat, lon] pairs) or bounding box (latMin/latMax/lonMin/lonMax). Packets and nodes are attributed to an area based on the transmitting node's own GPS coordinates — not the observer's location. Areas appear as a filter pill bar in the dashboard. Remove this section to disable the area filter UI. NOTE: every key under \"areas\" must be an area object, so this note lives outside the block (#694) — a string in there makes the whole file fail to decode and the server ignores it.",
"areas": {
"BAY": {
"label": "Bay Area",
"polygon": [
[37.90, -122.55],
[37.90, -121.75],
[37.25, -121.75],
[37.25, -122.55]
]
},
"SJC": {
"label": "San Jose",
"latMin": 37.20,
"latMax": 37.45,
"lonMin": -122.05,
"lonMax": -121.75
}
},
"regions": {
"SJC": "San Jose, US",
"SFO": "San Francisco, US",
"OAK": "Oakland, US",
"MRY": "Monterey, US"
},
"_comment_regionGroups": "Optional (#416). Named quick picks over the region codes above: each group renders as one button next to the region filter that selects exactly those codes in one click. Omit the key, or leave it [], and the region filter behaves exactly as it did before the option existed. These are convenience labels over region codes, NOT verified geographic boundaries. Limits: at most 12 groups, at most 24 distinct codes per group, names at most 40 characters. A group that breaks one of those limits, has no name or lists no code is dropped with one log line at startup — a truncated code list or a shortened name would mislabel the filter, so the whole entry is refused instead. Repeated group names (case-insensitive) keep the first one; repeated codes inside a group are de-duplicated. Codes are matched case-insensitively against the served region list (config entries plus every observer IATA in the database), so a code no observer reports is dropped from the group and a group left with no code is not offered at all — an operator can list an observer that is not up yet without creating a dead button. Served by GET /api/config/regions/groups; the flat GET /api/config/regions map is unchanged.",
"regionGroups": [
{ "name": "Bay Area", "codes": ["SFO", "SJC", "OAK"] },
{ "name": "Central Coast", "codes": ["MRY"] }
],
"regionPlacement": {
"_comment": "Optional (server, #488). Which nodes /api/nodes?region= returns. mode: \"heard\" (default, today's rule) puts a node in every region whose observers heard any of its adverts, so flooded adverts list distant nodes too. \"placed\" uses direct evidence first: a node is in every region that heard its own transmission (hash count 0 on the observation's own frame; contact re-shares never count), else in the regions that heard it in the fewest relays up to maxHops, else in no region (it stays in the unfiltered list). A legacy row without a stored frame counts an explicit [] path only as a 0-hop fallback. This is an inference from reception, not a verified location. maxHops: cap of the relayed fallback, 0-7, default 3. lifetimeDays: evidence older than this before the node's own newest hearing is ignored, default 30, 0 = no window. persistSpanHours: when set, a region whose direct hearings span less than this is dropped if another region's span at least this (one-off long-distance reception); default 0 = off. Read at startup. Before switching to placed, run the read-only dry-run on a copy of the database: corescope-server -db <copy> -config-dir <dir> -region-placement-dryrun prints counts per basis and region and the unplaced share for several maxHops values, and exits. These values are meant for the customizer in a later release.",
"mode": "heard",
"maxHops": 3,
"lifetimeDays": 30,
"persistSpanHours": 0
},
"cacheTTL": {
"stats": 10,
"nodeDetail": 300,
"nodeHealth": 300,
"nodeList": 90,
"bulkHealth": 600,
"networkStatus": 600,
"observers": 300,
"channels": 15,
"channelMessages": 10,
"analyticsRF": 1800,
"_comment_analyticsRF": "TTL (seconds) for the shared analytics result cache. Backs /api/analytics/rf, /api/analytics/topology, /api/analytics/distance, /api/analytics/hash-sizes, /api/analytics/channels, /api/analytics/subpaths. Default 60s if unset (#1239) — distance analytics is viewed live during active analysis, so the default smooths cold-miss churn without freezing data. Lower with care; sub-15s values can cause repeated multi-second cold computes during heavy ingest.",
"analyticsTopology": 1800,
"analyticsChannels": 1800,
"analyticsHashSizes": 3600,
"analyticsSubpaths": 3600,
"analyticsSubpathDetail": 3600,
"nodeAnalytics": 60,
"nodeSearch": 10,
"invalidationDebounce": 30,
"_comment": "All values in seconds. Server uses these directly. Client fetches via /api/config/cache."
},
"liveMap": {
"propagationBufferMs": 5000,
"_comment": "How long (ms) to buffer incoming observations of the same packet before animating. Mesh packets propagate through multiple paths and arrive at different observers over several seconds. This window collects all observations of a single transmission so the live map can animate them simultaneously as one realistic propagation event. Set higher for wide meshes with many observers, lower for snappier animations. 5000ms captures ~95% of observations for a typical mesh.",
"maxNodes": 2000,
"_comment_maxNodes": "Maximum nodes the /live map fetches (and renders) in one page. Default 2000. Raise this on deployments that have measured perf headroom on mid-range mobile (heap + frame-time). Server clamps to [100, 20000]: misconfigured values are coerced silently. Also caps the matching /api/packets?limit fetch the live VCR-rewind code uses. Reporter: #1574."
},
"timestamps": {
"defaultMode": "ago",
"timezone": "local",
"formatPreset": "iso",
"customFormat": "",
"allowCustomFormat": false,
"_comment": "The browser's default timestamp display (#969); a viewer's own Customize -> Display choice still wins. defaultMode: ago|absolute. timezone: local|utc. formatPreset: iso|iso-seconds|locale. customFormat: tokens YYYY MM DD HH mm ss SSS Z, offered only with allowCustomFormat: true. Keys are case-sensitive; an invalid value logs a warning and takes the default (ago/local/iso)."
},
"packetStore": {
"maxMemoryMB": 1024,
"estimatedPacketBytes": 450,
"retentionHours": 168,
"hotStartupHours": 0,
"_comment": "In-memory packet store. maxMemoryMB caps RAM usage. retentionHours: only packets younger than this are kept in memory (0 = unlimited). hotStartupHours: hours loaded synchronously at startup; background loader fills the remaining retentionHours window. 0 = disabled (loads full retentionHours synchronously, legacy behavior). Set to a positive value (e.g. 24) to reduce startup time on large DBs.",
"_comment_gomemlimit": "On startup the server reads GOMEMLIMIT from the environment if set; otherwise it derives a Go runtime soft memory limit of maxMemoryMB * 1.5 and applies it via debug.SetMemoryLimit. This forces aggressive GC under cgroup pressure so the process self-throttles before the kernel SIGKILLs it. To override, set GOMEMLIMIT explicitly (e.g. GOMEMLIMIT=850MiB). See issue #836."
},
"runtime": {
"maxMemoryMB": 0,
"_comment_runtime_maxMemoryMB": "Go soft memory limit (GOMEMLIMIT) in MiB applied via runtime/debug.SetMemoryLimit at startup. Precedence: GOMEMLIMIT env var > runtime.maxMemoryMB > packetStore.maxMemoryMB-derived (server only). 0 (default) preserves existing behavior. Set on memory-constrained deployments (2 GB Pi, 4 GB VMs) to trigger earlier GC and avoid container OOM-kill. Floor recommendation: ≥1.5× working set; setting below the working set causes a GC death-spiral. Applies to BOTH cmd/server and cmd/ingestor. See #1010."
},
"resolvedPath": {
"backfillHours": 24,
"_comment": "How far back (hours) the async backfill scans for observations with NULL resolved_path. Default: 24. Set higher to backfill older data, lower to speed up startup."
},
"ingestBufferSize": 50000,
"_comment_ingestBufferSize": "Number of MQTT messages held in memory while the single SQLite writer is blocked by a startup migration/prune (#1608). Drained once the write path is ready; bounded memory (small closure per item). 0 / omit / negative => default 50000 (applied by IngestBufferSizeOrDefault before NewIngestBuffer). A positive value below the default is honored as-is; sub-1 values reaching NewIngestBuffer directly clamp to 1 with a WARN log.",
"neighborEdgeCountHalfLifeDays": 0,
"_comment_neighborEdgeCountHalfLifeDays": "Ingestor only (#544). OPT-IN and IRREVERSIBLE. 0 / omit / negative = disabled (the default): neighbor_edges.count is a lifetime total that only grows. N > 0 = half-life in days: once per whole day every count is multiplied by 0.5^(1/N) and rounded, never below 3, so old credit (for example bridge TX copies counted before #540) halves every N days and an edge credited r times a day settles near r * 1.44 * N (7 matches the affinity score's half-life). Once enabled, the decayed lifetime counts are gone: setting it back to 0 stops further decay and resets the decay clock, but nothing restores the old counts. Decay changes hop disambiguation: affinity then follows recent traffic, so an edge with large old credit can lose a hop to one with a recent burst. Measure on a copy of your database first with scripts/neighbor-edge-decay-replay.sh. Edges and last_seen never change (retention still decides which edges exist). The stored counts also weight bridge/coverage scores, estimated positions and the GPS sanity check; the neighbour list and neighbour graph are built from packets and are not affected. The clock is stored in the database: missed days are applied after downtime, the first decay is one day after the feature is first enabled, and a clock more than a day in the future is reset. See docs/deployment.md.",
"neighborGraph": {
"maxAgeDays": 5,
"maxEdgeKm": 500,
"cacheRecomputeIntervalSeconds": 300,
"_comment": "maxAgeDays: neighbor edges older than this many days are pruned on startup and daily. Default 5. maxEdgeKm: geo-implausibility filter — when both endpoints have GPS, edges with haversine distance > maxEdgeKm are rejected at build time to prevent disambiguator self-reinforcement on wide-geo MQTT deployments. Default 500 km (well above any plausible terrestrial LoRa hop). 0 ⇒ use default; set negative to disable the filter. Rejected count surfaces in /api/analytics/neighbor-graph stats. Issue #1228. cacheRecomputeIntervalSeconds: how often the background recomputer refreshes the cached default-shape /api/analytics/neighbor-graph responses (#1481 P0-1). Default 300 (5 min). The graph itself is rebuilt at most once per 5 minutes, so a lower value refreshes the cached responses more often without extra graph-build CPU; a higher value makes the graph older: at most roughly one TTL plus one interval (a non-divisor interval rebuilds every ceil(TTL/interval) ticks, e.g. 90 s gives 360 s). Requests keep the published graph until the next build finishes. Issue #1483, #545."
},
"estimatedPositions": {
"enabled": true,
"_comment": "Operator policy for neighbor-derived position estimates. Omit this section or enabled to preserve the default (true). Set false to disable estimates in node details, packet/Ping Scores paths, maps, and estimate-dependent analytics. Reported GPS, ordinary neighbor graphs, and independent IATA/name-based fallbacks are unchanged. Requires a Go server restart and browser refresh; not reloaded by SIGHUP."
},
"dagi": {
"enabled": true,
"_comment": "#740: the DAGI filters ?kommune=, ?landsdel=, ?dkregion= and ?postnr= (Klimadatastyrelsen's administrative boundaries, embedded in the server) on /api/nodes, /api/packets and every endpoint that takes area, plus GET /api/config/dagi and /api/config/dagi/polygons. Omit this section or enabled to keep the default (true); only the exact key dagi.enabled is read. false turns the filters and both endpoints off and skips the in-memory index (about 7 MB). Requires a server restart."
},
"observersCache": {
"ttlSeconds": 30,
"_comment": "TTL for the default-shape /api/observers response cache (#1481 P0-3). Default 30s. Lower = fresher data, more SQL pressure on the 1.9M-row observations table. TTL-boundary refills are collapsed via singleflight so concurrent requests cause exactly one SQL fill. Issue #1483."
},
"knownChannelsUrl": "",
"knownChannelsRefreshMs": 86400000,
"_comment_knownChannels": "Issue #1323. OPT-IN community-maintained hashtag-channels catalogue. Empty string (default) = DISABLED: no background HTTP fetch is started and GET /api/known-channels returns an empty snapshot. To enable, set knownChannelsUrl to a pinned-SHA URL such as \"https://raw.githubusercontent.com/marcelverdult/meshcore-channels/072bc25b6fc983aa2aa7e9d399a97a5f4899ea71/channels-by-country.json\". The URL should point at the channels-by-country.json shape: {generated_at, license, countries:{cc:[{channel,description,key?}]}}. Always pin to a specific commit SHA (not the moving 'main' branch) so a hostile or compromised future upstream commit cannot be silently fetched by your deployment; periodically bump the pin after reviewing upstream diffs. Fetched in the background every knownChannelsRefreshMs (default 86400000 = 24h). Stored in-memory only — no DB, no disk cache. Surfaced over GET /api/known-channels?region=XX. Cache is fail-soft: a failed refresh keeps the last-known snapshot in place. No credentials are sent.",
"batteryThresholds": {
"lowMv": 3300,
"criticalMv": 3000,
"_comment": "Voltage cutoffs (millivolts) for the per-node battery trend chart on /node-analytics. Latest sample below lowMv shows the node as ⚠️ Low; below criticalMv shows 🪫 Critical. Both default to 3300 / 3000 if omitted. Source data: observer_metrics.battery_mv populated from observer status messages; only nodes that are themselves observers (matching pubkey ↔ observer id) yield a series. Issue #663."
},
"dutyCycleWarnPct": 10,
"_comment_dutyCycleWarnPct": "TX airtime share (percent) over the last hour at which RF Health and the observer list flag an observer. Default 10, the EU 868 MHz g3 sub-band limit; raise it (e.g. 50) elsewhere. Repeater firmware defaults to a 50% budget (airtime_factor 1.0), so the device does not enforce this itself. Issue #479.",
"_comment_mqttSources": "Each source connects to an MQTT broker. Supported schemes: mqtt:// (plain TCP), mqtts:// (TLS), ws:// (WebSocket), wss:// (WebSocket TLS). topics: what to subscribe to. iataFilter: only ingest packets from these regions (optional). region: default IATA region for this source — used when packet/topic doesn't specify one (optional, priority: payload > topic > this field). clientId: MQTT client ID, used verbatim (optional; must be unique among the broker's concurrent clients, and at most 23 characters of [0-9A-Za-z] for strict MQTT 3.1 brokers). When omitted, each ingestor start generates corescope-<name>-<8 random hex>, so copies of this file never share an ID — do not add a fixed clientId here.",
"compression": {
"gzip": false,
"websocket": false,
"level": 6,
"minSizeBytes": 1024,
"contentTypes": [
"application/json",
"application/javascript",
"application/xml",
"text/html",
"text/css",
"text/plain",
"image/svg+xml"
]
},
"_comment_compression": "Opt-in HTTP gzip middleware + WebSocket permessage-deflate. Both default to false — enable ONLY when your upstream reverse proxy is NOT already compressing. gzip: enables the gzipMiddleware wrapper around the HTTP handler. websocket: sets gorilla websocket Upgrader.EnableCompression. level: gzip compression level 1..9 (1=BestSpeed, 9=BestCompression, default 6). minSizeBytes: advisory minimum response size below which compression would not pay off. contentTypes: MIME allow-list — only responses with these Content-Type values are compressed. Already-compressed types (image/*, video/*, audio/*, application/zip, application/x-gzip, application/pdf, application/octet-stream) are always skipped, as are responses whose handler already set Content-Encoding. Omit contentTypes to use the built-in default allow-list.",
"clientRegions": { "enabled": false },
"_comment_clientRegions": "Opt-in declared-region reports (#126): a mobile companion asks a repeater in direct range which regions it lets flood and relays the answer on meshcore/client/<pubkey>/regions; each answer is kept as a report in client_declared_regions with its collector, reported time, ingest time and the repeater's own clock. Default OFF and independent of clientRxCoverage. SINGLE FLAG, BOTH PROCESSES: it gates the ingest write path and GET /api/nodes/{pubkey}/declared-regions (404 when off), which serves reports without collector keys or positions. The clientRxCoverage.sources allowlist and observerBlacklist apply to this topic too. TRUST: requires a broker ACL binding meshcore/client/{pubkey}/regions to that publisher; target and regions are the collector's claim, never authoritative. Retention: retention.clientRegionsDays. Erasure: admin delete-client-rx also deletes the reports a key collected. See docs/client-regions.md.",
"clientRxCoverage": { "enabled": false },
"moments": {
"enabled": false,
"backOnlineHours": 24,
"recordWindowHours": 24,
"recordMinKm": 5,
"busyWindowMinutes": 10,
"busyMinRelays": 20,
"maxPerMinute": 6,
"historySize": 50,
"display": {
"enabled": true,
"visibleCards": 3,
"dwellSeconds": 8,
"showNewNode": true,
"showBackOnline": true,
"showRecordLink": true,
"showBusiest": true
}
},
"_comment_moments": "Live \"Moments\" (#881): the server detects a few noteworthy events and broadcasts them on the WebSocket as {\"type\":\"moment\"}; GET /api/moments lists the newest. Default OFF: no detector runs, nothing is broadcast and /api/moments returns an empty list. Kinds: new_node (a repeater, room or sensor key first seen in retained history), back_online (a repeater heard again after at least backOnlineHours of silence; 24 = 2x the firmware's 12 h flood-advert default), record_link (a new longest confident direct neighbor link inside the rolling recordWindowHours, at least recordMinKm and at most neighborGraph.maxEdgeKm), busiest_repeater (most distinct non-advert relays in the last busyWindowMinutes, at least busyMinRelays). Detection runs on existing timers only (node delta every 15 s, neighbor-graph reload every 60 s, the relay recompute), never per packet. maxPerMinute is the global rate (burst 3) on top of fixed per-kind caps; historySize is how many moments /api/moments keeps (in memory, lost on restart). display (#969, optional) is the default of each viewer's Customize -> Display -> Live Moments settings, the same keys: enabled (Live starts with Moments), visibleCards 1-5, dwellSeconds 3-30, showNewNode/showBackOnline/showRecordLink/showBusiest; a viewer's own value and a ?moments= link still win, set only the keys you want to change, out-of-range numbers are clamped and wrong kinds ignored with a log line. Companions never appear; nodeBlacklist, observerBlacklist, hiddenNamePrefixes and the node-list geo_filter apply; positions are advertised GPS only. Ranges: backOnlineHours 1-720, recordWindowHours 1-168, recordMinKm 0.1-1000, busyWindowMinutes 1-1440, busyMinRelays 1-1000000, maxPerMinute 1-60, historySize 1-500; out-of-range values are clamped with a log line, 0 or missing takes the default.",
"kiosk": {
"tour": [],
"everySeconds": 60,
"theme": "dark",
"tiles": ["rate", "active", "records"],
"remountHours": 6,
"scale": "auto",
"safeInsetVmin": 3
},
"_comment_kiosk": "Operator preset for Live kiosk screens (#968), served on /api/config/client. It fills what a #/live?kiosk=1 link does not say: the link's own tour=, every= and theme= win, then this block, then the built-in default. It never turns kiosk on; only kiosk=1 in the link does. tour: area keys from `areas`, at most 12 (a link with an empty tour= is a static view). everySeconds: seconds per tour step, whole number 15-3600 (default 60). theme: dark, light or auto (default dark; auto keeps the screen's own theme). tiles: the big-number tiles shown, any of rate, active, records (default all; without active the screen makes no network-status or analytics/areas requests). remountHours: in-place remount interval for long-running screens, 1-24 (default 6). scale: the kiosk text and tile size, \"auto\" (default: by the screen's size) or one of 1, 1.25, 1.5, 2. safeInsetVmin: the margin kept clear at the screen edges for TV overscan, in % of the short side, 0-10 (default 3). A viewer can set both per browser in Customize > Display > Live kiosk, which wins in that browser. Keys are case-sensitive; a value out of range logs one warning and takes its default. Omit the block for the built-in defaults.",
"_comment_clientRxCoverage": "Opt-in mobile client-RX coverage (corescope-rx companions publishing GPS-tagged receptions to meshcore/client/<pubkey>/packets). Default OFF: when disabled the ingestor writes no client_receptions, the /api/rx-coverage|rx-leaderboard|nodes/{pubkey}/rx-coverage endpoints 404, and the UI hides the Coverage dashboard + Reach overlay. Set enabled=true to turn it on. SINGLE FLAG, BOTH PROCESSES: the ingestor and server each parse this same config.json, so this one clientRxCoverage.enabled entry gates both the ingest write path and the read endpoints — set it once, not per-process. TRUST: the feature requires an ACL-capable broker binding meshcore/client/{pubkey}/packets to that publisher; without ACLs the companion GPS is spoofable (see docs/client-rx-coverage.md). Retention: see retention.clientRxDays. Companion app + setup: https://github.com/efiten/corescope-rx.",
"_comment_clientRxCoverage_sources": "OPTIONAL allow-list of mqttSources[].name entries that may contribute client RX coverage. Omitted or empty (the default) = every source is accepted, unchanged behaviour. Set it when this instance reads MORE THAN ONE broker and they do not all bind meshcore/client/<pubkey>/packets to the publisher holding that key: coverage is only as trustworthy as the weakest broker, so on a mixed deployment (one broker with per-device identity + one legacy username/password broker where many accounts may write meshcore/#) any account on the weak broker could otherwise inject coverage under any companion pubkey with any GPS position. Listing the trusted source names keeps the client namespace on those sources — a client message from any other source is dropped before any write (no client_receptions, no client_observers, no observer row), logged per source with throttling and a line cap. Matching is on the source name, trimmed and case-insensitive; a source with no name can never be listed. A name matching no configured source is logged once at startup. Example: \"clientRxCoverage\": { \"enabled\": true, \"sources\": [\"device-auth\"] }. See docs/client-rx-coverage.md.",
"_comment_channelKeys": "Hex keys for decrypting channel messages. Key name = channel display name. public channel key is well-known.",
"_comment_hashChannels": "Channel names whose keys are derived via SHA256. Key = SHA256(name)[:16]. Listed here so the ingestor can auto-derive keys.",
"hashRegions": [
"#belgium",
"#eu"
],
"_comment_hashRegions": "Region names for scope matching on transport-route packets. Key = SHA256('#name')[:16]. Add any region names used by nodes in your network.",
"_comment_hashRegionsPath": "OPTIONAL path to an external JSON file holding region names as a plain array, e.g. [\"dk\", \"dk-aarhus\"] (issue #360). Omitted or empty (the default) = inline hashRegions only, exactly as before; there is no auto-discovered default file. When set, the effective set is the UNION of the inline hashRegions list above and the file, normalized the same way ('#' prefix added, whitespace trimmed, blank entries dropped) and deduplicated after normalization. Set it when the region list is large and machine-maintained: a real deployment carries ~1100 names, which is a third of config.json once hashChannels and areas are counted, and moving it out makes the rest reviewable. SINGLE KEY, BOTH PROCESSES: the ingestor (which derives one HMAC key per region) and the server (which reports unknown scopes in Observer Neighbors and unusedRegions in /api/scope-stats) read it through the same loader, so they cannot disagree about which scopes are configured. A RELATIVE path resolves against the directory holding THIS config.json, never the process working directory, so both processes find the same file. Env override: HASH_REGIONS_PATH, which wins over this key. If the path is set but the file is missing or not a JSON array of strings, the error is logged and the inline hashRegions list is used; on the ingestor's SIGHUP reload the previous keys are kept instead. A SIGHUP re-reads the file, so adding a region needs no restart. Names are case-sensitive: \"#dk\" and \"#DK\" are different scopes with different keys.",
"_comment_defaultRegion": "IATA code shown by default in region filters.",
"_comment_mapDefaults": "Initial map center [lat, lon] and zoom level.",
"_comment_regions": "IATA code → display name mapping for the region filter UI. Each key is a 3-letter IATA code that an observer is tagged with (resolved priority: MQTT payload `region` field > topic-derived region > mqttSources.region). Observers without an IATA tag will not appear under any region filter — only under 'All Regions'. The region filter dropdown shows one entry per code listed here PLUS any extra IATA codes the server discovers from observers at runtime (so you can omit codes here and they will still be selectable, just labelled with the bare IATA code instead of a friendly name). Selecting 'All Regions' (or no region) returns results from every observer including those with no IATA tag; selecting one or more codes restricts results to packets observed by observers tagged with those codes. The reserved value 'All' (case-insensitive) is treated as 'no filter' on the server, so the URL ?region=All behaves identically to omitting the param. Issue #770.",
"analytics": {
"defaultIntervalSeconds": 300,
"pauseWhenIdle": false,
"_comment_pauseWhenIdle": "Issue #492. Opt-in, default false (every analytics snapshot is recomputed on its interval whether read or not). When true, a scheduled recompute is skipped if nothing read that endpoint's default snapshot since the previous recompute, so an instance whose analytics pages are rarely open stops recomputing and allocating for them. Freshness trade-off: the first read after a pause is served the existing snapshot at once — it can be much older than the interval — and wakes one refresh; reads after that see fresh data. While pauseWhenIdle is on, responses served from a snapshot carry X-Analytics-Snapshot (current|stale) and X-Analytics-Snapshot-Age-Seconds, so a stale snapshot is never presented as freshly computed. Startup load, warm-up gates and failed recomputes are unaffected: a recomputer only pauses after a successful pass that started once the startup load finished.",
"recomputeIntervalSeconds": {
"topology": 300,
"rf": 300,
"distance": 300,
"channels": 300,
"hashCollisions": 300,
"hashSizes": 300,
"roles": 300,
"observersClockSkew": 300,
"nodesClockSkew": 300,
"advertIntervals": 300,
"dagiAreas": 300
},
"loraPreset": {
"freq": 869600000,
"bw": 62.5,
"sf": 8,
"cr": 5,
"_comment_": "Issue #1768. LoRa PHY preset assumed by the Relay Airtime Share metric to compute true Time-on-Air. Share numbers are only meaningful relative to one preset, so operators MUST set this to match their mesh — freq is informational (surfaces in the chart caption) and does not affect ToA; bw is bandwidth in kHz (e.g. 62.5, 125, 250); sf is spreading factor (6..12); cr is the denominator of the 4/N coding rate (5 ⇒ 4/5 … 8 ⇒ 4/8). Defaults reproduce the typical EU MeshCore deployment 869.6 MHz / BW 62.5 kHz / SF 8 / CR 4/5. CRC=1, IH=0, DE (T_sym ≥ 16 ms), and preamble (32 for SF≤8, 16 otherwise, per firmware preambleLengthForSF) are firmware-fixed and intentionally not exposed as config."
}
},
"_comment_analytics": "Issue #1240 + #1256 + #1265. Each analytics endpoint (topology, rf, distance, channels, hashCollisions, hashSizes, roles, observersClockSkew, nodesClockSkew, advertIntervals) is recomputed in the background on the configured interval and served from an atomic-pointer cache. Reads never block on compute. Default 300s (5 min) per endpoint reflects the operator principle: serving slightly stale data quickly beats real-time data slowly. Lower values = fresher data at higher CPU cost. Only the default query (no region/window) is precomputed; region- and window-filtered requests fall back to the legacy on-request compute + 60s TTL cache.",
"customizer": {
"disabledTabs": [],
"_comment_disabledTabs": "Issue #1508. List of customizer-modal tab ids to hide from end users. Useful when operators want to expose only daily-use viewer controls and keep one-shot admin chrome out of the way. Recognized ids: branding, theme, nodes, home, display, geofilter, export. Example: [\"branding\", \"geofilter\", \"export\"] hides the admin tabs and leaves theme/colors/home/display visible. Default [] keeps the legacy behavior (all tabs visible). Operators edit this in config.json directly — there is no in-app UI for this list (by design).",
"_comment_oneByteHopsDefault": "#912 M2. Optional key customizer.oneByteHopsDefault, left out here on purpose: the 1-byte path hop mode (Display tab, Path Display) for a visitor who has not picked one. \"show\" draws 1-byte hops without markings; \"mark\" flags them: the map route marks only the uncertain inferred 1-byte hops, while the Live map dashes every segment that touches any 1-byte hop; \"hide\" leaves 1-byte hops out of the route view, the Live map and feed, and the node path panel (nothing stored changes). A configured value applies on every page, Live included. Without the key nothing changes: the Live map shows every hop unmarked and the other pages use mark. A visitor's own pick is stored in their browser and wins; one who never picked follows this value, also when you change it later. Any other value logs one warning and uses mark. The customizer labels the configured value '(server default)'. Example: \"oneByteHopsDefault\": \"hide\"."
},
"privacy": {
"enabled": false,
"_comment": "Opt-in privacy-notice page at #/privacy. Default off; set enabled=true to publish the page and the nav links that point at it. This flag is the ENTIRE privacy configuration -- the notice itself is a FIXED document in public/privacy.js and is deliberately not operator-editable, so the published wording cannot drift from the notice that was reviewed and signed off. Nothing you can put in config.json adds, removes or rewords a single line of it; changing the notice means editing that file. Older configs may still contain the removed text fields (controllerName, purposesText, retentionText and the rest) -- they are ignored, not rejected. None of this is legal advice, and publishing the page does not by itself make a deployment compliant."
}
}