Fix/install ux#27
Merged
Merged
Conversation
start.sh was exiting with a 'nano .env' instruction if .env was missing. Matches the install.sh bootstrap behaviour: auto-copies .env.example, sets STACK_USER to current user, generates LITELLM_MASTER_KEY. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The previous message said 'run bw unlock manually' which is incomplete. bw unlock prints the session token but doesn't export it — you need export BW_SESSION=$(bw unlock --raw) for child processes to see it. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The installer now auto-creates .env, detects GPU, generates keys, and starts the stack. The old 4-step 'cp .env.example + nano' flow is gone. Also removes the manual docker-compose GPU overlay instructions since install.sh handles overlay selection automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The bootstrap block only sets STACK_USER on fresh .env creation. Existing .env files with STACK_USER=yourusername (copied from .env.example before this fix) would still fail the docker group check. Add an unconditional check after sourcing .env. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Auto-bootstrap only ran on fresh .env creation, leaving existing .env files with STACK_USER=yourusername if installed before this fix. Now checks after sourcing and corrects the placeholder unconditionally. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Two UX fixes for users with existing .env files: 1. STACK_USER placeholder: if .env was created before the auto-bootstrap landed (or copied manually from .env.example), STACK_USER may still be 'yourusername'. The :-$(whoami) guard doesn't catch this because the var is set (to the wrong value). This patch detects the placeholder and replaces it with the actual username in-place. 2. VaultWarden proactive hint: if .env has <vaultwarden:...> placeholders but BW_SESSION and VAULT_MASTER_PASSWORD are both unset, show the unlock command *before* calling the resolve script — not just as an error after it fails. Same hint added to start.sh. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
install.sh is now the recommended path — it handles .env creation, GPU detection, and stack startup automatically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…t not wired Previously the installer warned about the toolkit but continued, causing the ai-stack.service to fail on first start when Docker couldn't find the nvidia runtime. Now: - If nvidia-ctk is installed but Docker doesn't show the nvidia runtime: auto-runs 'nvidia-ctk runtime configure' + 'systemctl restart docker' - If nvidia-ctk is not installed at all: print exact install commands and exit This prevents the common pattern of a successful install that immediately fails when the systemd service tries to start an NVIDIA container. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…l setup The installer now handles .env creation automatically. Step 2 is reorganised: - Leads with the automatic path (./install.sh) - Keeps the manual path for users who want to customise before installing - Adds a clear table of key variables with the auto-set ones noted - Replaces the openssl key generation block with the cloud API key pattern Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…in comments .env.example contains <vaultwarden:> examples in comment lines. The grep check matched comments and triggered bw resolution even on a fresh auto- bootstrapped .env with no real placeholders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
VaultWarden is optional secret management. On a fresh install where bw is not available, resolve-vaultwarden.sh was exiting with code 1, killing the entire installer. Changed to exit 0 with a warning so the stack installs normally — cloud API keys can be added to .env manually later with 'echo KEY=value >> .env'. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The old grep matched '<vaultwarden:' anywhere in .env, including comment lines. .env.example has example placeholders in comments, so a fresh install triggered the resolver unnecessarily. Now excludes comment lines — only actual key=<vaultwarden:...> values trigger resolution. Fixes the bw-not-found failure on nuk1 fresh installs. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…heck The resolver was called unconditionally on every start — so systemd service starts failed whenever the vault was locked, even when .env had no actual placeholders (only comment-line examples from .env.example). Now matches install.sh behaviour: only call resolve-vaultwarden.sh when .env contains a non-commented <vaultwarden:...> value. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
When systemd starts ai-stack.service it has no BW_SESSION, so the resolver exits 1 and the service fails. Move the resolver call inside the credential check so it only runs when BW_SESSION or VAULT_MASTER_PASSWORD is set. When locked, warn and continue — the stack starts with empty secrets, which the operator can resolve and restart after. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
b"" literals require ASCII-only characters. The em-dash (U+2014) in the sync stat placeholder caused SyntaxError on import, crash-looping the container. Replace with HTML entity — which renders identically. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… 770) JS textContent assignment also contained the em-dash, causing SyntaxError before line 650 was even reached. Replace with JS unicode escape — which the browser JS engine resolves correctly. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…en is configured When install.sh detects real VaultWarden placeholders in .env, it now auto-installs bw if missing: tries snap first (avoids EACCES), falls back to user-local npm (~/.npm-global). Warns and continues if neither works. No-op on fresh installs with no real placeholders. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
install.sh: use --prefix flag for one-shot npm install instead of mutating global npm config via `npm config set prefix`. start.sh: add --remove-orphans to docker compose up so stale containers from previous installs are cleaned up automatically on restart, preventing name-conflict failures. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The interactive Bitwarden setup section used bare `npm install -g` which fails with EACCES on systems where the npm global dir requires root. Apply same snap-first / user-local-npm pattern used in the VaultWarden auto-install block earlier in the file. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
The interactive Bitwarden setup wizard (lines 508-688) was added in cd4e155 but is broken: it ignores existing BW_SESSION, doesn't wire up self-hosted VaultWarden server URLs correctly, and re-prompts for credentials unnecessarily. Garth's request was to auto-install the bw CLI when needed — the auto-install block (lines ~50-80) covers that. The wizard will be a separate PR with proper design and testing. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…s running!" Previously the banner printed unconditionally even when the service failed to start (e.g. port 11434 conflict). Now checks the container state and prints actionable diagnostics if it's not running. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Type of change
Related issues
Testing
docker compose configpasses with no errorsshellcheckChecklist
.env.exampleis up to date (if env vars were added/removed)