1	#!/bin/bash
2	# ==============================================================================================
3	# ========================== HOSTN CONFIGURATION — (hostname) ==================================
4	# ==============================================================================================
5	# HOSTN-specific variables — credentials, container names, share paths, failover lists.
6	# Sourced after master.conf — values here extend shared profile arrays and add HOSTN-specific
7	# identity, credentials, and container configuration.
8	#
9	# Sparse checkout (git) ensures other hosts never receive this file.
10	#
11	# DO NOT put shared config here — thresholds, toggles, profiles belong in master.conf.
12	# DO NOT put other hosts' variables here — they belong in their own host*.conf files.
13	#
14	# ── HOW TO USE THIS TEMPLATE ──────────────────────────────────────────────────────────────────
15	# This file was generated by the Varaverk first-run wizard.
16	# Fill in the sections that apply to your setup — leave unused sections empty.
17	# All scripts self-guard against empty values — safe to leave sections blank until needed.
18	#
19	# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
20	#
21	#   ── IDENTITY & CONNECTIVITY ────────────────────────────────────────────────────────────────
22	#   IDENTITY                hostname, SSH key
23	#   EMBY                    container name, URL, API key
24	#   NOTIFICATIONS           Discord webhook
25	#   PARTNERSHIP             auth containers, backup paths
26	#
27	#   ── RSYNC ──────────────────────────────────────────────────────────────────────────────────
28	#   DAILY SYNC SHARES       media shares this host owns and pushes
29	#   WEEKLY SYNC SHARES      appdata shares synced weekly
30	#   CRITICAL SYNC SHARES    appdata shares synced every 30 minutes
31	#   HOSTN RSYNC PROFILE     host-specific appdata sync profile
32	#
33	#   ── DOCKER ─────────────────────────────────────────────────────────────────────────────────
34	#   DOCKER DAILY RESTART    containers restarted daily
35	#   DOCKER WEEKLY RESTART   containers restarted weekly
36	#   DOCKER WATCHDOG         memory limits, health URLs, required containers
37	#   DOCKER NETWORK CONNECT  networks and containers for array start
38	#
39	#   ── FALLBACK ───────────────────────────────────────────────────────────────────────────────
40	#   DDNS                    DDNS containers managed by this host
41	#   INTERNET LOSS           containers stopped when internet is lost
42	#   FALLBACK TIERS          what this host runs for the remote per tier
43	#   TIER DELAYS             delays before each tier activates
44	#   RSYNC WRITEBACK         appdata synced back on handback
45	#
46	#   ── MEDIA ──────────────────────────────────────────────────────────────────────────────────
47	#   MEDIA PERMISSIONS       share list for permissions script
48	#   MEDIA CLEANER           folder lists for media_cleaner.sh
49	#
50	#   ── MONITORS ───────────────────────────────────────────────────────────────────────────────
51	#   CERTIFICATE MONITOR     domains checked for SSL expiry
52	#   SMART HEALTH            drives to skip in SMART monitoring
53	#   ZFS REPORT              pools to exclude from ZFS health report
54	#
55	#   ── TRANSCODES ─────────────────────────────────────────────────────────────────────────────
56	#   TRANSCODES              ramdisk size, thresholds, SSD path, server array
57	#
58	#   ── ARR STACK ──────────────────────────────────────────────────────────────────────────────
59	#   DOWNLOADERS             slskd, SABnzbd, qBittorrent credentials and URLs
60	#   LIDARR / SONARR / RADARR  URL, API key, path map
61	#   ARR RECOVERY            per-arr recovery toggles
62	#
63	#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
64	#   SYSTEM WATCHDOG         per-host check toggles and NIC configuration
65	#
66	#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
67	#   RESOURCE MANAGER        containers paused/stopped under memory pressure
68	#
69	# ==============================================================================================
70
71	# ==============================================================================================
72	# ── STORAGE MODE ──────────────────────────────────────────────────────────────────────────────
73	# ==============================================================================================
74
75	# ━━━ Storage mode ━━━
76	# Controls where Varaverk stores scripts, conf, and state files.
77	# true  = internal NVMe/SSD — /boot/config/plugins/varaverk  (write-safe, git-direct)
78	# false = USB flash boot    — /mnt/user/appdata/Varaverk      (preserves flash lifetime)
79	# Auto-detected from boot device transport on first setup.
80	# To change: Settings → Storage → Migrate.
81	    HOSTN_STORAGE_MODE_INTERNAL=true
82
83	# ==============================================================================================
84	# ── IDENTITY & CONNECTIVITY ───────────────────────────────────────────────────────────────────
85	# ==============================================================================================
86
87	# ━━━ Identity ━━━
88	# HOSTN hostname lives in master.conf (not a credential — safe for all servers).
89	# SSH key used for all server-to-server operations — rsync, failover, conf sync.
90	# Convention: /root/.ssh/<hostname-lowercase-no-unraid-prefix>_rsync_automation
91	# Must be in /root/.ssh/ and authorised in the partner's /root/.ssh/authorized_keys.
92	# Run Partnership/ssh_setup.sh to generate the key and copy it to the partner.
93	    HOSTN_SSH_KEY=""    # e.g. /root/.ssh/myserver_rsync_automation
94	    HOSTN_OWNER=""      # short identifier for this server (e.g. myserver)
95	    HOSTN_OWNER_EMAIL=""
96
97	# ━━━ Unraid API ━━━
98	# Used by the Varaverk plugin to query this server's Unraid GraphQL API.
99	# Generate in Unraid: Settings → Management Access → API Keys → + New Key
100	    HOSTN_UNRAID_API_KEY=""
101
102	# ━━━ Emby ━━━
103	    HOSTN_EMBY_CONTAINER="Emby"
104	    HOSTN_EMBY_URL="http://localhost:8096"
105	    HOSTN_EMBY_API_KEY=""   # Emby Dashboard → API Keys → + New Key
106
107	# ━━━ Jellyfin ━━━
108	    HOSTN_JELLYFIN_CONTAINER="Jellyfin"
109	    HOSTN_JELLYFIN_URL="http://localhost:8095"
110	    HOSTN_JELLYFIN_API_KEY=""   # Jellyfin Dashboard → Administration → API Keys
111
112	# ━━━ Gitea ━━━
113	# Personal access token for gitea_ssh_setup.sh.
114	# Create in Gitea: Settings → Applications → Generate Token → scope: write:user
115	    HOSTN_GITEA_API_TOKEN=""
116
117	# ━━━ Notifications ━━━
118	# Discord webhook — leave blank to disable.
119	    HOSTN_DISCORD_WEBHOOK=""
120
121	# ━━━ Partnership ━━━
122
123	# Auth containers reconfigured on onboard/offboard.
124	# Format: "ContainerName|WebUIPort"
125	    HOSTN_PARTNERSHIP_AUTH_WEBUIS=(
126	        # "NginxProxyManager|81"
127	        # "Authelia|9091"
128	    )
129
130	# XML templates pushed to mirror during onboard — auth stack.
131	# Dependencies (databases) must come before apps that depend on them.
132	    HOSTN_PARTNERSHIP_AUTH_STACK=(
133	        # "my-Authelia.xml"
134	        # "my-NginxProxyManager.xml"
135	    )
136
137	# XML templates pushed to mirror during onboard — arr stack.
138	    HOSTN_PARTNERSHIP_ARR_STACK=(
139	        # "my-Sonarr.xml"
140	        # "my-Radarr.xml"
141	    )
142
143	# Paths the partner should collect during the grace window after offboard.
144	    HOSTN_PARTNERSHIP_MIRROR_BACKUPS=(
145	        # "/mnt/user/appdata-Fallback/Partner-Emby"
146	    )
147
148	# Containers parked on this server when partnership is active.
149	    HOSTN_PARTNERSHIP_OWN_CONTAINERS=(
150	        # "Emby"
151	    )
152
153	# Emby admin provisioning — owner controls whether Emby is shared.
154	    HOSTN_PARTNERSHIP_PROVISION_EMBY_ADMIN=false
155	    HOSTN_PARTNERSHIP_EMBY_PORT=8096
156	    HOSTN_PARTNERSHIP_EMBY_ADMIN_USER=""
157	    HOSTN_PARTNERSHIP_EMBY_ADMIN_PASS=""
158
159	# ==============================================================================================
160	# ── RSYNC ─────────────────────────────────────────────────────────────────────────────────────
161	# ==============================================================================================
162
163	# ━━━ Daily Sync Shares ━━━
164	# Media shares this host pushes to all other nodes every night.
165	# Uses DEFAULT_RSYNC_OPTS from master.conf — no profile needed.
166	    HOSTN_DAILY_SYNC_SHARES=(
167	        # /mnt/user/Movies
168	        # /mnt/user/Tv_Shows
169	        # /mnt/user/Music
170	    )
171
172	# ━━━ Weekly Sync Shares ━━━
173	# Appdata shares synced during the weekly maintenance window.
174	# Profiles (emby, critical-data) drive container stops — define in master.conf.
175	    HOSTN_WEEKLY_SYNC_SHARES=(
176	        # "/mnt/user/Media_Server/Emby"              # emby profile
177	        # "/mnt/user/appdata-Fallback/Critical-Data" # critical-data profile
178	    )
179
180	# ━━━ Intermediate Sync Shares ━━━
181	# Shares synced every 4 hours. Leave empty to skip mid-day rsync.
182	    HOSTN_INTERMEDIATE_SYNC_SHARES=(
183	        # Add shares here to enable mid-day rsync
184	    )
185
186	# ━━━ Critical Sync Shares ━━━
187	# Appdata shares synced every 30 minutes.
188	# Format: "/path/to/share" or "/path/to/share|profile-name"
189	    HOSTN_CRITICAL_SYNC_SHARES=(
190	        # "/mnt/user/appdata-Fallback/Critical-Data|critical-fallback"
191	        # "/mnt/user/Media_Server/Emby|emby-fallback"
192	    )
193
194	# ━━━ Personal Shares ━━━
195	# Private encrypted shares synced for offsite backup, independent of media shares.
196	    HOSTN_PERSONAL_SHARES=(
197	        # /mnt/user/Personal     # e.g. ZFS-encrypted dataset
198	    )
199
200	# ━━━ Backup Verify ━━━
201	# Leave empty to use HOSTN_DAILY_SYNC_SHARES automatically.
202	    HOSTN_BACKUP_VERIFY_SHARES=(
203	        # leave empty to use HOSTN_DAILY_SYNC_SHARES automatically
204	    )
205
206	# ━━━ HOSTN Rsync Profile — hostn-appdata ━━━
207	# Host-specific appdata sync profile.
208	    PROFILE_RSYNC_OPTS[hostn-appdata]="-av --info=progress2 --bwlimit=${PROFILE_BW_LIMIT[hostn-appdata]:-8000}"
209	    PROFILE_BW_LIMIT[hostn-appdata]=8000
210	    PROFILE_RETRY_COUNT[hostn-appdata]=3
211	    PROFILE_SLEEP[hostn-appdata]=300
212	    PROFILE_CRITICAL_CONTAINER_NAMES[hostn-appdata]=""
213	    PROFILE_DELAYED_CONTAINERS[hostn-appdata]=""
214	    PROFILE_CONTAINER_DELAY[hostn-appdata]=5
215	    PROFILE_EXCLUDE_DIRS[hostn-appdata]="logs *.tmp"
216
217	# ==============================================================================================
218	# ── DOCKER ────────────────────────────────────────────────────────────────────────────────────
219	# ==============================================================================================
220
221	# ━━━ Docker Daily Restart ━━━
222	    HOSTN_DAILY_RESTART_CONTAINERS=(
223	        # "NginxProxyManager"
224	        # "Authelia"
225	    )
226
227	# ━━━ Docker Weekly Restart ━━━
228	    HOSTN_WEEKLY_RESTART_CONTAINERS=(
229	        # "NextCloud"
230	        # "AdGuard-Home"
231	    )
232
233	# ━━━ Docker Watchdog ━━━
234
235	# Memory hard limits in MB — immediate restart if exceeded.
236	# 20GB=20480  16GB=16384  8GB=8192  4GB=4096  2GB=2048  1GB=1024
237	    declare -A HOSTN_WATCHDOG_CONTAINERS=(
238	        # ["Emby"]=18432
239	    )
240
241	# HTTP health check URLs — checked every cycle.
242	    declare -A HOSTN_WATCHDOG_CONTAINER_URLS=(
243	        # ["Emby"]="http://localhost:8096"
244	    )
245
246	# Required containers — must always be running.
247	    HOSTN_WATCHDOG_REQUIRED_CONTAINERS=(
248	        # "NginxProxyManager"
249	        # "Authelia"
250	    )
251
252	# Containers to skip in Tier 2 global scan.
253	    HOSTN_WATCHDOG_SCAN_IGNORE=(
254	        # "my-occasional-container"
255	    )
256
257	# Dependency ordering — skip restarting a container if its dependency is also down.
258	    declare -A HOSTN_WATCHDOG_DEPENDENCIES=(
259	        # ["Authelia"]="Mariadb Redis-Authelia"
260	    )
261
262	# Per-container appdata growth suppress ceilings in MB.
263	    declare -A HOSTN_WATCHDOG_APPDATA_SIZES=(
264	        # ["Tdarr"]="25600"
265	    )
266
267	# ━━━ Network Watchdog ━━━
268	    HOSTN_NETWORK_WATCHDOG_DDNS_DOMAIN=""       # e.g. myserver.com
269	    HOSTN_NETWORK_WATCHDOG_DDNS_CONTAINER=""    # e.g. MyServer.com
270	    HOSTN_NETWORK_WATCHDOG_NPM_URL=""           # e.g. https://myserver.com
271
272	# ━━━ Docker Network Connect ━━━
273	    HOSTN_NETWORK_CONNECT_CONTAINERS=(
274	        # "memcached"
275	    )
276
277	    HOSTN_NETWORK_CONNECT_NETWORKS=(
278	        # "high-availability"
279	    )
280
281	# ==============================================================================================
282	# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────
283	# ==============================================================================================
284
285	# ━━━ DDNS ━━━
286	# DDNS containers this host manages.
287	    HOSTN_DDNS_CONTAINERS=(
288	        # "MyServer.com"
289	    )
290
291	# ━━━ Internet Loss ━━━
292	# Containers stopped immediately when internet is lost.
293	    FALLBACK_HOSTN_STOP_ON_NO_NET=(
294	        # "MyServer.com"
295	    )
296
297	# ━━━ Fallback Tiers — HOSTN Runs for Partner ━━━
298	# Containers this host starts when the partner goes down.
299	# Replace REMOTE_ID below with the actual remote host ID (HOST1, HOST2, etc.)
300	    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER1=(
301	        # "Partner-DDNS-Container"
302	    )
303
304	    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER2=(
305	        # "container-placeholder"
306	    )
307
308	    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER3=(
309	        # "container-placeholder"
310	    )
311
312	    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER4=(
313	        # "container-placeholder"
314	    )
315
316	# ━━━ Tier Delays — Partner's Containers on this Host ━━━
317	# How long the partner must be down before each tier activates here — in minutes.
318	# Replace REMOTE_ID with the actual remote host ID (HOST1, HOST2, etc.)
319	    REMOTE_ID_TIER2_DELAY=240           # 4 hours
320	    REMOTE_ID_TIER3_DELAY=720           # 12 hours
321	    REMOTE_ID_TIER4_DELAY=1440          # 24 hours
322
323	# ━━━ Rsync Writeback ━━━
324	    HOSTN_TIER1_WRITEBACK_DELAY=60      # skip Emby writeback if outage under 1hr
325
326	    FALLBACK_HOSTN_WRITEBACK_TIER1=(
327	        # "/mnt/user/Media_Server/Emby"
328	    )
329
330	    FALLBACK_HOSTN_WRITEBACK_TIER2=(
331	        # "/mnt/user/appdata-Fallback/Important-Data"
332	    )
333
334	    FALLBACK_HOSTN_WRITEBACK_TIER3=(
335	        # "location-placeholder"
336	    )
337
338	    FALLBACK_HOSTN_WRITEBACK_TIER4=(
339	        # "/mnt/user/appdata-Fallback/Arrs_Stack"
340	    )
341
342	# ==============================================================================================
343	# ── MEDIA ─────────────────────────────────────────────────────────────────────────────────────
344	# ==============================================================================================
345
346	# ━━━ Media Permissions ━━━
347	    HOSTN_MEDIA_PERMISSION_SHARES=(
348	        # /mnt/user/Movies
349	        # /mnt/user/Tv_Shows
350	        # /mnt/user/Music
351	        # /mnt/user/Downloads
352	    )
353
354	# ━━━ Media Cleaner ━━━
355	    HOSTN_ANIME_CLEAN_FOLDERS=(
356	        # /mnt/user/Anime_Movies
357	        # /mnt/user/Anime_Shows
358	    )
359
360	    HOSTN_MEDIA_CLEAN_FOLDERS=(
361	        # /mnt/user/Movies
362	        # /mnt/user/Tv_Shows
363	    )
364
365	# ==============================================================================================
366	# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────
367	# ==============================================================================================
368
369	# ━━━ Certificate Monitor ━━━
370	    HOSTN_CERT_MONITOR_DOMAINS=(
371	        # "myserver.com"
372	    )
373
374	# ━━━ SMART Health ━━━
375	    HOSTN_SMART_IGNORE_DRIVES=(
376	        "sda"   # boot USB — SMART not meaningful on flash drives
377	    )
378
379	# ━━━ ZFS Report ━━━
380	    HOSTN_ZFS_REPORT_IGNORE_POOLS=(
381	        # "disk5"
382	    )
383
384	# ==============================================================================================
385	# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────
386	# ==============================================================================================
387
388	    HOSTN_RAMDISK_SIZE="10G"
389	    HOSTN_RAMDISK_WARN_GB=8.5
390	    HOSTN_RAMDISK_LOW_GB=7
391	    HOSTN_TRANSCODE_SSD="/mnt/cache/Temp_Storage/Emby/Transcodes/"
392
393	    HOSTN_TRANSCODE_SERVERS=(
394	        "${HOSTN_EMBY_CONTAINER}|${HOSTN_EMBY_URL}|${HOSTN_EMBY_API_KEY}|emby"
395	    )
396
397	# ==============================================================================================
398	# ── ARR STACK ─────────────────────────────────────────────────────────────────────────────────
399	# ==============================================================================================
400
401	# ━━━ Downloaders ━━━
402	    HOSTN_SLSKD_URL="http://localhost:8980"
403	    HOSTN_SLSKD_API_KEY=""
404	    HOSTN_SLSKD_FAILED_IMPORTS_DIR=""
405
406	    HOSTN_SABNZBD_URL="http://localhost:8180"
407	    HOSTN_SABNZBD_API_KEY=""
408
409	    HOSTN_QBIT_URL="http://localhost:8080"
410	    HOSTN_QBIT_USERNAME="admin"
411	    HOSTN_QBIT_PASSWORD=""
412
413	# ━━━ Lidarr ━━━
414	    HOSTN_LIDARR_URL="http://localhost:8686"
415	    HOSTN_LIDARR_API_KEY=""
416	    HOSTN_LIDARR_MUSIC_ROOT="/mnt/user/Music"
417	    HOSTN_FANART_API_KEY=""
418	    HOSTN_LASTFM_API_KEY=""
419
420	    declare -A HOSTN_LIDARR_PATH_MAP=(
421	        # ["/music"]="/mnt/user/Music"
422	    )
423
424	# ━━━ Sonarr ━━━
425	    HOSTN_SONARR_URL="http://localhost:8989"
426	    HOSTN_SONARR_API_KEY=""
427	    HOSTN_SONARR_TV_ROOT="/mnt/user/Tv_Shows"
428
429	    declare -A HOSTN_SONARR_PATH_MAP=(
430	        # ["/tv"]="/mnt/user/Tv_Shows"
431	    )
432
433	# ━━━ Radarr ━━━
434	    HOSTN_RADARR_URL="http://localhost:7878"
435	    HOSTN_RADARR_API_KEY=""
436	    HOSTN_TMDB_API_KEY=""
437	    HOSTN_RADARR_MOVIE_ROOT="/mnt/user/Movies"
438
439	    declare -A HOSTN_RADARR_PATH_MAP=(
440	        # ["/movies"]="/mnt/user/Movies"
441	    )
442
443	# ━━━ Arr Recovery Toggles ━━━
444	    HOSTN_LIDARR_RECOVERY=false
445	    HOSTN_SONARR_RECOVERY=true
446	    HOSTN_RADARR_RECOVERY=true
447
448	# ==============================================================================================
449	# ── SYSTEM WATCHDOG ───────────────────────────────────────────────────────────────────────────
450	# ==============================================================================================
451
452	    HOSTN_SYS_WATCHDOG_CHECK_DOCKER=true
453	    HOSTN_SYS_WATCHDOG_CHECK_ROOTFS=true
454	    HOSTN_SYS_WATCHDOG_CHECK_KERNEL_OOPS=true
455	    HOSTN_SYS_WATCHDOG_CHECK_FD=true
456	    HOSTN_SYS_WATCHDOG_CHECK_BOOT=true
457	    HOSTN_SYS_WATCHDOG_CHECK_OOM=true
458	    HOSTN_SYS_WATCHDOG_CHECK_RAM=true
459	    HOSTN_SYS_WATCHDOG_CHECK_LOG=true
460	    HOSTN_SYS_WATCHDOG_CHECK_ARC=true
461	    HOSTN_SYS_WATCHDOG_CHECK_TEMP=true
462	    HOSTN_SYS_WATCHDOG_CHECK_LOAD=true
463	    HOSTN_SYS_WATCHDOG_CHECK_ZOMBIES=true
464	    HOSTN_SYS_WATCHDOG_CHECK_CONTAINERS=true
465	    HOSTN_SYS_WATCHDOG_CHECK_TMP=true
466	    HOSTN_SYS_WATCHDOG_CHECK_MDSTAT=true
467	    HOSTN_SYS_WATCHDOG_CHECK_NETWORK=true
468	    HOSTN_SYS_WATCHDOG_CHECK_SSHD=true
469	    HOSTN_SYS_WATCHDOG_CHECK_RUNAWAY=false
470
471	    HOSTN_SYS_WATCHDOG_NIC=""   # e.g. eth0 — for network monitoring
472
473	# ==============================================================================================
474	# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────
475	# ==============================================================================================
476
477	    HOSTN_RW_PAUSE_CONTAINERS=(
478	        # "Tdarr"
479	        # "LidaTube"
480	    )
481
482	    HOSTN_RW_STOP_CONTAINERS=(
483	        # "Tdarr"
484	    )
485

#!/bin/bash
# ==============================================================================================
# ========================== HOSTN CONFIGURATION — (hostname) ==================================
# ==============================================================================================
# HOSTN-specific variables — credentials, container names, share paths, failover lists.
# Sourced after master.conf — values here extend shared profile arrays and add HOSTN-specific
# identity, credentials, and container configuration.
#
# Sparse checkout (git) ensures other hosts never receive this file.
#
# DO NOT put shared config here — thresholds, toggles, profiles belong in master.conf.
# DO NOT put other hosts' variables here — they belong in their own host*.conf files.
#
# ── HOW TO USE THIS TEMPLATE ──────────────────────────────────────────────────────────────────
# This file was generated by the Varaverk first-run wizard.
# Fill in the sections that apply to your setup — leave unused sections empty.
# All scripts self-guard against empty values — safe to leave sections blank until needed.
#
# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
#
#   ── IDENTITY & CONNECTIVITY ────────────────────────────────────────────────────────────────
#   IDENTITY                hostname, SSH key
#   EMBY                    container name, URL, API key
#   NOTIFICATIONS           Discord webhook
#   PARTNERSHIP             auth containers, backup paths
#
#   ── RSYNC ──────────────────────────────────────────────────────────────────────────────────
#   DAILY SYNC SHARES       media shares this host owns and pushes
#   WEEKLY SYNC SHARES      appdata shares synced weekly
#   CRITICAL SYNC SHARES    appdata shares synced every 30 minutes
#   HOSTN RSYNC PROFILE     host-specific appdata sync profile
#
#   ── DOCKER ─────────────────────────────────────────────────────────────────────────────────
#   DOCKER DAILY RESTART    containers restarted daily
#   DOCKER WEEKLY RESTART   containers restarted weekly
#   DOCKER WATCHDOG         memory limits, health URLs, required containers
#   DOCKER NETWORK CONNECT  networks and containers for array start
#
#   ── FALLBACK ───────────────────────────────────────────────────────────────────────────────
#   DDNS                    DDNS containers managed by this host
#   INTERNET LOSS           containers stopped when internet is lost
#   FALLBACK TIERS          what this host runs for the remote per tier
#   TIER DELAYS             delays before each tier activates
#   RSYNC WRITEBACK         appdata synced back on handback
#
#   ── MEDIA ──────────────────────────────────────────────────────────────────────────────────
#   MEDIA PERMISSIONS       share list for permissions script
#   MEDIA CLEANER           folder lists for media_cleaner.sh
#
#   ── MONITORS ───────────────────────────────────────────────────────────────────────────────
#   CERTIFICATE MONITOR     domains checked for SSL expiry
#   SMART HEALTH            drives to skip in SMART monitoring
#   ZFS REPORT              pools to exclude from ZFS health report
#
#   ── TRANSCODES ─────────────────────────────────────────────────────────────────────────────
#   TRANSCODES              ramdisk size, thresholds, SSD path, server array
#
#   ── ARR STACK ──────────────────────────────────────────────────────────────────────────────
#   DOWNLOADERS             slskd, SABnzbd, qBittorrent credentials and URLs
#   LIDARR / SONARR / RADARR  URL, API key, path map
#   ARR RECOVERY            per-arr recovery toggles
#
#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG         per-host check toggles and NIC configuration
#
#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
#   RESOURCE MANAGER        containers paused/stopped under memory pressure
#
# ==============================================================================================

# ==============================================================================================
# ── STORAGE MODE ──────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Storage mode ━━━
# Controls where Varaverk stores scripts, conf, and state files.
# true  = internal NVMe/SSD — /boot/config/plugins/varaverk  (write-safe, git-direct)
# false = USB flash boot    — /mnt/user/appdata/Varaverk      (preserves flash lifetime)
# Auto-detected from boot device transport on first setup.
# To change: Settings → Storage → Migrate.
    HOSTN_STORAGE_MODE_INTERNAL=true

# ==============================================================================================
# ── IDENTITY & CONNECTIVITY ───────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Identity ━━━
# HOSTN hostname lives in master.conf (not a credential — safe for all servers).
# SSH key used for all server-to-server operations — rsync, failover, conf sync.
# Convention: /root/.ssh/<hostname-lowercase-no-unraid-prefix>_rsync_automation
# Must be in /root/.ssh/ and authorised in the partner's /root/.ssh/authorized_keys.
# Run Partnership/ssh_setup.sh to generate the key and copy it to the partner.
    HOSTN_SSH_KEY=""    # e.g. /root/.ssh/myserver_rsync_automation
    HOSTN_OWNER=""      # short identifier for this server (e.g. myserver)
    HOSTN_OWNER_EMAIL=""

# ━━━ Unraid API ━━━
# Used by the Varaverk plugin to query this server's Unraid GraphQL API.
# Generate in Unraid: Settings → Management Access → API Keys → + New Key
    HOSTN_UNRAID_API_KEY=""

# ━━━ Emby ━━━
    HOSTN_EMBY_CONTAINER="Emby"
    HOSTN_EMBY_URL="http://localhost:8096"
    HOSTN_EMBY_API_KEY=""   # Emby Dashboard → API Keys → + New Key

# ━━━ Jellyfin ━━━
    HOSTN_JELLYFIN_CONTAINER="Jellyfin"
    HOSTN_JELLYFIN_URL="http://localhost:8095"
    HOSTN_JELLYFIN_API_KEY=""   # Jellyfin Dashboard → Administration → API Keys

# ━━━ Gitea ━━━
# Personal access token for gitea_ssh_setup.sh.
# Create in Gitea: Settings → Applications → Generate Token → scope: write:user
    HOSTN_GITEA_API_TOKEN=""

# ━━━ Notifications ━━━
# Discord webhook — leave blank to disable.
    HOSTN_DISCORD_WEBHOOK=""

# ━━━ Partnership ━━━

# Auth containers reconfigured on onboard/offboard.
# Format: "ContainerName|WebUIPort"
    HOSTN_PARTNERSHIP_AUTH_WEBUIS=(
        # "NginxProxyManager|81"
        # "Authelia|9091"
    )

# XML templates pushed to mirror during onboard — auth stack.
# Dependencies (databases) must come before apps that depend on them.
    HOSTN_PARTNERSHIP_AUTH_STACK=(
        # "my-Authelia.xml"
        # "my-NginxProxyManager.xml"
    )

# XML templates pushed to mirror during onboard — arr stack.
    HOSTN_PARTNERSHIP_ARR_STACK=(
        # "my-Sonarr.xml"
        # "my-Radarr.xml"
    )

# Paths the partner should collect during the grace window after offboard.
    HOSTN_PARTNERSHIP_MIRROR_BACKUPS=(
        # "/mnt/user/appdata-Fallback/Partner-Emby"
    )

# Containers parked on this server when partnership is active.
    HOSTN_PARTNERSHIP_OWN_CONTAINERS=(
        # "Emby"
    )

# Emby admin provisioning — owner controls whether Emby is shared.
    HOSTN_PARTNERSHIP_PROVISION_EMBY_ADMIN=false
    HOSTN_PARTNERSHIP_EMBY_PORT=8096
    HOSTN_PARTNERSHIP_EMBY_ADMIN_USER=""
    HOSTN_PARTNERSHIP_EMBY_ADMIN_PASS=""

# ==============================================================================================
# ── RSYNC ─────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Daily Sync Shares ━━━
# Media shares this host pushes to all other nodes every night.
# Uses DEFAULT_RSYNC_OPTS from master.conf — no profile needed.
    HOSTN_DAILY_SYNC_SHARES=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
        # /mnt/user/Music
    )

# ━━━ Weekly Sync Shares ━━━
# Appdata shares synced during the weekly maintenance window.
# Profiles (emby, critical-data) drive container stops — define in master.conf.
    HOSTN_WEEKLY_SYNC_SHARES=(
        # "/mnt/user/Media_Server/Emby"              # emby profile
        # "/mnt/user/appdata-Fallback/Critical-Data" # critical-data profile
    )

# ━━━ Intermediate Sync Shares ━━━
# Shares synced every 4 hours. Leave empty to skip mid-day rsync.
    HOSTN_INTERMEDIATE_SYNC_SHARES=(
        # Add shares here to enable mid-day rsync
    )

# ━━━ Critical Sync Shares ━━━
# Appdata shares synced every 30 minutes.
# Format: "/path/to/share" or "/path/to/share|profile-name"
    HOSTN_CRITICAL_SYNC_SHARES=(
        # "/mnt/user/appdata-Fallback/Critical-Data|critical-fallback"
        # "/mnt/user/Media_Server/Emby|emby-fallback"
    )

# ━━━ Personal Shares ━━━
# Private encrypted shares synced for offsite backup, independent of media shares.
    HOSTN_PERSONAL_SHARES=(
        # /mnt/user/Personal     # e.g. ZFS-encrypted dataset
    )

# ━━━ Backup Verify ━━━
# Leave empty to use HOSTN_DAILY_SYNC_SHARES automatically.
    HOSTN_BACKUP_VERIFY_SHARES=(
        # leave empty to use HOSTN_DAILY_SYNC_SHARES automatically
    )

# ━━━ HOSTN Rsync Profile — hostn-appdata ━━━
# Host-specific appdata sync profile.
    PROFILE_RSYNC_OPTS[hostn-appdata]="-av --info=progress2 --bwlimit=${PROFILE_BW_LIMIT[hostn-appdata]:-8000}"
    PROFILE_BW_LIMIT[hostn-appdata]=8000
    PROFILE_RETRY_COUNT[hostn-appdata]=3
    PROFILE_SLEEP[hostn-appdata]=300
    PROFILE_CRITICAL_CONTAINER_NAMES[hostn-appdata]=""
    PROFILE_DELAYED_CONTAINERS[hostn-appdata]=""
    PROFILE_CONTAINER_DELAY[hostn-appdata]=5
    PROFILE_EXCLUDE_DIRS[hostn-appdata]="logs *.tmp"

# ==============================================================================================
# ── DOCKER ────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Docker Daily Restart ━━━
    HOSTN_DAILY_RESTART_CONTAINERS=(
        # "NginxProxyManager"
        # "Authelia"
    )

# ━━━ Docker Weekly Restart ━━━
    HOSTN_WEEKLY_RESTART_CONTAINERS=(
        # "NextCloud"
        # "AdGuard-Home"
    )

# ━━━ Docker Watchdog ━━━

# Memory hard limits in MB — immediate restart if exceeded.
# 20GB=20480  16GB=16384  8GB=8192  4GB=4096  2GB=2048  1GB=1024
    declare -A HOSTN_WATCHDOG_CONTAINERS=(
        # ["Emby"]=18432
    )

# HTTP health check URLs — checked every cycle.
    declare -A HOSTN_WATCHDOG_CONTAINER_URLS=(
        # ["Emby"]="http://localhost:8096"
    )

# Required containers — must always be running.
    HOSTN_WATCHDOG_REQUIRED_CONTAINERS=(
        # "NginxProxyManager"
        # "Authelia"
    )

# Containers to skip in Tier 2 global scan.
    HOSTN_WATCHDOG_SCAN_IGNORE=(
        # "my-occasional-container"
    )

# Dependency ordering — skip restarting a container if its dependency is also down.
    declare -A HOSTN_WATCHDOG_DEPENDENCIES=(
        # ["Authelia"]="Mariadb Redis-Authelia"
    )

# Per-container appdata growth suppress ceilings in MB.
    declare -A HOSTN_WATCHDOG_APPDATA_SIZES=(
        # ["Tdarr"]="25600"
    )

# ━━━ Network Watchdog ━━━
    HOSTN_NETWORK_WATCHDOG_DDNS_DOMAIN=""       # e.g. myserver.com
    HOSTN_NETWORK_WATCHDOG_DDNS_CONTAINER=""    # e.g. MyServer.com
    HOSTN_NETWORK_WATCHDOG_NPM_URL=""           # e.g. https://myserver.com

# ━━━ Docker Network Connect ━━━
    HOSTN_NETWORK_CONNECT_CONTAINERS=(
        # "memcached"
    )

    HOSTN_NETWORK_CONNECT_NETWORKS=(
        # "high-availability"
    )

# ==============================================================================================
# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ DDNS ━━━
# DDNS containers this host manages.
    HOSTN_DDNS_CONTAINERS=(
        # "MyServer.com"
    )

# ━━━ Internet Loss ━━━
# Containers stopped immediately when internet is lost.
    FALLBACK_HOSTN_STOP_ON_NO_NET=(
        # "MyServer.com"
    )

# ━━━ Fallback Tiers — HOSTN Runs for Partner ━━━
# Containers this host starts when the partner goes down.
# Replace REMOTE_ID below with the actual remote host ID (HOST1, HOST2, etc.)
    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER1=(
        # "Partner-DDNS-Container"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER2=(
        # "container-placeholder"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER3=(
        # "container-placeholder"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER4=(
        # "container-placeholder"
    )

# ━━━ Tier Delays — Partner's Containers on this Host ━━━
# How long the partner must be down before each tier activates here — in minutes.
# Replace REMOTE_ID with the actual remote host ID (HOST1, HOST2, etc.)
    REMOTE_ID_TIER2_DELAY=240           # 4 hours
    REMOTE_ID_TIER3_DELAY=720           # 12 hours
    REMOTE_ID_TIER4_DELAY=1440          # 24 hours

# ━━━ Rsync Writeback ━━━
    HOSTN_TIER1_WRITEBACK_DELAY=60      # skip Emby writeback if outage under 1hr

    FALLBACK_HOSTN_WRITEBACK_TIER1=(
        # "/mnt/user/Media_Server/Emby"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER2=(
        # "/mnt/user/appdata-Fallback/Important-Data"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER3=(
        # "location-placeholder"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER4=(
        # "/mnt/user/appdata-Fallback/Arrs_Stack"
    )

# ==============================================================================================
# ── MEDIA ─────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Media Permissions ━━━
    HOSTN_MEDIA_PERMISSION_SHARES=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
        # /mnt/user/Music
        # /mnt/user/Downloads
    )

# ━━━ Media Cleaner ━━━
    HOSTN_ANIME_CLEAN_FOLDERS=(
        # /mnt/user/Anime_Movies
        # /mnt/user/Anime_Shows
    )

    HOSTN_MEDIA_CLEAN_FOLDERS=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
    )

# ==============================================================================================
# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Certificate Monitor ━━━
    HOSTN_CERT_MONITOR_DOMAINS=(
        # "myserver.com"
    )

# ━━━ SMART Health ━━━
    HOSTN_SMART_IGNORE_DRIVES=(
        "sda"   # boot USB — SMART not meaningful on flash drives
    )

# ━━━ ZFS Report ━━━
    HOSTN_ZFS_REPORT_IGNORE_POOLS=(
        # "disk5"
    )

# ==============================================================================================
# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_RAMDISK_SIZE="10G"
    HOSTN_RAMDISK_WARN_GB=8.5
    HOSTN_RAMDISK_LOW_GB=7
    HOSTN_TRANSCODE_SSD="/mnt/cache/Temp_Storage/Emby/Transcodes/"

    HOSTN_TRANSCODE_SERVERS=(
        "${HOSTN_EMBY_CONTAINER}|${HOSTN_EMBY_URL}|${HOSTN_EMBY_API_KEY}|emby"
    )

# ==============================================================================================
# ── ARR STACK ─────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Downloaders ━━━
    HOSTN_SLSKD_URL="http://localhost:8980"
    HOSTN_SLSKD_API_KEY=""
    HOSTN_SLSKD_FAILED_IMPORTS_DIR=""

    HOSTN_SABNZBD_URL="http://localhost:8180"
    HOSTN_SABNZBD_API_KEY=""

    HOSTN_QBIT_URL="http://localhost:8080"
    HOSTN_QBIT_USERNAME="admin"
    HOSTN_QBIT_PASSWORD=""

# ━━━ Lidarr ━━━
    HOSTN_LIDARR_URL="http://localhost:8686"
    HOSTN_LIDARR_API_KEY=""
    HOSTN_LIDARR_MUSIC_ROOT="/mnt/user/Music"
    HOSTN_FANART_API_KEY=""
    HOSTN_LASTFM_API_KEY=""

    declare -A HOSTN_LIDARR_PATH_MAP=(
        # ["/music"]="/mnt/user/Music"
    )

# ━━━ Sonarr ━━━
    HOSTN_SONARR_URL="http://localhost:8989"
    HOSTN_SONARR_API_KEY=""
    HOSTN_SONARR_TV_ROOT="/mnt/user/Tv_Shows"

    declare -A HOSTN_SONARR_PATH_MAP=(
        # ["/tv"]="/mnt/user/Tv_Shows"
    )

# ━━━ Radarr ━━━
    HOSTN_RADARR_URL="http://localhost:7878"
    HOSTN_RADARR_API_KEY=""
    HOSTN_TMDB_API_KEY=""
    HOSTN_RADARR_MOVIE_ROOT="/mnt/user/Movies"

    declare -A HOSTN_RADARR_PATH_MAP=(
        # ["/movies"]="/mnt/user/Movies"
    )

# ━━━ Arr Recovery Toggles ━━━
    HOSTN_LIDARR_RECOVERY=false
    HOSTN_SONARR_RECOVERY=true
    HOSTN_RADARR_RECOVERY=true

# ==============================================================================================
# ── SYSTEM WATCHDOG ───────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_SYS_WATCHDOG_CHECK_DOCKER=true
    HOSTN_SYS_WATCHDOG_CHECK_ROOTFS=true
    HOSTN_SYS_WATCHDOG_CHECK_KERNEL_OOPS=true
    HOSTN_SYS_WATCHDOG_CHECK_FD=true
    HOSTN_SYS_WATCHDOG_CHECK_BOOT=true
    HOSTN_SYS_WATCHDOG_CHECK_OOM=true
    HOSTN_SYS_WATCHDOG_CHECK_RAM=true
    HOSTN_SYS_WATCHDOG_CHECK_LOG=true
    HOSTN_SYS_WATCHDOG_CHECK_ARC=true
    HOSTN_SYS_WATCHDOG_CHECK_TEMP=true
    HOSTN_SYS_WATCHDOG_CHECK_LOAD=true
    HOSTN_SYS_WATCHDOG_CHECK_ZOMBIES=true
    HOSTN_SYS_WATCHDOG_CHECK_CONTAINERS=true
    HOSTN_SYS_WATCHDOG_CHECK_TMP=true
    HOSTN_SYS_WATCHDOG_CHECK_MDSTAT=true
    HOSTN_SYS_WATCHDOG_CHECK_NETWORK=true
    HOSTN_SYS_WATCHDOG_CHECK_SSHD=true
    HOSTN_SYS_WATCHDOG_CHECK_RUNAWAY=false

    HOSTN_SYS_WATCHDOG_NIC=""   # e.g. eth0 — for network monitoring

# ==============================================================================================
# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_RW_PAUSE_CONTAINERS=(
        # "Tdarr"
        # "LidaTube"
    )

    HOSTN_RW_STOP_CONTAINERS=(
        # "Tdarr"
    )


lets organise master and hostwith the same structure, move the unraid key tward the top of the conf. that update templates to match


Review onboarding and first launch setup


Now I'll write the template with the same structure as host1.conf.


Write

#!/bin/bash
# ==============================================================================================
# ========================== HOSTN CONFIGURATION — (hostname) ==================================
# ==============================================================================================
# HOSTN-specific variables — credentials, container names, share paths, failover lists.
# Sourced after master.conf — values here extend shared profile arrays and add HOSTN-specific
# identity, credentials, and container configuration.
#
# Sparse checkout (git) ensures other hosts never receive this file.
#
# DO NOT put shared config here — thresholds, toggles, profiles belong in master.conf.
# DO NOT put other hosts' variables here — they belong in their own host*.conf files.
#
# ── HOW TO USE THIS TEMPLATE ──────────────────────────────────────────────────────────────────
# This file was generated by the Varaverk first-run wizard.
# Fill in the sections that apply to your setup — leave unused sections empty.
# All scripts self-guard against empty values — safe to leave sections blank until needed.
#
# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
#
#   ── IDENTITY & CONNECTIVITY ────────────────────────────────────────────────────────────────
#   IDENTITY                hostname, SSH key, Unraid API key
#   EMBY                    container name, URL, API key
#   JELLYFIN                container name, URL, API key
#   GITEA                   API token for SSH key registration
#   NOTIFICATIONS           Discord webhook
#
#   ── PARTNERSHIP ────────────────────────────────────────────────────────────────────────────
#   PARTNERSHIP             auth containers, backup paths, emby provisioning
#
#   ── RSYNC ──────────────────────────────────────────────────────────────────────────────────
#   DAILY SYNC SHARES       media shares this host owns and pushes
#   PERSONAL SHARES         private encrypted shares for offsite backup
#   WEEKLY SYNC SHARES      appdata shares synced weekly
#   INTERMEDIATE SYNC       mid-day appdata propagation
#   CRITICAL SYNC SHARES    appdata shares synced every 30 minutes
#   BACKUP VERIFY           shares for checksum verification against remote
#   HOSTN RSYNC PROFILE     host-specific appdata sync profile
#
#   ── FALLBACK ───────────────────────────────────────────────────────────────────────────────
#   DDNS                    DDNS containers managed by this host
#   INTERNET LOSS           containers stopped when internet is lost
#   FALLBACK TIERS          what this host runs for the remote per tier
#   TIER DELAYS             delays before each tier activates
#   RSYNC WRITEBACK         appdata synced back on handback
#
#   ── DOCKER ─────────────────────────────────────────────────────────────────────────────────
#   DOCKER DAILY RESTART    containers restarted daily
#   DOCKER WEEKLY RESTART   containers restarted weekly
#   DOCKER WATCHDOG         memory limits, health URLs, required containers
#   NETWORK WATCHDOG        DDNS domain, NPM URL for connectivity checks
#   DOCKER NETWORK CONNECT  networks and containers for array start
#
#   ── MEDIA ──────────────────────────────────────────────────────────────────────────────────
#   MEDIA PERMISSIONS       share list for permissions script
#   MEDIA CLEANER           folder lists for media_cleaner.sh
#
#   ── ARR STACK ──────────────────────────────────────────────────────────────────────────────
#   DOWNLOADERS             slskd, SABnzbd, qBittorrent credentials and URLs
#   LIDARR / SONARR / RADARR  URL, API key, path map
#   ARR RECOVERY            per-arr recovery toggles
#
#   ── TRANSCODES ─────────────────────────────────────────────────────────────────────────────
#   TRANSCODES              ramdisk size, thresholds, SSD path, server array
#
#   ── MONITORS ───────────────────────────────────────────────────────────────────────────────
#   CERTIFICATE MONITOR     domains checked for SSL expiry
#   SMART HEALTH            drives to skip in SMART monitoring
#   ZFS REPORT              pools to exclude from ZFS health report
#
#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
#   RESOURCE MANAGER        containers paused/stopped under memory pressure
#
#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG         per-host check toggles and NIC configuration
#
# ==============================================================================================

# ==============================================================================================
# ── STORAGE MODE ──────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Storage mode ━━━
# Controls where Varaverk stores scripts, conf, and state files.
# true  = internal NVMe/SSD — /boot/config/plugins/varaverk  (write-safe, git-direct)
# false = USB flash boot    — /mnt/user/appdata/Varaverk      (preserves flash lifetime)
# Auto-detected from boot device transport on first setup.
# To change: Settings → Storage → Migrate.
    HOSTN_STORAGE_MODE_INTERNAL=true

# ==============================================================================================
# ── IDENTITY & CONNECTIVITY ───────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Identity ━━━
# HOSTN hostname lives in master.conf (not a credential — safe for all servers).
# SSH key used for all server-to-server operations — rsync, failover, conf sync.
# Convention: /root/.ssh/<hostname-lowercase-no-unraid-prefix>_rsync_automation
# Must be in /root/.ssh/ and authorised in the partner's /root/.ssh/authorized_keys.
# Run Partnership/ssh_setup.sh to generate the key and copy it to the partner.
    HOSTN_SSH_KEY=""    # e.g. /root/.ssh/myserver_rsync_automation
    HOSTN_OWNER=""      # short identifier for this server (e.g. myserver)
    HOSTN_OWNER_EMAIL=""

# ━━━ Unraid API ━━━
# Used by the Varaverk plugin to query this server's Unraid GraphQL API.
# Generate in Unraid: Settings → Management Access → API Keys → + New Key
    HOSTN_UNRAID_API_KEY=""

# ━━━ Emby ━━━
    HOSTN_EMBY_CONTAINER="Emby"
    HOSTN_EMBY_URL="http://localhost:8096"
    HOSTN_EMBY_API_KEY=""   # Emby Dashboard → API Keys → + New Key

# ━━━ Jellyfin ━━━
    HOSTN_JELLYFIN_CONTAINER="Jellyfin"
    HOSTN_JELLYFIN_URL="http://localhost:8095"
    HOSTN_JELLYFIN_API_KEY=""   # Jellyfin Dashboard → Administration → API Keys

# ━━━ Gitea ━━━
# Personal access token for gitea_ssh_setup.sh.
# Create in Gitea: Settings → Applications → Generate Token → scope: write:user
    HOSTN_GITEA_API_TOKEN=""

# ━━━ Notifications ━━━
# Discord webhook — leave blank to disable.
    HOSTN_DISCORD_WEBHOOK=""

# ==============================================================================================
# ── PARTNERSHIP ───────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# Auth containers reconfigured on onboard/offboard.
# Format: "ContainerName|WebUIPort"
    HOSTN_PARTNERSHIP_AUTH_WEBUIS=(
        # "NginxProxyManager|81"
        # "Authelia|9091"
    )

# XML templates pushed to mirror during onboard — auth stack.
# Dependencies (databases) must come before apps that depend on them.
    HOSTN_PARTNERSHIP_AUTH_STACK=(
        # "my-Authelia.xml"
        # "my-NginxProxyManager.xml"
    )

# XML templates pushed to mirror during onboard — arr stack.
    HOSTN_PARTNERSHIP_ARR_STACK=(
        # "my-Sonarr.xml"
        # "my-Radarr.xml"
    )

# Paths the partner should collect during the grace window after offboard.
    HOSTN_PARTNERSHIP_MIRROR_BACKUPS=(
        # "/mnt/user/appdata-Fallback/Partner-Emby"
    )

# Containers parked on this server when partnership is active.
    HOSTN_PARTNERSHIP_OWN_CONTAINERS=(
        # "Emby"
    )

# Emby admin provisioning — owner controls whether Emby is shared.
    HOSTN_PARTNERSHIP_PROVISION_EMBY_ADMIN=false
    HOSTN_PARTNERSHIP_EMBY_PORT=8096
    HOSTN_PARTNERSHIP_EMBY_ADMIN_USER=""
    HOSTN_PARTNERSHIP_EMBY_ADMIN_PASS=""

# ==============================================================================================
# ── RSYNC ─────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Daily Sync Shares ━━━
# Media shares this host pushes to all other nodes every night.
# Uses DEFAULT_RSYNC_OPTS from master.conf — no profile needed.
    HOSTN_DAILY_SYNC_SHARES=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
        # /mnt/user/Music
    )

# ━━━ Personal Shares ━━━
# Private encrypted shares synced for offsite backup, independent of media shares.
    HOSTN_PERSONAL_SHARES=(
        # /mnt/user/Personal     # e.g. ZFS-encrypted dataset
    )

# ━━━ Weekly Sync Shares ━━━
# Appdata shares synced during the weekly maintenance window.
# Profiles (emby, critical-data) drive container stops — define in master.conf.
    HOSTN_WEEKLY_SYNC_SHARES=(
        # "/mnt/user/Media_Server/Emby"              # emby profile
        # "/mnt/user/appdata-Fallback/Critical-Data" # critical-data profile
    )

# ━━━ Intermediate Sync Shares ━━━
# Shares synced every 4 hours. Leave empty to skip mid-day rsync.
    HOSTN_INTERMEDIATE_SYNC_SHARES=(
        # Add shares here to enable mid-day rsync
    )

# ━━━ Critical Sync Shares ━━━
# Appdata shares synced every 30 minutes.
# Format: "/path/to/share" or "/path/to/share|profile-name"
    HOSTN_CRITICAL_SYNC_SHARES=(
        # "/mnt/user/appdata-Fallback/Critical-Data|critical-fallback"
        # "/mnt/user/Media_Server/Emby|emby-fallback"
    )

# ━━━ Backup Verify ━━━
# Leave empty to use HOSTN_DAILY_SYNC_SHARES automatically.
    HOSTN_BACKUP_VERIFY_SHARES=(
        # leave empty to use HOSTN_DAILY_SYNC_SHARES automatically
    )

# ━━━ HOSTN Rsync Profile — hostn-appdata ━━━
# Host-specific appdata sync profile.
    PROFILE_RSYNC_OPTS[hostn-appdata]="-av --info=progress2 --bwlimit=${PROFILE_BW_LIMIT[hostn-appdata]:-8000}"
    PROFILE_BW_LIMIT[hostn-appdata]=8000
    PROFILE_RETRY_COUNT[hostn-appdata]=3
    PROFILE_SLEEP[hostn-appdata]=300
    PROFILE_CRITICAL_CONTAINER_NAMES[hostn-appdata]=""
    PROFILE_DELAYED_CONTAINERS[hostn-appdata]=""
    PROFILE_CONTAINER_DELAY[hostn-appdata]=5
    PROFILE_EXCLUDE_DIRS[hostn-appdata]="logs *.tmp"

# ==============================================================================================
# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ DDNS ━━━
# DDNS containers this host manages.
    HOSTN_DDNS_CONTAINERS=(
        # "MyServer.com"
    )

# ━━━ Internet Loss ━━━
# Containers stopped immediately when internet is lost.
    FALLBACK_HOSTN_STOP_ON_NO_NET=(
        # "MyServer.com"
    )

# ━━━ Fallback Tiers — HOSTN Runs for Partner ━━━
# Containers this host starts when the partner goes down.
# Replace REMOTE_ID below with the actual remote host ID (HOST1, HOST2, etc.)
    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER1=(
        # "Partner-DDNS-Container"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER2=(
        # "container-placeholder"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER3=(
        # "container-placeholder"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER4=(
        # "container-placeholder"
    )

# ━━━ Tier Delays — Partner's Containers on this Host ━━━
# How long the partner must be down before each tier activates here — in minutes.
# Replace REMOTE_ID with the actual remote host ID (HOST1, HOST2, etc.)
    REMOTE_ID_TIER2_DELAY=240           # 4 hours
    REMOTE_ID_TIER3_DELAY=720           # 12 hours
    REMOTE_ID_TIER4_DELAY=1440          # 24 hours

# ━━━ Rsync Writeback ━━━
    HOSTN_TIER1_WRITEBACK_DELAY=60      # skip Emby writeback if outage under 1hr

    FALLBACK_HOSTN_WRITEBACK_TIER1=(
        # "/mnt/user/Media_Server/Emby"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER2=(
        # "/mnt/user/appdata-Fallback/Important-Data"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER3=(
        # "location-placeholder"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER4=(
        # "/mnt/user/appdata-Fallback/Arrs_Stack"
    )

# ==============================================================================================
# ── DOCKER ────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Docker Daily Restart ━━━
    HOSTN_DAILY_RESTART_CONTAINERS=(
        # "NginxProxyManager"
        # "Authelia"
    )

# ━━━ Docker Weekly Restart ━━━
    HOSTN_WEEKLY_RESTART_CONTAINERS=(
        # "NextCloud"
        # "AdGuard-Home"
    )

# ━━━ Docker Watchdog ━━━

# Memory hard limits in MB — immediate restart if exceeded.
# 20GB=20480  16GB=16384  8GB=8192  4GB=4096  2GB=2048  1GB=1024
    declare -A HOSTN_WATCHDOG_CONTAINERS=(
        # ["Emby"]=18432
    )

# HTTP health check URLs — checked every cycle.
    declare -A HOSTN_WATCHDOG_CONTAINER_URLS=(
        # ["Emby"]="http://localhost:8096"
    )

# Required containers — must always be running.
    HOSTN_WATCHDOG_REQUIRED_CONTAINERS=(
        # "NginxProxyManager"
        # "Authelia"
    )

# Containers to skip in Tier 2 global scan.
    HOSTN_WATCHDOG_SCAN_IGNORE=(
        # "my-occasional-container"
    )

# Dependency ordering — skip restarting a container if its dependency is also down.
    declare -A HOSTN_WATCHDOG_DEPENDENCIES=(
        # ["Authelia"]="Mariadb Redis-Authelia"
    )

# Per-container appdata growth suppress ceilings in MB.
    declare -A HOSTN_WATCHDOG_APPDATA_SIZES=(
        # ["Tdarr"]="25600"
    )

# ━━━ Network Watchdog ━━━
    HOSTN_NETWORK_WATCHDOG_DDNS_DOMAIN=""       # e.g. myserver.com
    HOSTN_NETWORK_WATCHDOG_DDNS_CONTAINER=""    # e.g. MyServer.com
    HOSTN_NETWORK_WATCHDOG_NPM_URL=""           # e.g. https://myserver.com

# ━━━ Docker Network Connect ━━━
    HOSTN_NETWORK_CONNECT_CONTAINERS=(
        # "memcached"
    )

    HOSTN_NETWORK_CONNECT_NETWORKS=(
        # "high-availability"
    )

# ==============================================================================================
# ── MEDIA ─────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Media Permissions ━━━
    HOSTN_MEDIA_PERMISSION_SHARES=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
        # /mnt/user/Music
        # /mnt/user/Downloads
    )

# ━━━ Media Cleaner ━━━
    HOSTN_ANIME_CLEAN_FOLDERS=(
        # /mnt/user/Anime_Movies
        # /mnt/user/Anime_Shows
    )

    HOSTN_MEDIA_CLEAN_FOLDERS=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
    )

# ==============================================================================================
# ── ARR STACK ─────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Downloaders ━━━
    HOSTN_SLSKD_URL="http://localhost:8980"
    HOSTN_SLSKD_API_KEY=""
    HOSTN_SLSKD_FAILED_IMPORTS_DIR=""

    HOSTN_SABNZBD_URL="http://localhost:8180"
    HOSTN_SABNZBD_API_KEY=""

    HOSTN_QBIT_URL="http://localhost:8080"
    HOSTN_QBIT_USERNAME="admin"
    HOSTN_QBIT_PASSWORD=""

# ━━━ Lidarr ━━━
    HOSTN_LIDARR_URL="http://localhost:8686"
    HOSTN_LIDARR_API_KEY=""
    HOSTN_LIDARR_MUSIC_ROOT="/mnt/user/Music"
    HOSTN_FANART_API_KEY=""
    HOSTN_LASTFM_API_KEY=""

    declare -A HOSTN_LIDARR_PATH_MAP=(
        # ["/music"]="/mnt/user/Music"
    )

# ━━━ Sonarr ━━━
    HOSTN_SONARR_URL="http://localhost:8989"
    HOSTN_SONARR_API_KEY=""
    HOSTN_SONARR_TV_ROOT="/mnt/user/Tv_Shows"

    declare -A HOSTN_SONARR_PATH_MAP=(
        # ["/tv"]="/mnt/user/Tv_Shows"
    )

# ━━━ Radarr ━━━
    HOSTN_RADARR_URL="http://localhost:7878"
    HOSTN_RADARR_API_KEY=""
    HOSTN_TMDB_API_KEY=""
    HOSTN_RADARR_MOVIE_ROOT="/mnt/user/Movies"

    declare -A HOSTN_RADARR_PATH_MAP=(
        # ["/movies"]="/mnt/user/Movies"
    )

# ━━━ Arr Recovery Toggles ━━━
    HOSTN_LIDARR_RECOVERY=false
    HOSTN_SONARR_RECOVERY=true
    HOSTN_RADARR_RECOVERY=true

# ==============================================================================================
# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_RAMDISK_SIZE="10G"
    HOSTN_RAMDISK_WARN_GB=8.5
    HOSTN_RAMDISK_LOW_GB=7
    HOSTN_TRANSCODE_SSD="/mnt/cache/Temp_Storage/Emby/Transcodes/"

    HOSTN_TRANSCODE_SERVERS=(
        "${HOSTN_EMBY_CONTAINER}|${HOSTN_EMBY_URL}|${HOSTN_EMBY_API_KEY}|emby"
    )

# ==============================================================================================
# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Certificate Monitor ━━━
    HOSTN_CERT_MONITOR_DOMAINS=(
        # "myserver.com"
    )

# ━━━ SMART Health ━━━
    HOSTN_SMART_IGNORE_DRIVES=(
        "sda"   # boot USB — SMART not meaningful on flash drives
    )

# ━━━ ZFS Report ━━━
    HOSTN_ZFS_REPORT_IGNORE_POOLS=(
        # "disk5"
    )

# ==============================================================================================
# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_RW_PAUSE_CONTAINERS=(
        # "Tdarr"
        # "LidaTube"
    )

    HOSTN_RW_STOP_CONTAINERS=(
        # "Tdarr"
    )

# ==============================================================================================
# ── SYSTEM WATCHDOG ───────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_SYS_WATCHDOG_NIC=""   # e.g. eth0 — for network monitoring

    HOSTN_SYS_WATCHDOG_CHECK_DOCKER=true
    HOSTN_SYS_WATCHDOG_CHECK_ROOTFS=true
    HOSTN_SYS_WATCHDOG_CHECK_KERNEL_OOPS=true
    HOSTN_SYS_WATCHDOG_CHECK_FD=true
    HOSTN_SYS_WATCHDOG_CHECK_BOOT=true
    HOSTN_SYS_WATCHDOG_CHECK_OOM=true
    HOSTN_SYS_WATCHDOG_CHECK_RAM=true
    HOSTN_SYS_WATCHDOG_CHECK_LOG=true
    HOSTN_SYS_WATCHDOG_CHECK_ARC=true
    HOSTN_SYS_WATCHDOG_CHECK_TEMP=true
    HOSTN_SYS_WATCHDOG_CHECK_LOAD=true
    HOSTN_SYS_WATCHDOG_CHECK_ZOMBIES=true
    HOSTN_SYS_WATCHDOG_CHECK_CONTAINERS=true
    HOSTN_SYS_WATCHDOG_CHECK_TMP=true
    HOSTN_SYS_WATCHDOG_CHECK_MDSTAT=true
    HOSTN_SYS_WATCHDOG_CHECK_NETWORK=true
    HOSTN_SYS_WATCHDOG_CHECK_SSHD=true
    HOSTN_SYS_WATCHDOG_CHECK_RUNAWAY=false


The file /boot/config/plugins/varaverk/Configurations/host.conf.template has been updated successfully. (file state is current in your context — no need to Read it back)

#!/bin/bash
# ==============================================================================================
# ========================== HOSTN CONFIGURATION — (hostname) ==================================
# ==============================================================================================
# HOSTN-specific variables — credentials, container names, share paths, failover lists.
# Sourced after master.conf — values here extend shared profile arrays and add HOSTN-specific
# identity, credentials, and container configuration.
#
# Sparse checkout (git) ensures other hosts never receive this file.
#
# DO NOT put shared config here — thresholds, toggles, profiles belong in master.conf.
# DO NOT put other hosts' variables here — they belong in their own host*.conf files.
#
# ── HOW TO USE THIS TEMPLATE ──────────────────────────────────────────────────────────────────
# This file was generated by the Varaverk first-run wizard.
# Fill in the sections that apply to your setup — leave unused sections empty.
# All scripts self-guard against empty values — safe to leave sections blank until needed.
#
# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
#
#   ── IDENTITY & CONNECTIVITY ────────────────────────────────────────────────────────────────
#   IDENTITY                hostname, SSH key, Unraid API key
#   EMBY                    container name, URL, API key
#   JELLYFIN                container name, URL, API key
#   GITEA                   API token for SSH key registration
#   NOTIFICATIONS           Discord webhook
#
#   ── PARTNERSHIP ────────────────────────────────────────────────────────────────────────────
#   PARTNERSHIP             auth containers, backup paths, emby provisioning
#
#   ── RSYNC ──────────────────────────────────────────────────────────────────────────────────
#   DAILY SYNC SHARES       media shares this host owns and pushes
#   PERSONAL SHARES         private encrypted shares for offsite backup
#   WEEKLY SYNC SHARES      appdata shares synced weekly
#   INTERMEDIATE SYNC       mid-day appdata propagation
#   CRITICAL SYNC SHARES    appdata shares synced every 30 minutes
#   BACKUP VERIFY           shares for checksum verification against remote
#   HOSTN RSYNC PROFILE     host-specific appdata sync profile
#
#   ── FALLBACK ───────────────────────────────────────────────────────────────────────────────
#   DDNS                    DDNS containers managed by this host
#   INTERNET LOSS           containers stopped when internet is lost
#   FALLBACK TIERS          what this host runs for the remote per tier
#   TIER DELAYS             delays before each tier activates
#   RSYNC WRITEBACK         appdata synced back on handback
#
#   ── DOCKER ─────────────────────────────────────────────────────────────────────────────────
#   DOCKER DAILY RESTART    containers restarted daily
#   DOCKER WEEKLY RESTART   containers restarted weekly
#   DOCKER WATCHDOG         memory limits, health URLs, required containers
#   NETWORK WATCHDOG        DDNS domain, NPM URL for connectivity checks
#   DOCKER NETWORK CONNECT  networks and containers for array start
#
#   ── MEDIA ──────────────────────────────────────────────────────────────────────────────────
#   MEDIA PERMISSIONS       share list for permissions script
#   MEDIA CLEANER           folder lists for media_cleaner.sh
#
#   ── ARR STACK ──────────────────────────────────────────────────────────────────────────────
#   DOWNLOADERS             slskd, SABnzbd, qBittorrent credentials and URLs
#   LIDARR / SONARR / RADARR  URL, API key, path map
#   ARR RECOVERY            per-arr recovery toggles
#
#   ── TRANSCODES ─────────────────────────────────────────────────────────────────────────────
#   TRANSCODES              ramdisk size, thresholds, SSD path, server array
#
#   ── MONITORS ───────────────────────────────────────────────────────────────────────────────
#   CERTIFICATE MONITOR     domains checked for SSL expiry
#   SMART HEALTH            drives to skip in SMART monitoring
#   ZFS REPORT              pools to exclude from ZFS health report
#
#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
#   RESOURCE MANAGER        containers paused/stopped under memory pressure
#
#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG         per-host check toggles and NIC configuration
#
# ==============================================================================================

# ==============================================================================================
# ── STORAGE MODE ──────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Storage mode ━━━
# Controls where Varaverk stores scripts, conf, and state files.
# true  = internal NVMe/SSD — /boot/config/plugins/varaverk  (write-safe, git-direct)
# false = USB flash boot    — /mnt/user/appdata/Varaverk      (preserves flash lifetime)
# Auto-detected from boot device transport on first setup.
# To change: Settings → Storage → Migrate.
    HOSTN_STORAGE_MODE_INTERNAL=true

# ==============================================================================================
# ── IDENTITY & CONNECTIVITY ───────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Identity ━━━
# HOSTN hostname lives in master.conf (not a credential — safe for all servers).
# SSH key used for all server-to-server operations — rsync, failover, conf sync.
# Convention: /root/.ssh/<hostname-lowercase-no-unraid-prefix>_rsync_automation
# Must be in /root/.ssh/ and authorised in the partner's /root/.ssh/authorized_keys.
# Run Partnership/ssh_setup.sh to generate the key and copy it to the partner.
    HOSTN_SSH_KEY=""    # e.g. /root/.ssh/myserver_rsync_automation
    HOSTN_OWNER=""      # short identifier for this server (e.g. myserver)
    HOSTN_OWNER_EMAIL=""

# ━━━ Unraid API ━━━
# Used by the Varaverk plugin to query this server's Unraid GraphQL API.
# Generate in Unraid: Settings → Management Access → API Keys → + New Key
    HOSTN_UNRAID_API_KEY=""

# ━━━ Emby ━━━
    HOSTN_EMBY_CONTAINER="Emby"
    HOSTN_EMBY_URL="http://localhost:8096"
    HOSTN_EMBY_API_KEY=""   # Emby Dashboard → API Keys → + New Key

# ━━━ Jellyfin ━━━
    HOSTN_JELLYFIN_CONTAINER="Jellyfin"
    HOSTN_JELLYFIN_URL="http://localhost:8095"
    HOSTN_JELLYFIN_API_KEY=""   # Jellyfin Dashboard → Administration → API Keys

# ━━━ Gitea ━━━
# Personal access token for gitea_ssh_setup.sh.
# Create in Gitea: Settings → Applications → Generate Token → scope: write:user
    HOSTN_GITEA_API_TOKEN=""

# ━━━ Notifications ━━━
# Discord webhook — leave blank to disable.
    HOSTN_DISCORD_WEBHOOK=""

# ==============================================================================================
# ── PARTNERSHIP ───────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# Auth containers reconfigured on onboard/offboard.
# Format: "ContainerName|WebUIPort"
    HOSTN_PARTNERSHIP_AUTH_WEBUIS=(
        # "NginxProxyManager|81"
        # "Authelia|9091"
    )

# XML templates pushed to mirror during onboard — auth stack.
# Dependencies (databases) must come before apps that depend on them.
    HOSTN_PARTNERSHIP_AUTH_STACK=(
        # "my-Authelia.xml"
        # "my-NginxProxyManager.xml"
    )

# XML templates pushed to mirror during onboard — arr stack.
    HOSTN_PARTNERSHIP_ARR_STACK=(
        # "my-Sonarr.xml"
        # "my-Radarr.xml"
    )

# Paths the partner should collect during the grace window after offboard.
    HOSTN_PARTNERSHIP_MIRROR_BACKUPS=(
        # "/mnt/user/appdata-Fallback/Partner-Emby"
    )

# Containers parked on this server when partnership is active.
    HOSTN_PARTNERSHIP_OWN_CONTAINERS=(
        # "Emby"
    )

# Emby admin provisioning — owner controls whether Emby is shared.
    HOSTN_PARTNERSHIP_PROVISION_EMBY_ADMIN=false
    HOSTN_PARTNERSHIP_EMBY_PORT=8096
    HOSTN_PARTNERSHIP_EMBY_ADMIN_USER=""
    HOSTN_PARTNERSHIP_EMBY_ADMIN_PASS=""

# ==============================================================================================
# ── RSYNC ─────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Daily Sync Shares ━━━
# Media shares this host pushes to all other nodes every night.
# Uses DEFAULT_RSYNC_OPTS from master.conf — no profile needed.
    HOSTN_DAILY_SYNC_SHARES=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
        # /mnt/user/Music
    )

# ━━━ Personal Shares ━━━
# Private encrypted shares synced for offsite backup, independent of media shares.
    HOSTN_PERSONAL_SHARES=(
        # /mnt/user/Personal     # e.g. ZFS-encrypted dataset
    )

# ━━━ Weekly Sync Shares ━━━
# Appdata shares synced during the weekly maintenance window.
# Profiles (emby, critical-data) drive container stops — define in master.conf.
    HOSTN_WEEKLY_SYNC_SHARES=(
        # "/mnt/user/Media_Server/Emby"              # emby profile
        # "/mnt/user/appdata-Fallback/Critical-Data" # critical-data profile
    )

# ━━━ Intermediate Sync Shares ━━━
# Shares synced every 4 hours. Leave empty to skip mid-day rsync.
    HOSTN_INTERMEDIATE_SYNC_SHARES=(
        # Add shares here to enable mid-day rsync
    )

# ━━━ Critical Sync Shares ━━━
# Appdata shares synced every 30 minutes.
# Format: "/path/to/share" or "/path/to/share|profile-name"
    HOSTN_CRITICAL_SYNC_SHARES=(
        # "/mnt/user/appdata-Fallback/Critical-Data|critical-fallback"
        # "/mnt/user/Media_Server/Emby|emby-fallback"
    )

# ━━━ Backup Verify ━━━
# Leave empty to use HOSTN_DAILY_SYNC_SHARES automatically.
    HOSTN_BACKUP_VERIFY_SHARES=(
        # leave empty to use HOSTN_DAILY_SYNC_SHARES automatically
    )

# ━━━ HOSTN Rsync Profile — hostn-appdata ━━━
# Host-specific appdata sync profile.
    PROFILE_RSYNC_OPTS[hostn-appdata]="-av --info=progress2 --bwlimit=${PROFILE_BW_LIMIT[hostn-appdata]:-8000}"
    PROFILE_BW_LIMIT[hostn-appdata]=8000
    PROFILE_RETRY_COUNT[hostn-appdata]=3
    PROFILE_SLEEP[hostn-appdata]=300
    PROFILE_CRITICAL_CONTAINER_NAMES[hostn-appdata]=""
    PROFILE_DELAYED_CONTAINERS[hostn-appdata]=""
    PROFILE_CONTAINER_DELAY[hostn-appdata]=5
    PROFILE_EXCLUDE_DIRS[hostn-appdata]="logs *.tmp"

# ==============================================================================================
# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ DDNS ━━━
# DDNS containers this host manages.
    HOSTN_DDNS_CONTAINERS=(
        # "MyServer.com"
    )

# ━━━ Internet Loss ━━━
# Containers stopped immediately when internet is lost.
    FALLBACK_HOSTN_STOP_ON_NO_NET=(
        # "MyServer.com"
    )

# ━━━ Fallback Tiers — HOSTN Runs for Partner ━━━
# Containers this host starts when the partner goes down.
# Replace REMOTE_ID below with the actual remote host ID (HOST1, HOST2, etc.)
    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER1=(
        # "Partner-DDNS-Container"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER2=(
        # "container-placeholder"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER3=(
        # "container-placeholder"
    )

    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER4=(
        # "container-placeholder"
    )

# ━━━ Tier Delays — Partner's Containers on this Host ━━━
# How long the partner must be down before each tier activates here — in minutes.
# Replace REMOTE_ID with the actual remote host ID (HOST1, HOST2, etc.)
    REMOTE_ID_TIER2_DELAY=240           # 4 hours
    REMOTE_ID_TIER3_DELAY=720           # 12 hours
    REMOTE_ID_TIER4_DELAY=1440          # 24 hours

# ━━━ Rsync Writeback ━━━
    HOSTN_TIER1_WRITEBACK_DELAY=60      # skip Emby writeback if outage under 1hr

    FALLBACK_HOSTN_WRITEBACK_TIER1=(
        # "/mnt/user/Media_Server/Emby"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER2=(
        # "/mnt/user/appdata-Fallback/Important-Data"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER3=(
        # "location-placeholder"
    )

    FALLBACK_HOSTN_WRITEBACK_TIER4=(
        # "/mnt/user/appdata-Fallback/Arrs_Stack"
    )

# ==============================================================================================
# ── DOCKER ────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Docker Daily Restart ━━━
    HOSTN_DAILY_RESTART_CONTAINERS=(
        # "NginxProxyManager"
        # "Authelia"
    )

# ━━━ Docker Weekly Restart ━━━
    HOSTN_WEEKLY_RESTART_CONTAINERS=(
        # "NextCloud"
        # "AdGuard-Home"
    )

# ━━━ Docker Watchdog ━━━

# Memory hard limits in MB — immediate restart if exceeded.
# 20GB=20480  16GB=16384  8GB=8192  4GB=4096  2GB=2048  1GB=1024
    declare -A HOSTN_WATCHDOG_CONTAINERS=(
        # ["Emby"]=18432
    )

# HTTP health check URLs — checked every cycle.
    declare -A HOSTN_WATCHDOG_CONTAINER_URLS=(
        # ["Emby"]="http://localhost:8096"
    )

# Required containers — must always be running.
    HOSTN_WATCHDOG_REQUIRED_CONTAINERS=(
        # "NginxProxyManager"
        # "Authelia"
    )

# Containers to skip in Tier 2 global scan.
    HOSTN_WATCHDOG_SCAN_IGNORE=(
        # "my-occasional-container"
    )

# Dependency ordering — skip restarting a container if its dependency is also down.
    declare -A HOSTN_WATCHDOG_DEPENDENCIES=(
        # ["Authelia"]="Mariadb Redis-Authelia"
    )

# Per-container appdata growth suppress ceilings in MB.
    declare -A HOSTN_WATCHDOG_APPDATA_SIZES=(
        # ["Tdarr"]="25600"
    )

# ━━━ Network Watchdog ━━━
    HOSTN_NETWORK_WATCHDOG_DDNS_DOMAIN=""       # e.g. myserver.com
    HOSTN_NETWORK_WATCHDOG_DDNS_CONTAINER=""    # e.g. MyServer.com
    HOSTN_NETWORK_WATCHDOG_NPM_URL=""           # e.g. https://myserver.com

# ━━━ Docker Network Connect ━━━
    HOSTN_NETWORK_CONNECT_CONTAINERS=(
        # "memcached"
    )

    HOSTN_NETWORK_CONNECT_NETWORKS=(
        # "high-availability"
    )

# ==============================================================================================
# ── MEDIA ─────────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Media Permissions ━━━
    HOSTN_MEDIA_PERMISSION_SHARES=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
        # /mnt/user/Music
        # /mnt/user/Downloads
    )

# ━━━ Media Cleaner ━━━
    HOSTN_ANIME_CLEAN_FOLDERS=(
        # /mnt/user/Anime_Movies
        # /mnt/user/Anime_Shows
    )

    HOSTN_MEDIA_CLEAN_FOLDERS=(
        # /mnt/user/Movies
        # /mnt/user/Tv_Shows
    )

# ==============================================================================================
# ── ARR STACK ─────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Downloaders ━━━
    HOSTN_SLSKD_URL="http://localhost:8980"
    HOSTN_SLSKD_API_KEY=""
    HOSTN_SLSKD_FAILED_IMPORTS_DIR=""

    HOSTN_SABNZBD_URL="http://localhost:8180"
    HOSTN_SABNZBD_API_KEY=""

    HOSTN_QBIT_URL="http://localhost:8080"
    HOSTN_QBIT_USERNAME="admin"
    HOSTN_QBIT_PASSWORD=""

# ━━━ Lidarr ━━━
    HOSTN_LIDARR_URL="http://localhost:8686"
    HOSTN_LIDARR_API_KEY=""
    HOSTN_LIDARR_MUSIC_ROOT="/mnt/user/Music"
    HOSTN_FANART_API_KEY=""
    HOSTN_LASTFM_API_KEY=""

    declare -A HOSTN_LIDARR_PATH_MAP=(
        # ["/music"]="/mnt/user/Music"
    )

# ━━━ Sonarr ━━━
    HOSTN_SONARR_URL="http://localhost:8989"
    HOSTN_SONARR_API_KEY=""
    HOSTN_SONARR_TV_ROOT="/mnt/user/Tv_Shows"

    declare -A HOSTN_SONARR_PATH_MAP=(
        # ["/tv"]="/mnt/user/Tv_Shows"
    )

# ━━━ Radarr ━━━
    HOSTN_RADARR_URL="http://localhost:7878"
    HOSTN_RADARR_API_KEY=""
    HOSTN_TMDB_API_KEY=""
    HOSTN_RADARR_MOVIE_ROOT="/mnt/user/Movies"

    declare -A HOSTN_RADARR_PATH_MAP=(
        # ["/movies"]="/mnt/user/Movies"
    )

# ━━━ Arr Recovery Toggles ━━━
    HOSTN_LIDARR_RECOVERY=false
    HOSTN_SONARR_RECOVERY=true
    HOSTN_RADARR_RECOVERY=true

# ==============================================================================================
# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_RAMDISK_SIZE="10G"
    HOSTN_RAMDISK_WARN_GB=8.5
    HOSTN_RAMDISK_LOW_GB=7
    HOSTN_TRANSCODE_SSD="/mnt/cache/Temp_Storage/Emby/Transcodes/"

    HOSTN_TRANSCODE_SERVERS=(
        "${HOSTN_EMBY_CONTAINER}|${HOSTN_EMBY_URL}|${HOSTN_EMBY_API_KEY}|emby"
    )

# ==============================================================================================
# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# ━━━ Certificate Monitor ━━━
    HOSTN_CERT_MONITOR_DOMAINS=(
        # "myserver.com"
    )

# ━━━ SMART Health ━━━
    HOSTN_SMART_IGNORE_DRIVES=(
        "sda"   # boot USB — SMART not meaningful on flash drives
    )

# ━━━ ZFS Report ━━━
    HOSTN_ZFS_REPORT_IGNORE_POOLS=(
        # "disk5"
    )

# ==============================================================================================
# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_RW_PAUSE_CONTAINERS=(
        # "Tdarr"
        # "LidaTube"
    )

    HOSTN_RW_STOP_CONTAINERS=(
        # "Tdarr"
    )

# ==============================================================================================
# ── SYSTEM WATCHDOG ───────────────────────────────────────────────────────────────────────────
# ==============================================================================================

    HOSTN_SYS_WATCHDOG_NIC=""   # e.g. eth0 — for network monitoring

    HOSTN_SYS_WATCHDOG_CHECK_DOCKER=true
    HOSTN_SYS_WATCHDOG_CHECK_ROOTFS=true
    HOSTN_SYS_WATCHDOG_CHECK_KERNEL_OOPS=true
    HOSTN_SYS_WATCHDOG_CHECK_FD=true
    HOSTN_SYS_WATCHDOG_CHECK_BOOT=true
    HOSTN_SYS_WATCHDOG_CHECK_OOM=true
    HOSTN_SYS_WATCHDOG_CHECK_RAM=true
    HOSTN_SYS_WATCHDOG_CHECK_LOG=true
    HOSTN_SYS_WATCHDOG_CHECK_ARC=true
    HOSTN_SYS_WATCHDOG_CHECK_TEMP=true
    HOSTN_SYS_WATCHDOG_CHECK_LOAD=true
    HOSTN_SYS_WATCHDOG_CHECK_ZOMBIES=true
    HOSTN_SYS_WATCHDOG_CHECK_CONTAINERS=true
    HOSTN_SYS_WATCHDOG_CHECK_TMP=true
    HOSTN_SYS_WATCHDOG_CHECK_MDSTAT=true
    HOSTN_SYS_WATCHDOG_CHECK_NETWORK=true
    HOSTN_SYS_WATCHDOG_CHECK_SSHD=true
    HOSTN_SYS_WATCHDOG_CHECK_RUNAWAY=false

-#   IDENTITY                hostname, SSH key

+#   IDENTITY                hostname, SSH key, Unraid API key

#   EMBY                    container name, URL, API key

+#   JELLYFIN                container name, URL, API key

+#   GITEA                   API token for SSH key registration

#   NOTIFICATIONS           Discord webhook

-#   PARTNERSHIP             auth containers, backup paths

+#   PARTNERSHIP             auth containers, backup paths, emby provisioning

#   DAILY SYNC SHARES       media shares this host owns and pushes

+#   PERSONAL SHARES         private encrypted shares for offsite backup

#   WEEKLY SYNC SHARES      appdata shares synced weekly

+#   INTERMEDIATE SYNC       mid-day appdata propagation

+#   BACKUP VERIFY           shares for checksum verification against remote

#   HOSTN RSYNC PROFILE     host-specific appdata sync profile

-#   ── DOCKER ─────────────────────────────────────────────────────────────────────────────────

-#   DOCKER DAILY RESTART    containers restarted daily

-#   DOCKER WEEKLY RESTART   containers restarted weekly

-#   DOCKER WATCHDOG         memory limits, health URLs, required containers

-#   DOCKER NETWORK CONNECT  networks and containers for array start

#   DDNS                    DDNS containers managed by this host

#   INTERNET LOSS           containers stopped when internet is lost

#   TIER DELAYS             delays before each tier activates

#   RSYNC WRITEBACK         appdata synced back on handback

+#   ── DOCKER ─────────────────────────────────────────────────────────────────────────────────

+#   DOCKER DAILY RESTART    containers restarted daily

+#   DOCKER WEEKLY RESTART   containers restarted weekly

+#   DOCKER WATCHDOG         memory limits, health URLs, required containers

+#   NETWORK WATCHDOG        DDNS domain, NPM URL for connectivity checks

+#   DOCKER NETWORK CONNECT  networks and containers for array start

#   MEDIA PERMISSIONS       share list for permissions script

#   MEDIA CLEANER           folder lists for media_cleaner.sh

-#   CERTIFICATE MONITOR     domains checked for SSL expiry

-#   SMART HEALTH            drives to skip in SMART monitoring

-#   ZFS REPORT              pools to exclude from ZFS health report

-#   TRANSCODES              ramdisk size, thresholds, SSD path, server array

#   LIDARR / SONARR / RADARR  URL, API key, path map

#   ARR RECOVERY            per-arr recovery toggles

-#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────

-#   SYSTEM WATCHDOG         per-host check toggles and NIC configuration

+#   TRANSCODES              ramdisk size, thresholds, SSD path, server array

+#   CERTIFICATE MONITOR     domains checked for SSL expiry

+#   SMART HEALTH            drives to skip in SMART monitoring

+#   ZFS REPORT              pools to exclude from ZFS health report

+#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────

+#   SYSTEM WATCHDOG         per-host check toggles and NIC configuration

# Discord webhook — leave blank to disable.

+# ── PARTNERSHIP ───────────────────────────────────────────────────────────────────────────────

# Auth containers reconfigured on onboard/offboard.

+# Private encrypted shares synced for offsite backup, independent of media shares.

+        # /mnt/user/Personal     # e.g. ZFS-encrypted dataset

-# Private encrypted shares synced for offsite backup, independent of media shares.

-        # /mnt/user/Personal     # e.g. ZFS-encrypted dataset

# Leave empty to use HOSTN_DAILY_SYNC_SHARES automatically.

+# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────

+# ━━━ DDNS ━━━

+# Containers stopped immediately when internet is lost.

+# ━━━ Fallback Tiers — HOSTN Runs for Partner ━━━

+# Containers this host starts when the partner goes down.

+# Replace REMOTE_ID below with the actual remote host ID (HOST1, HOST2, etc.)

+    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER1=(

+    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER2=(

+    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER3=(

+    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER4=(

+# ━━━ Tier Delays — Partner's Containers on this Host ━━━

+# How long the partner must be down before each tier activates here — in minutes.

+# Replace REMOTE_ID with the actual remote host ID (HOST1, HOST2, etc.)

+    REMOTE_ID_TIER2_DELAY=240           # 4 hours

+    REMOTE_ID_TIER3_DELAY=720           # 12 hours

+    REMOTE_ID_TIER4_DELAY=1440          # 24 hours

+    HOSTN_TIER1_WRITEBACK_DELAY=60      # skip Emby writeback if outage under 1hr

+        # "/mnt/user/Media_Server/Emby"

+        # "/mnt/user/appdata-Fallback/Important-Data"

+        # "/mnt/user/appdata-Fallback/Arrs_Stack"

-# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────

-# ━━━ DDNS ━━━

-# Containers stopped immediately when internet is lost.

-# ━━━ Fallback Tiers — HOSTN Runs for Partner ━━━

-# Containers this host starts when the partner goes down.

-# Replace REMOTE_ID below with the actual remote host ID (HOST1, HOST2, etc.)

-    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER1=(

-    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER2=(

-    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER3=(

-    FALLBACK_HOSTN_COVERS_REMOTE_ID_TIER4=(

-# ━━━ Tier Delays — Partner's Containers on this Host ━━━

-# How long the partner must be down before each tier activates here — in minutes.

-# Replace REMOTE_ID with the actual remote host ID (HOST1, HOST2, etc.)

-    REMOTE_ID_TIER2_DELAY=240           # 4 hours

-    REMOTE_ID_TIER3_DELAY=720           # 12 hours

-    REMOTE_ID_TIER4_DELAY=1440          # 24 hours

-    HOSTN_TIER1_WRITEBACK_DELAY=60      # skip Emby writeback if outage under 1hr

-        # "/mnt/user/Media_Server/Emby"

-        # "/mnt/user/appdata-Fallback/Important-Data"

-        # "/mnt/user/appdata-Fallback/Arrs_Stack"

-# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────

-        "sda"   # boot USB — SMART not meaningful on flash drives

-# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────

-    HOSTN_TRANSCODE_SSD="/mnt/cache/Temp_Storage/Emby/Transcodes/"

-        "${HOSTN_EMBY_CONTAINER}|${HOSTN_EMBY_URL}|${HOSTN_EMBY_API_KEY}|emby"

+# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────

+    HOSTN_TRANSCODE_SSD="/mnt/cache/Temp_Storage/Emby/Transcodes/"

+        "${HOSTN_EMBY_CONTAINER}|${HOSTN_EMBY_URL}|${HOSTN_EMBY_API_KEY}|emby"

+# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────

+        "sda"   # boot USB — SMART not meaningful on flash drives

+# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────

+    HOSTN_SYS_WATCHDOG_NIC=""   # e.g. eth0 — for network monitoring

-    HOSTN_SYS_WATCHDOG_NIC=""   # e.g. eth0 — for network monitoring

-# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────


Now update master.conf's index to match — the body section order is already correct in master.conf, just needs the index updated to reflect the PARTNERSHIP as a standalone section (it already is in master.conf) and confirm the ordering matches.


Bash

grep -n "^# ━━━\|^# ──\|^# ======" /boot/config/plugins/varaverk/Configurations/master.conf | grep -v "^1:" | head -20

Check master.conf top-level section order


2:# ==============================================================================================
3:# ================================= MASTER CONFIGURATION =======================================
4:# ==============================================================================================
8:# ── HOW THE THREE-FILE SYSTEM WORKS ──────────────────────────────────────────────────────────
21:# ── HOW THIS FILE WORKS ───────────────────────────────────────────────────────────────────────
28:# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
98:# ==============================================================================================
100:# ==============================================================================================
101:# ── HOST IDENTITIES ───────────────────────────────────────────────────────────────────────────
102:# ==============================================================================================
111:# ==============================================================================================
112:# ── SHARED HOST CONFIGURATION ─────────────────────────────────────────────────────────────────
113:# ==============================================================================================
124:# ── Version Parity ──
131:# ── Arr Sync ──
144:# ── Remote Docker Daemon ──
150:# ==============================================================================================
151:# ── PARTNERSHIP ───────────────────────────────────────────────────────────────────────────────
152:# ==============================================================================================
233:# ==============================================================================================


sed -n '28,98p' /boot/config/plugins/varaverk/Configurations/master.conf

Read master.conf index


# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
#
#   Section                         Description
#   ───────────────────────────────────────────────────────────────────────────────────────────
#   SHARED HOST CONFIGURATION       DATA_DIR and shared connection settings
#   PARTNERSHIP                     Mirror relationship lifecycle — onboard/offboard/transfer
#   LOGGING                         Enable or disable verbose logging
#   NOTIFICATIONS                   unRAID native and Discord webhook settings
#   GIT / REPO                      Gitea repository and SSH settings
#
#   ── ORCHESTRATORS ──────────────────────────────────────────────────────────────────────────
#   ARRAY START                     Scripts launched at array start (array_started.sh)
#   ARRAY STOP                      Scripts run at planned shutdown (array_stopping.sh)
#   WATCHDOG ORCHESTRATOR           Per-minute watchdog runner (watchdog_orchestrator.sh)
#   SYSTEM WATCHDOG                 Sub-scripts called by watchdog_orchestrator.sh
#   CRITICAL SYNC MAINTENANCE       30-minute jobs + sync shares + partnership check (critical_sync_maintenance.sh)
#   INTERMEDIATE SYNC MAINTENANCE   Arr sync + optional mid-day rsync (intermediate_sync_maintenance.sh)
#   DAILY SYNC MAINTENANCE          Job list + media shares (daily_sync_maintenance.sh)
#   WEEKLY SYNC MAINTENANCE         Job list + sync shares + update toggles (weekly_sync_maintenance.sh)
#   MONTHLY MAINTENANCE             Uptime-triggered heavy tasks — ZFS scrub, SMART tests (monthly_maintenance.sh)
#
#   ── RSYNC ──────────────────────────────────────────────────────────────────────────────────
#   RSYNC ENABLE/DISABLE            Two-tier toggle system — global gate + per-orchestrator
#   RSYNC DEFAULTS                  Global fallback rsync options and limits
#   REMOTE HEALTH CHECKS            Rootfs threshold for pre-flight abort
#   RSYNC PROFILE SYSTEM            Per-profile overrides for appdata syncs
#
#   ── FALLBACK ───────────────────────────────────────────────────────────────────────────────
#   FALLBACK                        Mutual container failover shared settings
#   FALLBACK TEST                   Simulated outage settings for fallback_test.sh
#
#   ── DOCKER ESSENTIALS ──────────────────────────────────────────────────────────────────────
#   DOWNLOADERS RESET               Retention and thresholds for slskd, SABnzbd, qBittorrent
#   DOCKER DAILY RESTART            Containers restarted daily
#   DOCKER WEEKLY RESTART           Containers restarted weekly
#   DOCKER WATCHDOG                 Thresholds and toggles for container monitoring
#   DOCKER NETWORK CONNECT          Networks to ensure + containers to connect
#
#   ── UNRAID ESSENTIALS ──────────────────────────────────────────────────────────────────────
#   INOTIFY TUNING                  inotify limits — raised at array start by inotify_tuning.sh
#   SYSTEM TUNING MONITOR           Tracks inotify + php-fpm usage over time
#   REBOOT                          User warning delay before scheduled reboot
#   MOVER                           Mover stop timeout
#   SYSLOG FILTER                   Docker veth noise filter file path
#   PHP-FPM                         PHP-FPM max children config
#   CLEAR LOGS                      System log file paths
#   WEBGUI WATCHDOG                 WebGUI nginx + emhttp monitoring and restart
#
#   ── MEDIA ──────────────────────────────────────────────────────────────────────────────────
#   MEDIA PERMISSIONS               Share list, mode and owner for permissions script
#   MEDIA CLEANER                   Anime and media folder lists and file patterns
#   ARR CLEANUP                     Lidarr, Sonarr, Radarr orphan file cleanup settings
#   ARR FAILED/STALLED RECOVERY     Auto blocklist + re-search settings
#
#   ── TRANSCODES ─────────────────────────────────────────────────────────────────────────────
#   TRANSCODE MANAGER               Ramdisk and SSD fallback transcode management
#   TRANSCODE SERVER ARRAY          Multi-server session monitoring (Emby, Jellyfin, Plex)
#
#   ── MONITORS ───────────────────────────────────────────────────────────────────────────────
#   CERTIFICATE MONITOR             SSL certificate expiry monitoring
#   BACKUP VERIFY                   Random sample checksum verification against remote
#   SMART HEALTH                    Drive SMART attribute monitoring
#   ZFS MEMORY SNAPSHOT             Weekly ZFS health and memory diagnostic report
#   BANDWIDTH MONITOR               Daily rsync transfer logging and weekly summary
#   HEALTH DIGEST                   Aggregated system health digest — always/smart/weekly
#   EMBY SESSION REPORT             Weekly Emby usage statistics via API
#
#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG                 Continuous system health monitoring — last line of defense
#
# ==============================================================================================


Master.conf body order is already correct — RESOURCE MANAGER is missing from the index though. Quick fix:


Edit

#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG                 Continuous system health monitoring — last line of defense
#
# ==============================================================================================

#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
#   RESOURCE MANAGER                Containers paused/stopped under RAM pressure
#
#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG                 Continuous system health monitoring — last line of defense
#
# ==============================================================================================


The file /boot/config/plugins/varaverk/Configurations/master.conf has been updated successfully. (file state is current in your context — no need to Read it back)

#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
#   RESOURCE MANAGER                Containers paused/stopped under RAM pressure
#
#   ── SYSTEM WATCHDOG ────────────────────────────────────────────────────────────────────────
#   SYSTEM WATCHDOG                 Continuous system health monitoring — last line of defense
#
# ==============================================================================================

#   HEALTH DIGEST                   Aggregated system health digest — always/smart/weekly

#   EMBY SESSION REPORT             Weekly Emby usage statistics via API

+#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────

+#   RESOURCE MANAGER                Containers paused/stopped under RAM pressure


Now verify all three files look right and commit.


Bash

echo "=== host1.conf sections ===" && grep -n "^# ── " /boot/config/plugins/varaverk/Configurations/host1.conf
echo ""
echo "=== host.conf.template sections ===" && grep -n "^# ── " /boot/config/plugins/varaverk/Configurations/host.conf.template
echo ""
echo "=== master.conf index entry for RESOURCE MANAGER ===" && grep -n "RESOURCE MANAGER" /boot/config/plugins/varaverk/Configurations/master.conf | head -5

Verify section order in all three files


=== host1.conf sections ===
15:# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
76:# ── IDENTITY & CONNECTIVITY ───────────────────────────────────────────────────────────────────
118:# ── PARTNERSHIP ───────────────────────────────────────────────────────────────────────────────
185:# ── RSYNC ─────────────────────────────────────────────────────────────────────────────────────
273:# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────
346:# ── DOCKER ────────────────────────────────────────────────────────────────────────────────────
464:# ── MEDIA ─────────────────────────────────────────────────────────────────────────────────────
516:# ── ARR STACK ─────────────────────────────────────────────────────────────────────────────────
592:# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────
618:# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────
650:# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────
676:# ── SYSTEM WATCHDOG ───────────────────────────────────────────────────────────────────────────

=== host.conf.template sections ===
14:# ── HOW TO USE THIS TEMPLATE ──────────────────────────────────────────────────────────────────
19:# ── INDEX ─────────────────────────────────────────────────────────────────────────────────────
80:# ── STORAGE MODE ──────────────────────────────────────────────────────────────────────────────
92:# ── IDENTITY & CONNECTIVITY ───────────────────────────────────────────────────────────────────
130:# ── PARTNERSHIP ───────────────────────────────────────────────────────────────────────────────
170:# ── RSYNC ─────────────────────────────────────────────────────────────────────────────────────
228:# ── FALLBACK ──────────────────────────────────────────────────────────────────────────────────
289:# ── DOCKER ────────────────────────────────────────────────────────────────────────────────────
353:# ── MEDIA ─────────────────────────────────────────────────────────────────────────────────────
376:# ── ARR STACK ─────────────────────────────────────────────────────────────────────────────────
427:# ── TRANSCODES ────────────────────────────────────────────────────────────────────────────────
440:# ── MONITORS ──────────────────────────────────────────────────────────────────────────────────
459:# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────
472:# ── SYSTEM WATCHDOG ───────────────────────────────────────────────────────────────────────────

=== master.conf index entry for RESOURCE MANAGER ===
95:#   ── RESOURCE MANAGER ───────────────────────────────────────────────────────────────────────
96:#   RESOURCE MANAGER                Containers paused/stopped under RAM pressure
1280:# ── RESOURCE MANAGER ──────────────────────────────────────────────────────────────────────────


Both files have identical section ordering: IDENTITY → PARTNERSHIP → RSYNC → FALLBACK → DOCKER → MEDIA → ARR STACK → TRANSCODES → MONITORS → RESOURCE MANAGER → SYSTEM WATCHDOG. Master.conf index now includes RESOURCE MANAGER. Committing all three.


git add Configurations/host1.conf Configurations/host.conf.template Configurations/master.conf && git commit -m "$(cat <<'EOF'
Align host.conf and templates to master.conf section structure

Unified section order across all three files: IDENTITY → PARTNERSHIP →
RSYNC → FALLBACK → DOCKER → MEDIA → ARR STACK → TRANSCODES → MONITORS →
RESOURCE MANAGER → SYSTEM WATCHDOG. Moved UNRAID_API_KEY from bottom
of host1.conf to top of IDENTITY section. Extracted PARTNERSHIP from
IDENTITY into its own top-level section. Added RESOURCE MANAGER to
master.conf index.
EOF
)" && git push

Commit and push structural reorganization


Error: Exit code 1
The following paths are ignored by one of your .gitignore files:
Configurations/host1.conf
Configurations/master.conf
hint: Use -f if you really want to add them.
hint: Disable this message with "git config set advice.addIgnoredFile false"


Check gitignore