Skip to content

armgit / Pulse

Public Imported from GitHub
0

Real-time monitoring dashboard for Proxmox VE, PBS, Docker, Kubernetes, TrueNAS and vSphere. Self-hosted, with alerts for failed backups, full disks, unhealthy containers and offline nodes.

Keep installation quick starts on bootstrap authentication

pulse-triage[bot]200ce831a859
diff --git a/docs/INSTALL.md b/docs/INSTALL.md
index 7b0d724b83..70e326c93e 100644
--- a/docs/INSTALL.md
+++ b/docs/INSTALL.md
@@ -107,6 +107,9 @@ docker run -d \
rcourtman/pulse:vX.Y.Z
```
+For a new container, continue with [bootstrap-token setup](#step-1-get-the-token)
+in your browser; do not add an example password to the command.
+
### Docker Compose
Create a `docker-compose.yml` file:
@@ -122,8 +125,6 @@ services:
- pulse_data:/data
environment:
- PULSE_DEPLOYMENT_METHOD=docker_compose
- - PULSE_AUTH_USER=admin
- - PULSE_AUTH_PASS=secret123
volumes:
pulse_data:
@@ -134,7 +135,22 @@ to the private Pulse Pro image shown on
<https://pulserelay.pro/download.html> without rebuilding the file around a
second deployment path.
-> **Note**: Plain text passwords set via `PULSE_AUTH_PASS` are auto-hashed on startup. For production, prefer Quick Security Setup or a pre-hashed bcrypt value.
+Leave authentication overrides unset for a new install and complete
+[bootstrap-token setup](#step-1-get-the-token) in your browser. Do not deploy a
+shared example password. If automation must skip setup, use a private
+deployment-managed credential source. The
+[authentication guide](CONFIGURATION.md#private-docker-authentication-file)
+explains the visibility and override limits; its `docker run --env-file`
+example is not a Compose interpolation recipe.
+
+For an existing installation, preserve its image, data mounts and managed
+configuration; do not reset authentication to repeat first-time setup. If you
+used a shared example password, replace it in your deployment's credential
+source. A deployment-supplied password takes precedence over changes made in
+Pulse's password-change UI. Hashing it inside Pulse does not remove the
+original value from Docker's environment or your deployment file. Never share
+full `docker inspect` or resolved Compose output.
+
> **Note**: Docker monitoring requires the unified agent on the Docker host with socket access; the Pulse server container does not need `/var/run/docker.sock`. See [UNIFIED_AGENT.md](UNIFIED_AGENT.md).
---
diff --git a/frontend-modern/browser-tests/installation-bootstrap-help.cjs b/frontend-modern/browser-tests/installation-bootstrap-help.cjs
new file mode 100644
index 0000000000..436985c69a
--- /dev/null
+++ b/frontend-modern/browser-tests/installation-bootstrap-help.cjs
@@ -0,0 +1,94 @@
+// Exercise the Installation Guide in the production Docs/router/Markdown/CSS.
+// This checks rendered instructions and navigation, not native Docker startup.
+const assert = require('node:assert/strict');
+const fs = require('node:fs');
+const path = require('node:path');
+const { chromium, webkit } = require('playwright');
+
+(async () => {
+ const root = path.resolve('frontend-modern');
+ const artifacts = path.join(root, 'node_modules', 'installation-bootstrap-browser');
+ fs.mkdirSync(artifacts, { recursive: true });
+ process.chdir(root);
+ const { createServer } = await import(path.join(root, 'node_modules/vite/dist/node/index.js'));
+ const server = await createServer({
+ root, configFile: path.join(root, 'vite.config.ts'),
+ cacheDir: path.join(root, 'node_modules', '.vite-installation-bootstrap'),
+ server: { host: '127.0.0.1', port: 5250, strictPort: true },
+ optimizeDeps: { noDiscovery: true, include: [] },
+ });
+ const results = [];
+ let browser;
+ try {
+ await server.listen();
+ for (const [engine, width, tone] of [['chromium', 1280, 'light'], ['webkit', 390, 'dark']]) {
+ browser = await { chromium, webkit }[engine].launch(engine === 'chromium'
+ ? { headless: true, channel: 'chromium', args: ['--no-sandbox'] }
+ : { headless: true });
+ const page = await browser.newPage({ viewport: { width, height: 1000 },
+ ...(engine === 'webkit' ? { isMobile: true, hasTouch: true } : {}) });
+ const errors = [];
+ page.on('pageerror', (error) => errors.push(error.message));
+ page.on('console', (message) => { if (message.type() === 'error') errors.push(message.text()); });
+ await page.goto('http://127.0.0.1:5250/browser-tests/docs-fragment-navigation.html',
+ { waitUntil: 'domcontentloaded', timeout: 60_000 });
+ if (tone === 'dark') await page.evaluate(() => document.documentElement.classList.add('dark'));
+ await page.getByRole('link', { name: '← All documentation' }).click();
+ const installLink = page.getByRole('link', { name: 'Install Pulse', exact: true });
+ await installLink.focus();
+ await page.keyboard.press('Enter');
+ await page.getByRole('heading', { name: 'Docker Compose', exact: true }).waitFor();
+ const text = await page.locator('article').innerText();
+ for (const phrase of ['Leave authentication overrides unset for a new install',
+ 'do not reset authentication', 'deployment-supplied password takes precedence',
+ 'not a Compose interpolation recipe', 'Never share full docker inspect'])
+ assert.ok(text.includes(phrase), phrase);
+ assert.ok(!text.includes('secret123'));
+ const compose = page.locator('pre').filter({ hasText: 'services:' }).first();
+ const code = await compose.innerText();
+ for (const phrase of ['${PULSE_IMAGE:-rcourtman/pulse:vX.Y.Z}',
+ 'pulse_data:/data', 'PULSE_DEPLOYMENT_METHOD=docker_compose'])
+ assert.ok(code.includes(phrase), phrase);
+ assert.ok(!code.includes('PULSE_AUTH_'));
+ await compose.scrollIntoViewIfNeeded();
+ assert.ok(await page.evaluate(() => document.documentElement.scrollWidth <= innerWidth + 1));
+ await page.screenshot({ path: path.join(artifacts, `${engine}-compose.png`) });
+ const warning = page.getByText('For an existing installation, preserve its image', { exact: false });
+ await warning.scrollIntoViewIfNeeded();
+ await page.screenshot({ path: path.join(artifacts, `${engine}-existing-install.png`) });
+
+ const bootstrap = page.getByRole('link', { name: 'bootstrap-token setup', exact: true }).last();
+ await bootstrap.focus();
+ await page.keyboard.press('Enter');
+ await page.waitForFunction(() => {
+ const h = document.getElementById('step-1-get-the-token');
+ return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;
+ });
+ assert.ok(page.url().endsWith('/docs/INSTALL#step-1-get-the-token'));
+ assert.ok((await page.locator('article').innerText()).includes('docker exec pulse /app/pulse bootstrap-token'));
+ await page.screenshot({ path: path.join(artifacts, `${engine}-bootstrap.png`) });
+ const auth = page.getByRole('link', { name: 'authentication guide', exact: true });
+ await auth.focus();
+ await page.keyboard.press('Enter');
+ await page.waitForFunction(() => {
+ const h = document.getElementById('private-docker-authentication-file');
+ return h && h.getBoundingClientRect().top >= 0 && h.getBoundingClientRect().top < innerHeight;
+ });
+ assert.ok(page.url().endsWith('/docs/CONFIGURATION#private-docker-authentication-file'));
+ assert.ok((await page.locator('article').innerText()).includes('not out of Docker\'s container environment'));
+ assert.deepEqual(errors, []);
+ results.push({ engine, version: browser.version(), width, tone,
+ noSharedComposeCredentials: true, paidImageAndDataPreserved: true,
+ existingInstallWarning: true, keyboardBootstrapAndPrivateFileLinks: true, errors });
+ await browser.close();
+ browser = undefined;
+ }
+ const result = { result: 'passed', playwright: require('playwright/package.json').version,
+ scope: 'rendered installation guidance and links; not native Docker or password changes', results };
+ fs.writeFileSync(path.join(artifacts, 'result.json'), JSON.stringify(result, null, 2) + '\n');
+ console.log(JSON.stringify(result));
+ } finally {
+ if (browser) await browser.close();
+ await server.close();
+ }
+})().catch((error) => { console.error(error); process.exitCode = 1; });
diff --git a/frontend-modern/public/docs/INSTALL.md b/frontend-modern/public/docs/INSTALL.md
index 7b0d724b83..70e326c93e 100644
--- a/frontend-modern/public/docs/INSTALL.md
+++ b/frontend-modern/public/docs/INSTALL.md
@@ -107,6 +107,9 @@ docker run -d \
rcourtman/pulse:vX.Y.Z
```
+For a new container, continue with [bootstrap-token setup](#step-1-get-the-token)
+in your browser; do not add an example password to the command.
+
### Docker Compose
Create a `docker-compose.yml` file:
@@ -122,8 +125,6 @@ services:
- pulse_data:/data
environment:
- PULSE_DEPLOYMENT_METHOD=docker_compose
- - PULSE_AUTH_USER=admin
- - PULSE_AUTH_PASS=secret123
volumes:
pulse_data:
@@ -134,7 +135,22 @@ to the private Pulse Pro image shown on
<https://pulserelay.pro/download.html> without rebuilding the file around a
second deployment path.
-> **Note**: Plain text passwords set via `PULSE_AUTH_PASS` are auto-hashed on startup. For production, prefer Quick Security Setup or a pre-hashed bcrypt value.
+Leave authentication overrides unset for a new install and complete
+[bootstrap-token setup](#step-1-get-the-token) in your browser. Do not deploy a
+shared example password. If automation must skip setup, use a private
+deployment-managed credential source. The
+[authentication guide](CONFIGURATION.md#private-docker-authentication-file)
+explains the visibility and override limits; its `docker run --env-file`
+example is not a Compose interpolation recipe.
+
+For an existing installation, preserve its image, data mounts and managed
+configuration; do not reset authentication to repeat first-time setup. If you
+used a shared example password, replace it in your deployment's credential
+source. A deployment-supplied password takes precedence over changes made in
+Pulse's password-change UI. Hashing it inside Pulse does not remove the
+original value from Docker's environment or your deployment file. Never share
+full `docker inspect` or resolved Compose output.
+
> **Note**: Docker monitoring requires the unified agent on the Docker host with socket access; the Pulse server container does not need `/var/run/docker.sock`. See [UNIFIED_AGENT.md](UNIFIED_AGENT.md).
---
diff --git a/scripts/tests/test_configuration_auth_docs.py b/scripts/tests/test_configuration_auth_docs.py
index ab4972bd72..cbc44aa3ec 100644
--- a/scripts/tests/test_configuration_auth_docs.py
+++ b/scripts/tests/test_configuration_auth_docs.py
@@ -18,7 +18,7 @@ import unittest
ROOT = Path(__file__).resolve().parents[2]
-GUIDES = ("CONFIGURATION.md", "DOCKER.md", "i18n/de/README.md", "i18n/es/README.md")
+GUIDES = ("CONFIGURATION.md", "INSTALL.md", "DOCKER.md", "i18n/de/README.md", "i18n/es/README.md")
HASH = "$2a$12$" + "a" * 53 # Synthetic file/argv sentinel, not a real password.
CONTENT = f"PULSE_AUTH_USER=admin\nPULSE_AUTH_PASS={HASH}\n"
@@ -99,6 +99,21 @@ class ConfigurationAuthDocsTest(unittest.TestCase):
"this new-container example is not an upgrade procedure"):
self.assertIn(expected, text)
+ def test_install_quick_start_preserves_data_and_bootstrap_route(self):
+ text = (ROOT / "docs/INSTALL.md").read_text(encoding="utf-8")
+ compose = next(block for block in re.findall(r"```yaml\n(.*?)```", text, re.S)
+ if "services:" in block)
+ for expected in ("image: ${PULSE_IMAGE:-rcourtman/pulse:vX.Y.Z}",
+ "pulse_data:/data", "PULSE_DEPLOYMENT_METHOD=docker_compose"):
+ self.assertIn(expected, compose)
+ self.assertNotRegex(compose, r"PULSE_AUTH_(?:USER|PASS)")
+ for expected in ("[bootstrap-token setup](#step-1-get-the-token)",
+ "[authentication guide](CONFIGURATION.md#private-docker-authentication-file)",
+ "Leave authentication overrides unset for a new install",
+ "not a Compose interpolation recipe", "do not reset authentication",
+ "deployment-supplied password takes precedence"):
+ self.assertIn(expected, text)
+
def test_preparation_preserves_existing_file_and_protects_both_paths(self):
for existing in (False, True):
with self.subTest(existing=existing), tempfile.TemporaryDirectory(prefix="auth docs ") as temp: