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.
Go aialertsdashboarddockerdocker-monitoringgohomelabinfrastructure-monitoringkubernetesmonitoringmspproxmoxproxmox-backup-serverproxmox-mail-gatewayproxmox-veself-hostedtruenastypescriptvspherewebhooks
Fix first-run bootstrap token guidance
rcourtmanfae27b3a8fb7
diff --git a/docs/INSTALL.md b/docs/INSTALL.mdindex b7bd6a23a0..88a970d935 100644--- a/docs/INSTALL.md+++ b/docs/INSTALL.md@@ -119,9 +119,11 @@ Pulse is secure by default. On first launch, you must retrieve a **Bootstrap Tok| Platform | Command ||----------|---------|-| **Docker** | `docker exec pulse cat /data/.bootstrap_token` or `docker exec pulse /app/pulse bootstrap-token` |-| **Kubernetes** | `kubectl exec -it <pod> -- cat /data/.bootstrap_token` or `kubectl exec -it <pod> -- /app/pulse bootstrap-token` |-| **Systemd** | `sudo cat /etc/pulse/.bootstrap_token` or `sudo pulse bootstrap-token` |+| **Docker** | `docker exec pulse /app/pulse bootstrap-token` |+| **Kubernetes** | `kubectl exec -it <pod> -- /app/pulse bootstrap-token` |+| **Systemd** | `sudo pulse bootstrap-token` |++> **Important**: Paste the token string printed by the command above. Do not paste the raw `.bootstrap_token` file contents directly. In v6 that file may contain an encrypted JSON snapshot rather than the usable setup token.### Step 2: Create Admin Account1. Open `http://<your-ip>:7655`diff --git a/docs/release-control/v6/internal/subsystems/registry.json b/docs/release-control/v6/internal/subsystems/registry.jsonindex 0560f55ad6..adf74687b4 100644--- a/docs/release-control/v6/internal/subsystems/registry.json+++ b/docs/release-control/v6/internal/subsystems/registry.json@@ -3163,13 +3163,15 @@"match_prefixes": [],"match_files": ["frontend-modern/src/components/SetupWizard/SetupCompletionPreview.tsx",- "frontend-modern/src/components/SetupWizard/SetupWizard.tsx"+ "frontend-modern/src/components/SetupWizard/SetupWizard.tsx",+ "frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx"],"allow_same_subsystem_tests": false,"test_prefixes": [],"exact_files": ["frontend-modern/src/components/SetupWizard/__tests__/SetupCompletionPreview.test.tsx",- "frontend-modern/src/components/SetupWizard/__tests__/SetupWizard.test.tsx"+ "frontend-modern/src/components/SetupWizard/__tests__/SetupWizard.test.tsx",+ "frontend-modern/src/components/SetupWizard/__tests__/WelcomeStep.test.tsx"]},{diff --git a/frontend-modern/src/components/SetupWizard/__tests__/WelcomeStep.test.tsx b/frontend-modern/src/components/SetupWizard/__tests__/WelcomeStep.test.tsxindex 2432a3f0e4..cf34e224a0 100644--- a/frontend-modern/src/components/SetupWizard/__tests__/WelcomeStep.test.tsx+++ b/frontend-modern/src/components/SetupWizard/__tests__/WelcomeStep.test.tsx@@ -1,5 +1,5 @@import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest';-import { cleanup, render, screen, waitFor } from '@solidjs/testing-library';+import { cleanup, fireEvent, render, screen, waitFor } from '@solidjs/testing-library';import { WelcomeStep } from '../steps/WelcomeStep';const apiFetchMock = vi.fn();@@ -69,7 +69,7 @@ describe('WelcomeStep', () => {expect(screen.getByText('What this token does')).toBeInTheDocument();expect(screen.getByText(- 'This one-time bootstrap token only unlocks first-run setup on this Pulse server. It is not your admin password and it is not the API token you will use after setup.',+ 'This one-time bootstrap token only unlocks first-run setup on this Pulse server. Run the command above and paste the token string it prints. It is not your admin password and it is not the API token you will use after setup.',),).toBeInTheDocument();expect(screen.getByRole('button', { name: 'Verify bootstrap token →' })).toBeInTheDocument();@@ -100,9 +100,37 @@ describe('WelcomeStep', () => {expect(screen.getByText(- 'Pulse appears to be running in Docker as container "pulse-main". Run the command on the Docker host so you can read /srv/pulse/bootstrap.token from that container.',+ 'Pulse appears to be running in Docker as container "pulse-main". Run the command on the Docker host to print the one-time setup token from that container.',),).toBeInTheDocument();- expect(screen.getByText('docker exec pulse-main cat /srv/pulse/bootstrap.token')).toBeInTheDocument();+ expect(+ screen.getByText('docker exec pulse-main /app/pulse bootstrap-token'),+ ).toBeInTheDocument();+ });++ it('blocks encrypted bootstrap snapshot pastes with a specific error', async () => {+ const onNext = vi.fn();++ render(() => (+ <WelcomeStep+ onNext={onNext}+ bootstrapToken='{"version":2,"token_ciphertext":"cipher","token_hash":"hash"}'+ setBootstrapToken={vi.fn()}+ isUnlocked={false}+ setIsUnlocked={vi.fn()}+ />+ ));++ await waitFor(() => {+ expect(apiFetchJSONMock).toHaveBeenCalledWith('/api/security/status');+ });++ fireEvent.click(screen.getByRole('button', { name: 'Verify bootstrap token →' }));++ expect(showErrorMock).toHaveBeenCalledWith(+ 'That looks like the encrypted .bootstrap_token file contents, not the raw setup token. Run the command above and paste the token string it prints.',+ );+ expect(apiFetchMock).not.toHaveBeenCalled();+ expect(onNext).not.toHaveBeenCalled();});});diff --git a/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx b/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsxindex 88a36810d0..c4dd277a67 100644--- a/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx+++ b/frontend-modern/src/components/SetupWizard/steps/WelcomeStep.tsx@@ -15,7 +15,6 @@ interface WelcomeStepProps {export const WelcomeStep: Component<WelcomeStepProps> = (props) => {const [isValidating, setIsValidating] = createSignal(false);- const [tokenPath, setTokenPath] = createSignal('');const [isDocker, setIsDocker] = createSignal(false);const [inContainer, setInContainer] = createSignal(false);const [lxcCtid, setLxcCtid] = createSignal('');@@ -43,13 +42,10 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {lxcCtid?: string;dockerContainerName?: string;}>('/api/security/status');- if (data?.bootstrapTokenPath) {- setTokenPath(data.bootstrapTokenPath);- setIsDocker(data.isDocker || false);- setInContainer(data.inContainer || false);- setLxcCtid(data.lxcCtid || '');- setDockerContainerName(data.dockerContainerName || '');- }+ setIsDocker(data?.isDocker || false);+ setInContainer(data?.inContainer || false);+ setLxcCtid(data?.lxcCtid || '');+ setDockerContainerName(data?.dockerContainerName || '');} catch (error) {logger.error('Failed to fetch bootstrap info:', error);}@@ -59,17 +55,46 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {void fetchBootstrapInfo();});+ const looksLikeBootstrapTokenSnapshot = (value: string) => {+ const trimmed = value.trim();+ if (!trimmed.startsWith('{')) {+ return false;+ }+ try {+ const parsed = JSON.parse(trimmed) as {+ token_ciphertext?: unknown;+ token_hash?: unknown;+ version?: unknown;+ };+ return (+ typeof parsed.version === 'number' &&+ typeof parsed.token_ciphertext === 'string' &&+ typeof parsed.token_hash === 'string'+ );+ } catch {+ return false;+ }+ };++ const snapshotPasteHelp =+ 'That looks like the encrypted .bootstrap_token file contents, not the raw setup token. Run the command above and paste the token string it prints.';+const handleUnlock = async () => {- if (!props.bootstrapToken.trim()) {+ const trimmedToken = props.bootstrapToken.trim();+ if (!trimmedToken) {showError('Please enter the bootstrap token');return;}+ if (looksLikeBootstrapTokenSnapshot(trimmedToken)) {+ showError(snapshotPasteHelp);+ return;+ }setIsValidating(true);try {const response = await apiFetch('/api/security/validate-bootstrap-token', {method: 'POST',- body: JSON.stringify({ token: props.bootstrapToken.trim() }),+ body: JSON.stringify({ token: trimmedToken }),});if (!response.ok) {@@ -87,17 +112,16 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {};const getTokenCommand = () => {- const path = tokenPath() || '/etc/pulse/.bootstrap_token';if (isDocker()) {- return `docker exec ${dockerContainerName() || '<pulse-container>'} cat ${path}`;+ return `docker exec ${dockerContainerName() || '<pulse-container>'} /app/pulse bootstrap-token`;}if (inContainer() && lxcCtid()) {- return `pct exec ${lxcCtid()} -- cat ${path}`;+ return `pct exec ${lxcCtid()} -- pulse bootstrap-token`;}if (inContainer()) {- return `pct exec <ctid> -- cat ${path}`;+ return `pct exec <ctid> -- pulse bootstrap-token`;}- return `cat ${path}`;+ return `sudo pulse bootstrap-token`;};const deploymentLabel = createMemo(() => {@@ -114,26 +138,25 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {});const deploymentHint = createMemo(() => {- const path = tokenPath() || '/etc/pulse/.bootstrap_token';if (isDocker()) {return dockerContainerName()- ? `Pulse appears to be running in Docker as container "${dockerContainerName()}". Run the command on the Docker host so you can read ${path} from that container.`- : `Pulse appears to be running in Docker. Run the command on the Docker host and replace <pulse-container> with the running Pulse container name.`;+ ? `Pulse appears to be running in Docker as container "${dockerContainerName()}". Run the command on the Docker host to print the one-time setup token from that container.`+ : 'Pulse appears to be running in Docker. Run the command on the Docker host and replace <pulse-container> with the running Pulse container name.';}if (inContainer() && lxcCtid()) {- return `Pulse appears to be running in LXC container ${lxcCtid()}. Run the command on the Proxmox host so you can execute into that container and read ${path}.`;+ return `Pulse appears to be running in LXC container ${lxcCtid()}. Run the command on the Proxmox host to execute into that container and print the one-time setup token.`;}if (inContainer()) {- return `Pulse appears to be running in a containerized environment. Run the command from the host that manages the container so you can read ${path}.`;+ return 'Pulse appears to be running in a containerized environment. Run the command from the host that manages the container so you can print the one-time setup token.';}- return `Run the command directly in a shell on the Pulse server to read ${path}.`;+ return 'Run the command directly in a shell on the Pulse server to print the one-time setup token.';});const unlockHelp = createMemo(() => {if (isDocker()) {- return 'This one-time bootstrap token only unlocks first-run setup. After verification, you will create the admin account and Pulse will generate the long-lived API token separately.';+ return 'This one-time bootstrap token only unlocks first-run setup. Run the command above and paste the token string it prints. After verification, you will create the admin account and Pulse will generate the long-lived API token separately.';}- return 'This one-time bootstrap token only unlocks first-run setup on this Pulse server. It is not your admin password and it is not the API token you will use after setup.';+ return 'This one-time bootstrap token only unlocks first-run setup on this Pulse server. Run the command above and paste the token string it prints. It is not your admin password and it is not the API token you will use after setup.';});return (@@ -196,7 +219,8 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {</h3><p class="text-sm text-muted mb-6">Run the following command on the Pulse server to retrieve the one-time bootstrap- token that unlocks this wizard:+ token that unlocks this wizard. Do not paste the raw `.bootstrap_token` file+ contents directly.</p><div class="mb-4 rounded-md border border-blue-200 bg-blue-50 px-4 py-3 dark:border-blue-800 dark:bg-blue-950/40">@@ -262,6 +286,11 @@ export const WelcomeStep: Component<WelcomeStepProps> = (props) => {After Pulse verifies this token, the next step is creating the admin account forthis server.</p>+ <Show when={looksLikeBootstrapTokenSnapshot(props.bootstrapToken)}>+ <p class="rounded-md border border-amber-200 bg-amber-50 px-3 py-2 text-xs text-amber-900 dark:border-amber-800 dark:bg-amber-950/40 dark:text-amber-100">+ {snapshotPasteHelp}+ </p>+ </Show><buttononClick={handleUnlock}