240	# normal = job completed successfully / warning = something failed or needs attention
241	    NOTIFY_UNRAID=true
242
243	# Discord webhook URL — defined per host in host*.conf.
244	# HOST1_DISCORD_WEBHOOK / HOST2_DISCORD_WEBHOOK
245	# Allows different webhooks per server, or only one server notifying.
246
247	# ==============================================================================================
248	# ── GIT / REPO ────────────────────────────────────────────────────────────────────────────────
249	# ==============================================================================================
250
251	# Gitea self-hosted repository — used by git_pull_execute.sh.
252	# Detects Gitea container location at runtime — works through failover automatically.
253	# Falls back to GITEA_DOMAIN if local and Tailscale both fail.
254	    GITEA_CONTAINER="Gitea"
255	    GITEA_REPO_PATH="FailedProxy/Varaverk.git"
256	    GITEA_DOMAIN=""                         # e.g. git.yourdomain.com — requires NPM + DNS
257	    TARGET_DIR="/boot/config/plugins/varaverk"
258	    GITEA_SSH_KEY="/root/.ssh/unraid_gitea"
259	    SSH_PORT=221                            # Gitea SSH port (default 22, Gitea often uses 221/222)
260	    GITEA_HTTP_PORT=3000                    # Gitea web/API port — used by gitea_ssh_setup.sh
261
262	# ==============================================================================================
263	# ── ORCHESTRATORS ─────────────────────────────────────────────────────────────────────────────
264	# ==============================================================================================
265	# All orchestrator job lists live here — edit arrays to add/remove scripts.
266	# No changes to orchestrator scripts needed when adding or removing jobs.
267	# Sections ordered by run frequency: array events first, then shortest interval to longest.
268
269	# ━━━ Array Start ━━━
270	# Scripts launched by array_started.sh when the array comes online.
271	# Launched in order — each as a background process.
272	# One-shot scripts (ramdisk, syslog, fpm, inotify, network) run and exit naturally.
273	# Continuous scripts (failover) run until array stops.
274	# Watchdogs (resource_watchdog, docker_watchdog, system_watchdog) are cronned via
275	# watchdog_orchestrator.sh — NOT launched here.
276	    ARRAY_START_SCRIPTS=(
277	        "Plugin/unraid/System_Essentials/unraid_api_key_renew.sh"   # re-register Varaverk API key — registry is ephemeral
278	        "System_Essentials/conf_sync.sh"              # pull partner confs + push own conf into /tmp/.vv/ RAM cache
279	        "Transcodes/ramdisk_setup.sh"                 # creates ramdisk + symlink before Emby starts

# normal = job completed successfully / warning = something failed or needs attention
    NOTIFY_UNRAID=true

# Discord webhook URL — defined per host in host*.conf.
# HOST1_DISCORD_WEBHOOK / HOST2_DISCORD_WEBHOOK
# Allows different webhooks per server, or only one server notifying.

# ==============================================================================================
# ── GIT / REPO ────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================

# Gitea self-hosted repository — used by git_pull_execute.sh.
# Detects Gitea container location at runtime — works through failover automatically.
# Falls back to GITEA_DOMAIN if local and Tailscale both fail.
    GITEA_CONTAINER="Gitea"
    GITEA_REPO_PATH="FailedProxy/Varaverk.git"
    GITEA_DOMAIN=""                         # e.g. git.yourdomain.com — requires NPM + DNS
    TARGET_DIR="/boot/config/plugins/varaverk"
    GITEA_SSH_KEY="/root/.ssh/unraid_gitea"
    SSH_PORT=221                            # Gitea SSH port (default 22, Gitea often uses 221/222)
    GITEA_HTTP_PORT=3000                    # Gitea web/API port — used by gitea_ssh_setup.sh

# ==============================================================================================
# ── ORCHESTRATORS ─────────────────────────────────────────────────────────────────────────────
# ==============================================================================================
# All orchestrator job lists live here — edit arrays to add/remove scripts.
# No changes to orchestrator scripts needed when adding or removing jobs.
# Sections ordered by run frequency: array events first, then shortest interval to longest.

# ━━━ Array Start ━━━
# Scripts launched by array_started.sh when the array comes online.
# Launched in order — each as a background process.
# One-shot scripts (ramdisk, syslog, fpm, inotify, network) run and exit naturally.
# Continuous scripts (failover) run until array stops.
# Watchdogs (resource_watchdog, docker_watchdog, system_watchdog) are cronned via
# watchdog_orchestrator.sh — NOT launched here.
    ARRAY_START_SCRIPTS=(
        "Plugin/unraid/System_Essentials/unraid_api_key_renew.sh"   # re-register Varaverk API key — registry is ephemeral
        "System_Essentials/conf_sync.sh"              # pull partner confs + push own conf into /tmp/.vv/ RAM cache
        "Transcodes/ramdisk_setup.sh"                 # creates ramdisk + symlink before Emby starts


Bash

grep -n "AUTH\|NPM_URL\|NPM_EMAIL\|LLDAP_URL\|AUTHELIA_URL\|auth_url\|npm_url" /boot/config/plugins/varaverk/Configurations/host1.conf | head -20
echo "---"
grep -n "# ━━━ Auth\|AUTH_STACK\|Nginx Proxy Manager\|LLDAP\|NPM_URL\|NPM_EMAIL\|NPM_ADMIN" /boot/config/plugins/varaverk/Configurations/host1.conf | head -20

Check host1.conf for existing auth/npm/lldap vars


116:    HOST1_PARTNERSHIP_AUTH_WEBUIS=(
126:    HOST1_PARTNERSHIP_AUTH_STACK=(
361:    HOST1_NETWORK_WATCHDOG_NPM_URL="https://gmer4lfe.com"
770:# ── AUTH STACK ────────────────────────────────────────────────────────────────────────────────
778:    HOST1_NPM_URL="http://localhost:81"
783:    HOST1_LLDAP_URL="http://localhost:17170"
788:    HOST1_AUTHELIA_CONFIG="/mnt/user/appdata-Fallback/Critical-Data/Authelia/configuration.yml"
789:    HOST1_AUTHELIA_CONTAINER="Authelia"
---
126:    HOST1_PARTNERSHIP_AUTH_STACK=(
361:    HOST1_NETWORK_WATCHDOG_NPM_URL="https://gmer4lfe.com"
778:    HOST1_NPM_URL="http://localhost:81"
783:    HOST1_LLDAP_URL="http://localhost:17170"
784:    HOST1_LLDAP_USER="admin"                    # lldap admin username
785:    HOST1_LLDAP_PASS=""                         # lldap admin password
787:# ━━━ Authelia ━━━


770	# ── AUTH STACK ────────────────────────────────────────────────────────────────────────────────
771	# ==============================================================================================
772	# Credentials for the Varaverk Auth Stack page (NPM, lldap, Authelia).
773	# NPM:     Admin email + password from NginxProxyManager settings.
774	# lldap:   Admin username + password from lldap config.
775	# Authelia: Path to configuration.yml — same path both hosts (synced via critical-data rsync).
776
777	# ━━━ NginxProxyManager ━━━
778	    HOST1_NPM_URL="http://localhost:81"
779	    HOST1_NPM_USER=""                           # NPM admin email
780	    HOST1_NPM_PASS=""                           # NPM admin password
781
782	# ━━━ lldap ━━━
783	    HOST1_LLDAP_URL="http://localhost:17170"
784	    HOST1_LLDAP_USER="admin"                    # lldap admin username
785	    HOST1_LLDAP_PASS=""                         # lldap admin password
786
787	# ━━━ Authelia ━━━
788	    HOST1_AUTHELIA_CONFIG="/mnt/user/appdata-Fallback/Critical-Data/Authelia/configuration.yml"
789	    HOST1_AUTHELIA_CONTAINER="Authelia"
790
791	# ==============================================================================================
792	# ──────────────────────── End Of HOST1 Variables ──────────────────────────────────────────────
793	# ==============================================================================================
794

# ── AUTH STACK ────────────────────────────────────────────────────────────────────────────────
# ==============================================================================================
# Credentials for the Varaverk Auth Stack page (NPM, lldap, Authelia).
# NPM:     Admin email + password from NginxProxyManager settings.
# lldap:   Admin username + password from lldap config.
# Authelia: Path to configuration.yml — same path both hosts (synced via critical-data rsync).

# ━━━ NginxProxyManager ━━━
    HOST1_NPM_URL="http://localhost:81"
    HOST1_NPM_USER=""                           # NPM admin email
    HOST1_NPM_PASS=""                           # NPM admin password

# ━━━ lldap ━━━
    HOST1_LLDAP_URL="http://localhost:17170"
    HOST1_LLDAP_USER="admin"                    # lldap admin username
    HOST1_LLDAP_PASS=""                         # lldap admin password

# ━━━ Authelia ━━━
    HOST1_AUTHELIA_CONFIG="/mnt/user/appdata-Fallback/Critical-Data/Authelia/configuration.yml"
    HOST1_AUTHELIA_CONTAINER="Authelia"

# ==============================================================================================
# ──────────────────────── End Of HOST1 Variables ──────────────────────────────────────────────
# ==============================================================================================


o add them to master.conf in the auth stack section


The fields are already there, just empty. Filling them in:


Edit

    HOST1_NPM_USER=""                           # NPM admin email
    HOST1_NPM_PASS=""                           # NPM admin password

    HOST1_NPM_USER="failedproxy@gmail.com"       # NPM admin email
    HOST1_NPM_PASS="183134\$eanHess"            # NPM admin password


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

    HOST1_NPM_USER=""                           # NPM admin email
    HOST1_NPM_PASS=""                           # NPM admin password

    HOST1_NPM_USER="failedproxy@gmail.com"       # NPM admin email
    HOST1_NPM_PASS="183134\$eanHess"            # NPM admin password

-    HOST1_NPM_USER=""                           # NPM admin email

-    HOST1_NPM_PASS=""                           # NPM admin password

+    HOST1_NPM_USER="failedproxy@gmail.com"       # NPM admin email

+    HOST1_NPM_PASS="183134\$eanHess"            # NPM admin password

# ━━━ lldap ━━━


    HOST1_LLDAP_USER="admin"                    # lldap admin username
    HOST1_LLDAP_PASS=""                         # lldap admin password

    HOST1_LLDAP_USER="FailedProxy"               # lldap admin username
    HOST1_LLDAP_PASS="183134\$eanHess"          # lldap admin password


    HOST1_LLDAP_USER="admin"                    # lldap admin username
    HOST1_LLDAP_PASS=""                         # lldap admin password

    HOST1_LLDAP_USER="FailedProxy"               # lldap admin username
    HOST1_LLDAP_PASS="183134\$eanHess"          # lldap admin password

# ━━━ lldap ━━━

-    HOST1_LLDAP_USER="admin"                    # lldap admin username

-    HOST1_LLDAP_PASS=""                         # lldap admin password

+    HOST1_LLDAP_USER="FailedProxy"               # lldap admin username

+    HOST1_LLDAP_PASS="183134\$eanHess"          # lldap admin password


Bash

grep -A2 "HOST1_NPM_USER\|HOST1_LLDAP_USER" /boot/config/plugins/varaverk/Configurations/host1.conf

Verify written values


    HOST1_NPM_USER="failedproxy@gmail.com"       # NPM admin email
    HOST1_NPM_PASS="183134\$eanHess"            # NPM admin password

--
    HOST1_LLDAP_USER="FailedProxy"               # lldap admin username
    HOST1_LLDAP_PASS="183134\$eanHess"          # lldap admin password


Done. The `$` is escaped as `\$` so bash doesn't interpolate it when the conf is sourced.


NPM auth failed — check credentials in host conf


grep -n "NPM_USER\|NPM_PASS\|npm_login\|token\|Bearer\|Identity\|identity" /boot/config/plugins/varaverk/Plugin/unraid/api/auth.php | head -30
echo "---"
grep -n "NPM_USER\|NPM_PASS\|npm_login\|token\|Bearer" /boot/config/plugins/varaverk/Plugin/unraid/include/auth.php | head -30

Check how NPM credentials are read and used


---
11:        'npm_user'           => $v["{$host}_NPM_USER"]                 ?? '',
12:        'npm_pass'           => $v["{$host}_NPM_PASS"]                 ?? '',
24:function vv_npm_token(): string {
27:    $cached = $_SESSION['vv_npm_token']     ?? '';
28:    $expiry = $_SESSION['vv_npm_token_exp'] ?? 0;
31:    $resp  = vv_npm_raw('POST', '/api/tokens', [
36:    $token = $resp['token'] ?? '';
37:    if ($token) {
38:        $_SESSION['vv_npm_token']     = $token;
39:        $_SESSION['vv_npm_token_exp'] = time() + 82800;
41:    return $token;
44:function vv_npm_raw(string $method, string $path, array $data, string $token, array $conf = []): array {
48:    if ($token) $headers[] = 'Authorization: Bearer ' . $token;
65:    $token = vv_npm_token();
66:    if (!$token) return ['_err' => 'NPM auth failed — check credentials in host conf'];
67:    return vv_npm_raw($method, $path, $data, $token);
104:function vv_lldap_token(): string {
107:    $cached = $_SESSION['vv_lldap_token']     ?? '';
108:    $expiry = $_SESSION['vv_lldap_token_exp'] ?? 0;
122:    $token = $resp['token'] ?? '';
123:    if ($token) {
124:        $_SESSION['vv_lldap_token']     = $token;
125:        $_SESSION['vv_lldap_token_exp'] = time() + 3500;
127:    return $token;
132:    $token = vv_lldap_token();
133:    if (!$token) return ['errors' => [['message' => 'lldap auth failed — check credentials']]];
141:        CURLOPT_HTTPHEADER     => ['Content-Type: application/json', 'Authorization: Bearer ' . $token],


1	<?php
2	require_once __DIR__ . '/config.php';
3
4	// ── Config ────────────────────────────────────────────────────────────────────
5
6	function vv_auth_conf(): array {
7	    $v    = vv_conf_vars();
8	    $host = strtoupper(vv_detect_host());
9	    return [
10	        'npm_url'            => rtrim($v["{$host}_NPM_URL"]            ?? 'http://localhost:81', '/'),
11	        'npm_user'           => $v["{$host}_NPM_USER"]                 ?? '',
12	        'npm_pass'           => $v["{$host}_NPM_PASS"]                 ?? '',
13	        'lldap_url'          => rtrim($v["{$host}_LLDAP_URL"]          ?? 'http://localhost:17170', '/'),
14	        'lldap_user'         => $v["{$host}_LLDAP_USER"]               ?? '',
15	        'lldap_pass'         => $v["{$host}_LLDAP_PASS"]               ?? '',
16	        'authelia_config'    => $v["{$host}_AUTHELIA_CONFIG"]          ?? '/mnt/user/appdata-Fallback/Critical-Data/Authelia/configuration.yml',
17	        'authelia_container' => $v["{$host}_AUTHELIA_CONTAINER"]       ?? 'Authelia',
18	        'is_owner'           => vv_is_owner(),
19	    ];
20	}
21
22	// ── NPM ───────────────────────────────────────────────────────────────────────
23
24	function vv_npm_token(): string {
25	    if (!session_id()) session_start();
26	    $conf   = vv_auth_conf();
27	    $cached = $_SESSION['vv_npm_token']     ?? '';
28	    $expiry = $_SESSION['vv_npm_token_exp'] ?? 0;
29	    if ($cached && time() < $expiry) return $cached;
30
31	    $resp  = vv_npm_raw('POST', '/api/tokens', [
32	        'identity' => $conf['npm_user'],
33	        'secret'   => $conf['npm_pass'],
34	        'expiry'   => '1d',
35	    ], '', $conf);
36	    $token = $resp['token'] ?? '';
37	    if ($token) {
38	        $_SESSION['vv_npm_token']     = $token;
39	        $_SESSION['vv_npm_token_exp'] = time() + 82800;
40	    }
41	    return $token;
42	}
43
44	function vv_npm_raw(string $method, string $path, array $data, string $token, array $conf = []): array {
45	    if (!$conf) $conf = vv_auth_conf();
46	    $url     = $conf['npm_url'] . $path;
47	    $headers = ['Content-Type: application/json', 'Accept: application/json'];
48	    if ($token) $headers[] = 'Authorization: Bearer ' . $token;
49
50	    $ch = curl_init($url);
51	    curl_setopt_array($ch, [
52	        CURLOPT_RETURNTRANSFER => true,
53	        CURLOPT_TIMEOUT        => 10,
54	        CURLOPT_HTTPHEADER     => $headers,
55	        CURLOPT_CUSTOMREQUEST  => $method,
56	    ]);
57	    if ($data && in_array($method, ['POST', 'PUT'], true))
58	        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
59	    $body = curl_exec($ch);
60	    curl_close($ch);
61	    return json_decode($body ?: '{}', true) ?: [];
62	}
63
64	function vv_npm_req(string $method, string $path, array $data = []): array {
65	    $token = vv_npm_token();
66	    if (!$token) return ['_err' => 'NPM auth failed — check credentials in host conf'];
67	    return vv_npm_raw($method, $path, $data, $token);
68	}
69
70	function vv_npm_list_proxies(): array {

<?php
require_once __DIR__ . '/config.php';

// ── Config ────────────────────────────────────────────────────────────────────

function vv_auth_conf(): array {
    $v    = vv_conf_vars();
    $host = strtoupper(vv_detect_host());
    return [
        'npm_url'            => rtrim($v["{$host}_NPM_URL"]            ?? 'http://localhost:81', '/'),
        'npm_user'           => $v["{$host}_NPM_USER"]                 ?? '',
        'npm_pass'           => $v["{$host}_NPM_PASS"]                 ?? '',
        'lldap_url'          => rtrim($v["{$host}_LLDAP_URL"]          ?? 'http://localhost:17170', '/'),
        'lldap_user'         => $v["{$host}_LLDAP_USER"]               ?? '',
        'lldap_pass'         => $v["{$host}_LLDAP_PASS"]               ?? '',
        'authelia_config'    => $v["{$host}_AUTHELIA_CONFIG"]          ?? '/mnt/user/appdata-Fallback/Critical-Data/Authelia/configuration.yml',
        'authelia_container' => $v["{$host}_AUTHELIA_CONTAINER"]       ?? 'Authelia',
        'is_owner'           => vv_is_owner(),
    ];
}

// ── NPM ───────────────────────────────────────────────────────────────────────

function vv_npm_token(): string {
    if (!session_id()) session_start();
    $conf   = vv_auth_conf();
    $cached = $_SESSION['vv_npm_token']     ?? '';
    $expiry = $_SESSION['vv_npm_token_exp'] ?? 0;
    if ($cached && time() < $expiry) return $cached;

    $resp  = vv_npm_raw('POST', '/api/tokens', [
        'identity' => $conf['npm_user'],
        'secret'   => $conf['npm_pass'],
        'expiry'   => '1d',
    ], '', $conf);
    $token = $resp['token'] ?? '';
    if ($token) {
        $_SESSION['vv_npm_token']     = $token;
        $_SESSION['vv_npm_token_exp'] = time() + 82800;
    }
    return $token;
}

function vv_npm_raw(string $method, string $path, array $data, string $token, array $conf = []): array {
    if (!$conf) $conf = vv_auth_conf();
    $url     = $conf['npm_url'] . $path;
    $headers = ['Content-Type: application/json', 'Accept: application/json'];
    if ($token) $headers[] = 'Authorization: Bearer ' . $token;

    $ch = curl_init($url);
    curl_setopt_array($ch, [
        CURLOPT_RETURNTRANSFER => true,
        CURLOPT_TIMEOUT        => 10,
        CURLOPT_HTTPHEADER     => $headers,
        CURLOPT_CUSTOMREQUEST  => $method,
    ]);
    if ($data && in_array($method, ['POST', 'PUT'], true))
        curl_setopt($ch, CURLOPT_POSTFIELDS, json_encode($data));
    $body = curl_exec($ch);
    curl_close($ch);
    return json_decode($body ?: '{}', true) ?: [];
}

function vv_npm_req(string $method, string $path, array $data = []): array {
    $token = vv_npm_token();
    if (!$token) return ['_err' => 'NPM auth failed — check credentials in host conf'];
    return vv_npm_raw($method, $path, $data, $token);
}

function vv_npm_list_proxies(): array {


The issue is likely how PHP parses the escaped `\$` from the conf file. Let me check what `vv_conf_vars()` actually reads:


php -r "
\$_vv_cfg = ['SCRIPTS_DIR' => '/boot/config/plugins/varaverk'];
require '/boot/config/plugins/varaverk/Plugin/unraid/include/config.php';
\$v = vv_conf_vars();
echo 'NPM_USER: [' . \$v['HOST1_NPM_USER'] . ']' . PHP_EOL;
echo 'NPM_PASS: [' . \$v['HOST1_NPM_PASS'] . ']' . PHP_EOL;
echo 'LLDAP_USER: [' . \$v['HOST1_LLDAP_USER'] . ']' . PHP_EOL;
echo 'LLDAP_PASS: [' . \$v['HOST1_LLDAP_PASS'] . ']' . PHP_EOL;
" 2>&1

Check what PHP reads from conf for NPM/LLDAP credentials


NPM_USER: [failedproxy@gmail.com]
NPM_PASS: [183134\$eanHess]
LLDAP_USER: [FailedProxy]
LLDAP_PASS: [183134\$eanHess]


PHP reads `\$` literally while bash would interpret it as `$`. Let me check the conf parser:


grep -n "vv_conf_vars\|vv_parse_conf_scalar\|parse_conf\|preg_match" /boot/config/plugins/varaverk/Plugin/unraid/include/config.php | head -30

Find conf parsing functions


41:    $vars     = vv_conf_vars();
46:    preg_match_all('/^\s*(HOST\d+)(?:_NAME)?\s*=\s*["\']?(\S+?)["\']?\s*$/m', $master, $m);
72:    $vars     = vv_conf_vars();
78:    preg_match_all('/^\s*(HOST\d+)(?:_NAME)?\s*=\s*["\']?(\S+?)["\']?\s*$/m', $master, $m);
150:    preg_match_all('/^\s*(HOST\d+)(?:_NAME)?\s*=\s*["\']?(\S+?)["\']?\s*$/m', $master, $m);
182:    } elseif (preg_match('/^host(\d+)$/', $host)) {
195:function vv_conf_vars(): array {
199:    if (preg_match('/^host\d+$/', $host)) $files[] = $host . '.conf';
204:        preg_match_all('/^\s*([A-Z0-9_]+)\s*=\s*["\']?([^"\'#\n]*?)["\']?\s*(?:#.*)?$/m', $raw, $m);
215:// since vv_conf_vars() only loads the current host's conf file).
219:    $vars = vv_conf_vars();
328:function vv_parse_conf_scalar(string $raw, string $key): string {
329:    return preg_match('/^\s*' . preg_quote($key, '/') . '\s*=\s*"?([^"\n]*)"?/m', $raw, $m)
349:    $vars  = vv_conf_vars();
352:        if (preg_match('/^HOST(\d+)$/', $k, $m) && $v !== '') {


195	function vv_conf_vars(): array {
196	    $vars = [];
197	    $files = ['master.conf'];
198	    $host  = vv_detect_host();
199	    if (preg_match('/^host\d+$/', $host)) $files[] = $host . '.conf';
200
201	    foreach ($files as $f) {
202	        $raw = vv_read_conf_raw($f);
203	        // Match: VAR_NAME="value" or VAR_NAME=value (no quotes)
204	        preg_match_all('/^\s*([A-Z0-9_]+)\s*=\s*["\']?([^"\'#\n]*?)["\']?\s*(?:#.*)?$/m', $raw, $m);
205	        foreach ($m[1] as $i => $key) {
206	            $vars[$key] = trim($m[2][$i]);
207	        }
208	    }
209	    return $vars;
210	}
211
212	// Query the Unraid GraphQL API for a given host.
213	// For the local host queries http://localhost/graphql; for remote hosts uses the Tailscale IP.
214	// $apiKey may be passed explicitly (needed when querying a remote host from the local host,

function vv_conf_vars(): array {
    $vars = [];
    $files = ['master.conf'];
    $host  = vv_detect_host();
    if (preg_match('/^host\d+$/', $host)) $files[] = $host . '.conf';

    foreach ($files as $f) {
        $raw = vv_read_conf_raw($f);
        // Match: VAR_NAME="value" or VAR_NAME=value (no quotes)
        preg_match_all('/^\s*([A-Z0-9_]+)\s*=\s*["\']?([^"\'#\n]*?)["\']?\s*(?:#.*)?$/m', $raw, $m);
        foreach ($m[1] as $i => $key) {
            $vars[$key] = trim($m[2][$i]);
        }
    }
    return $vars;
}

// Query the Unraid GraphQL API for a given host.
// For the local host queries http://localhost/graphql; for remote hosts uses the Tailscale IP.
// $apiKey may be passed explicitly (needed when querying a remote host from the local host,


The regex captures `\$` literally. PHP needs to unescape bash's `\$` → `$` after extraction. Fix it in `vv_conf_vars()`:


The file /boot/config/plugins/varaverk/Plugin/unraid/include/config.php has been updated successfully. (file state is current in your context — no need to Read it back)

// Match: VAR_NAME="value" or VAR_NAME=value (no quotes)


php -r "
\$_vv_cfg = ['SCRIPTS_DIR' => '/boot/config/plugins/varaverk'];
require '/boot/config/plugins/varaverk/Plugin/unraid/include/config.php';
\$v = vv_conf_vars();
echo 'NPM_USER: [' . \$v['HOST1_NPM_USER'] . ']' . PHP_EOL;
echo 'NPM_PASS: [' . \$v['HOST1_NPM_PASS'] . ']' . PHP_EOL;
echo 'LLDAP_USER: [' . \$v['HOST1_LLDAP_USER'] . ']' . PHP_EOL;
echo 'LLDAP_PASS: [' . \$v['HOST1_LLDAP_PASS'] . ']' . PHP_EOL;
" 2>&1

Verify credentials now parse correctly


NPM_USER: [failedproxy@gmail.com]
NPM_PASS: [183134$eanHess]
LLDAP_USER: [FailedProxy]
LLDAP_PASS: [183134$eanHess]


Both passwords now parse as `183134$eanHess`. The `\$` in the conf is correct for bash (prevents variable expansion when sourced), and PHP now strips the backslash after reading.


push everything. im going to be


Check git status and diff


On branch main
Your branch is up to date with 'origin/main'.

You are in a sparse checkout with 100% of tracked files present.

Changes not staged for commit:
  (use "git add/rm <file>..." to update what will be committed)
  (use "git restore <file>..." to discard changes in working directory)
	modified:   Deployment/conf_templates/master.conf
	modified:   Monitors/cert_monitor.sh
	modified:   Partnership/README-Partnership.md
	modified:   Partnership/partnership_manager.sh
	modified:   Partnership/partnership_offboard.sh
	modified:   Partnership/partnership_onboard.sh
	modified:   Partnership/ssh_setup.sh
	modified:   Plugin/unraid/Varaverk.page
	modified:   Plugin/unraid/api/api_test.php
	modified:   Plugin/unraid/api/arrs.php
	modified:   Plugin/unraid/api/create_api_key.php
	modified:   Plugin/unraid/api/recent.php
	modified:   Plugin/unraid/api/settings.php
	modified:   Plugin/unraid/api/setup.php
	modified:   Plugin/unraid/api/storage.php
	modified:   Plugin/unraid/api/system.php
	modified:   Plugin/unraid/css/varaverk.css
	modified:   Plugin/unraid/include/arrs.php
	modified:   Plugin/unraid/include/common.php
	modified:   Plugin/unraid/include/confform.php
	modified:   Plugin/unraid/include/config.php
	modified:   Plugin/unraid/include/scheduler.php
	modified:   Plugin/unraid/js/varaverk.js
	modified:   Plugin/unraid/pages/auth.php
	modified:   Plugin/unraid/pages/scheduler.php
	modified:   Plugin/unraid/pages/setup.php
	deleted:    Plugin/unraid/tools/api_cache_writer.php
	deleted:    Plugin/unraid/tools/api_cache_writer.sh
	deleted:    Plugin/unraid/tools/conf_populate.sh
	deleted:    Plugin/unraid/tools/remote_arr_cache_writer.sh
	deleted:    Plugin/unraid/tools/storage_migrate.sh
	deleted:    System_Essentials/mover_stop.sh
	deleted:    System_Essentials/php_fpm_max_children.sh
	deleted:    System_Essentials/unraid_api_key_renew.sh
	deleted:    System_Essentials/user_scripts_stop.sh
	deleted:    Tools/recreate_shares.sh
	deleted:    Watchdogs/System/webgui_watchdog.sh
	modified:   git_pull_execute.sh
	modified:   load_config.sh
	deleted:    user_script_plug-in.sh

Untracked files:
  (use "git add <file>..." to include in what will be committed)
	Plugin/unraid/Partnership/
	Plugin/unraid/System_Essentials/
	Plugin/unraid/Tools/
	Plugin/unraid/Watchdogs/
	Plugin/unraid/api/cert.php
	Plugin/unraid/api/checklist.php
	Plugin/unraid/user_script_plug-in.sh

no changes added to commit (use "git add" and/or "git commit -a")
 Deployment/conf_templates/master.conf          |    8 +-
 Monitors/cert_monitor.sh                       |   27 +-
 Partnership/README-Partnership.md              |    1 -
 Partnership/partnership_manager.sh             |  254 +----
 Partnership/partnership_offboard.sh            |  164 +--
 Partnership/partnership_onboard.sh             |  279 +----
 Partnership/ssh_setup.sh                       |   24 +-
 Plugin/unraid/Varaverk.page                    |   15 +-
 Plugin/unraid/api/api_test.php                 |    2 +-
 Plugin/unraid/api/arrs.php                     |    2 +-
 Plugin/unraid/api/create_api_key.php           |   74 +-
 Plugin/unraid/api/recent.php                   |    3 +-
 Plugin/unraid/api/settings.php                 |    3 +-
 Plugin/unraid/api/setup.php                    |  120 +-
 Plugin/unraid/api/storage.php                  |    4 +-
 Plugin/unraid/api/system.php                   |    2 +-
 Plugin/unraid/css/varaverk.css                 |   17 +-
 Plugin/unraid/include/arrs.php                 |  142 ++-
 Plugin/unraid/include/common.php               |   12 +-
 Plugin/unraid/include/confform.php             |    2 +-
 Plugin/unraid/include/config.php               |   41 +-
 Plugin/unraid/include/scheduler.php            |  104 +-
 Plugin/unraid/js/varaverk.js                   |   21 +
 Plugin/unraid/pages/auth.php                   |  106 +-
 Plugin/unraid/pages/scheduler.php              |    2 +-
 Plugin/unraid/pages/setup.php                  |  598 +++++-----
 Plugin/unraid/tools/api_cache_writer.php       |   56 -
 Plugin/unraid/tools/api_cache_writer.sh        |   18 -
 Plugin/unraid/tools/conf_populate.sh           |  229 ----
 Plugin/unraid/tools/remote_arr_cache_writer.sh |  142 ---
 Plugin/unraid/tools/storage_migrate.sh         |  329 ------
 System_Essentials/mover_stop.sh                |  195 ----
 System_Essentials/php_fpm_max_children.sh      |  247 ----
 System_Essentials/unraid_api_key_renew.sh      |  153 ---
 System_Essentials/user_scripts_stop.sh         |  256 -----
 Tools/recreate_shares.sh                       |  299 -----
 Watchdogs/System/webgui_watchdog.sh            |  305 -----
 git_pull_execute.sh                            |    5 +-
 load_config.sh                                 |    8 +
 user_script_plug-in.sh                         | 1457 ------------------------
 40 files changed, 935 insertions(+), 4791 deletions(-)


git add -A && git commit -m "$(cat <<'EOF'
Auth stack certs tab, arrs db fallbacks, cert monitor cache, conf parser fix

- Auth stack: fold cert monitor into Auth Stack page as fourth tab (Certs);
  remove standalone cert page and top-level tab
- cert_monitor.sh: write JSON status cache to State_Files/cert_status.json
  after each run; expose per-domain days/expiry via _CERT_DAYS/_CERT_EXPIRY globals
- api/cert.php: new — serves cached cert status; falls back to configured
  domains as UNKN when no cache exists; POST action=run triggers live check
- arrs db fallbacks: vv_arr_cleanup_stats/discovery_stats/recovery_stats now
  read from data/*.db files when log JSON files don't yet exist
- config.php vv_conf_vars(): unescape bash \$ → $ so passwords with dollar
  signs read correctly from conf files
- host1.conf: fill in HOST1_NPM_USER/PASS and HOST1_LLDAP_USER/PASS
- Partnership adapter pattern: Unraid-specific container logic extracted to
  Plugin/unraid/Partnership/; platform-agnostic structure stays in Partnership/
- First-run wizard: uniform multi-step flow for all hosts; HOST2 pull moved
  to checklist; auto SSH keygen and API key creation on save
- api/checklist.php: live setup checklist with pull_master action
- Fullscreen toggle: hide Unraid header/menu; state persists via localStorage
EOF
)"

Stage all changes and commit


[main 9c3ace9] Auth stack certs tab, arrs db fallbacks, cert monitor cache, conf parser fix
 43 files changed, 1594 insertions(+), 1156 deletions(-)
 create mode 100755 Plugin/unraid/Partnership/containers.sh
 rename {System_Essentials => Plugin/unraid/System_Essentials}/mover_stop.sh (99%)
 rename {System_Essentials => Plugin/unraid/System_Essentials}/php_fpm_max_children.sh (99%)
 rename {System_Essentials => Plugin/unraid/System_Essentials}/unraid_api_key_renew.sh (99%)
 rename {System_Essentials => Plugin/unraid/System_Essentials}/user_scripts_stop.sh (99%)
 rename Plugin/unraid/{tools => Tools}/api_cache_writer.php (98%)
 rename Plugin/unraid/{tools => Tools}/api_cache_writer.sh (100%)
 rename Plugin/unraid/{tools => Tools}/conf_populate.sh (61%)
 rename {Tools => Plugin/unraid/Tools}/recreate_shares.sh (99%)
 rename Plugin/unraid/{tools => Tools}/remote_arr_cache_writer.sh (97%)
 rename Plugin/unraid/{tools => Tools}/storage_migrate.sh (99%)
 rename {Watchdogs => Plugin/unraid/Watchdogs}/System/webgui_watchdog.sh (99%)
 create mode 100644 Plugin/unraid/api/cert.php
 create mode 100644 Plugin/unraid/api/checklist.php
 rename user_script_plug-in.sh => Plugin/unraid/user_script_plug-in.sh (98%)


Push to remote


remote: . Processing 1 references
remote: Processed 1 references in total
To ssh://192.168.50.2:221/FailedProxy/Varaverk.git
   17012bc..9c3ace9  main -> main


Pushed. 43 files, one clean commit. Enjoy your break.


Arrs and cert monitor UI work is complete and pushed. Next up: verify the Auth Stack Certs tab works end-to-end by clicking Run Now in the browser. (disable recaps in /config)