Commit Graph
164 Commits
Author SHA1 Message Date
Claude 9dc8c4063d v0.9.7: Caddy + CrowdSec modules; category menu with required-gate
- services/caddy.sh (homelab): reverse proxy + auto HTTPS, own ~/docker/caddy
  folder (compose + starter Caddyfile + README).
- services/crowdsec.sh (homelab): system-level IPS (agent + firewall bouncer +
  Caddy acquisition + optional ntfy alerts), README in ~/docker/crowdsec.
- setup.sh guided flow redesign:
  * Prints REQUIRED set (essentials + glow + docker check) with a cancel option.
  * Offers Caddy first (most services proxy through it).
  * Category menu LOOP: pick category -> checklist ([installed] marked) ->
    install -> back to menu, until Done. whiptail + text fallback.
- Categories reorganized: base/homelab/utilities/media/cameras/gaming/backup;
  moved ntfy/filebrowser/portainer/uptimekuma/watchtower to utilities;
  caddy->crowdsec->authelia ordered first in homelab.

Verified: bash -n all; --list groups by category with caddy first; cancel path
prints 'Cancelled, nothing changed'; dry-run guided flow runs required + loops
menu; run-one still works.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 17:16:32 +00:00
Claude 4a37b3622d v0.9.6: README generation + migrate authelia + 5 services
- lib/common.sh: add write_readme helper. Every module now writes a README.md
  into its ~/docker/<service>/ folder (self-documenting service folders).
- services/authelia.sh: SSO + 2FA portal, ported from the authelia-setup repo +
  the monolith's working block (secrets + Argon2 hash generation, caddy_net,
  Caddyfile forward-auth snippet + portal block, README). Guards against
  clobbering an existing install.
- services/{filebrowser,ntfy,uptimekuma,portainer,watchtower}.sh: mechanical
  migrations from the monolith, each with a README. Ports 8085/8090/3001/9443/—.

All pass bash -n; ./setup.sh --list shows them under homelab; dry-run run-one
exits 0 for each with real commands guarded.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 17:01:14 +00:00
Outis 8324124a38 Merge pull request #36 from outis1one/claude/happy-volta-RPhbD
Claude/happy volta r phb d
2026-06-03 12:53:11 -04:00
Claude d4109839fc v0.9.5: port Minecraft to a per-service-folder module
services/minecraft.sh — full port of the standalone setupminecraft.sh into the
modular system. Each instance is its own ~/docker/<name>/ with a standalone
compose (multi-server via port auto-bump). Preserves flavour choice, the live
Modrinth version/mod picker, Vanilla Tweaks datapacks, whitelist UUID
pre-population, LuckPerms bootstrap, Chunky pre-gen, playit.gg tunnel, generated
networking/client docs, and the client-mods web page. Fixes the original's
env-block trailing-newline YAML bug. Selkies/manage.sh/setup-backup hand-offs
removed (points at 'sudo ./setup.sh backup').

Verified: bash -n; ./setup.sh --list shows minecraft under GAMING; dry-run
exits 0 with early return; generated compose validates.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 16:42:45 +00:00
Claude 840566e3f8 v0.9.4: gaming modules (wolf, js99er), backup module, versioning
- services/wolf.sh (gaming): Games-on-Whales Wolf / Moonlight, per-service
  folder ~/docker/wolf, wolf-pair dropped, manage.sh pin workflow kept.
- services/js99er.sh (gaming): TI-99/4A emulator, own folder, port 8099,
  Selkies launcher tie-in removed.
- services/backup.sh: Kopia encrypted backups, paths adapted to ~/docker.
- Start versioning: VERSION (0.9.4), CHANGELOG.md, setup.sh --version flag.

All modules pass bash -n; ./setup.sh --list groups base/homelab/gaming/backup;
dry-run run-one exits 0 for every module with real commands guarded.

Note: minecraft module deferred to 0.9.5 (port hit a session limit).

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 16:25:25 +00:00
Claude d7b9f935c2 Add modular setup framework (lib + services + dispatcher) and glow
Introduce the modular post-install structure chosen for reconciling 'one
source of truth' with 'run just the service I want':

- lib/common.sh: shared helpers (logging, prompts, ownership, Caddy wiring) and
  a service registry. Single implementation of each helper.
- setup.sh: dispatcher — interactive menu, run-one (./setup.sh <name>), --list,
  --dry-run, --unattended. Sources lib + services/*.sh (self-registering).
- services/base.sh: essential CLI packages incl. glow (Charm apt repo).
- services/homeassistant.sh: first migrated service (bridge/host networking,
  trusted_proxies, Caddy integration).
- MODULAR.md: architecture, how to add a module, migration status.
- Groups: base/homelab/gaming/backup. Gaming group makes this a base for
  homelab OR gaming boxes.

Also add glow as a default app to the live -crowdsec scripts' essential
packages so it's installed today regardless of entry point.

Verified: bash -n on all new files; ./setup.sh --list groups services;
dry-run run-one routes correctly.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 12:57:12 +00:00
Claude d528cfbea3 Home Assistant: prompt for bridge vs host networking
Let the user choose Home Assistant's networking mode at install time in the
-crowdsec variants:
- Bridge (default): publishes port 8123, works behind Caddy, isolated.
- Host: shares the host network for LAN device auto-discovery (Cast, HomeKit,
  mDNS/Zeroconf, some Zigbee/Z-Wave/Bluetooth).

The compose file is generated conditionally; both modes verified to produce
valid YAML, and both scripts pass 'bash -n' and a --dry-run --unattended pass.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 12:25:15 +00:00
Claude 8f6523a47b Add Home Assistant to CrowdSec variants
Add Home Assistant (home-automation hub, port 8123) to the -crowdsec scripts
for 24.04 and 26.04, following the existing service pattern (menu entry,
detection, defaults, parse, uninstall, install block, UFW rule, Caddy template).

- Image ghcr.io/home-assistant/home-assistant:stable, config volume, privileged
  + /run/dbus for hardware integrations; documents host-networking alternative
  for full mDNS/device discovery.
- Pre-seeds config/configuration.yaml with default_config + http.trusted_proxies
  (only on a fresh install) so HA works behind the Caddy reverse proxy without
  the usual 400 'request from reverse proxy' error.
- Integrates with configure_caddy_for_service (subdomain 'home').

Added only to the -crowdsec tier (current tip); original and -no-keycloak
scripts stay frozen as the evolution record. Both variants pass 'bash -n' and a
--dry-run --unattended pass (exit 0), including with Home Assistant forced on.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 12:20:36 +00:00
Outis e2b7915739 Merge pull request #35 from outis1one/claude/happy-volta-RPhbD
Claude/happy volta r phb d
2026-06-03 08:20:11 -04:00
Claude b6af49f1f1 Add optional ntfy ban alerts to CrowdSec variants
When configuring CrowdSec, optionally wire up an ntfy push notification via
CrowdSec's HTTP notification plugin: writes /etc/crowdsec/notifications/ntfy.yaml
and references it from the default profile in profiles.yaml. Alerts fire on a
ban decision (after repeated failed attempts), not on every failed login.

Document the behavior in SCRIPT-VARIANTS.md, including why Authelia (email-only)
doesn't cover failed-login push. Both crowdsec variants verified with 'bash -n'
and a --dry-run --unattended pass (exit 0).

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 12:05:13 +00:00
Claude 7cf82d5d28 Add no-keycloak and CrowdSec script variants; restore originals
Provide three tiers of the install script for both 24.04 and 26.04:

- Originals (ubuntu-post-install-24.04.sh / -26.04.sh): restored to their
  true original state, with Keycloak intact, as a fallback baseline. (This
  reverts the in-place Keycloak removal from the previous commit; the cleanup
  now lives in the -no-keycloak variants instead.)
- -no-keycloak.sh: Keycloak fully removed, Authelia as the SSO/2FA option.
- -crowdsec.sh: builds on -no-keycloak and replaces fail2ban entirely with
  CrowdSec (SSH via auth.log/sshd collection, Caddy via caddy collection + log
  acquisition, firewall bouncer for enforcement, plus geo-blocking and
  community IP-reputation blocklists).

Add SCRIPT-VARIANTS.md documenting the three tiers and how the Authelia /
fail2ban / CrowdSec security layers differ.

All variants pass 'bash -n'.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 11:34:43 +00:00
Claude f564b4b6d8 Remove Keycloak; standardize on Authelia for SSO
Keycloak never reliably ran (fiddly reverse-proxy/hostname config) and the
repo has standardized on Authelia for SSO + 2FA. This rips Keycloak out
entirely:

- Delete the install block, whiptail menu entry, uninstall plumbing, and
  EXISTING_SERVICES detection from both 24.04 and 26.04 scripts
- Delete docker-compose-keycloak.yml, fix-keycloak-proxy.sh, and
  KEYCLOAK-SETUP-GUIDE.md
- Remove the Keycloak block from caddy-setup-helper.sh
- Update docs (CADDY-FAIL2BAN-SETUP.md, SECURITY-IMPROVEMENTS.md,
  NEW-SCRIPT-STRUCTURE.md, SCRIPT-FLOW-INTRO.txt) to reference Authelia

Also documents the fail2ban/Authelia overlap: Authelia handles failed-login
regulation (per-account lockout); the Caddy fail2ban jail is complementary
firewall-level IP banning. Neither does geo-blocking — noted CrowdSec / Caddy
GeoIP as the path for that.

https://claude.ai/code/session_017eA2qqq9jfF2tNtpUYL8vK
2026-06-03 03:44:26 +00:00
Outis c54cd9ecc6 Merge pull request #34 from outis1one/claude/zen-dirac-4vV0h
Claude/zen dirac 4v v0h
2026-06-02 14:48:17 -04:00
Claude a8dd0d78dd Install Caddy before Authelia so Caddyfile exists at Authelia setup time
Authelia's installer auto-injects the (authelia) snippet and auth portal
block into the Caddyfile. Moving Caddy first means that injection works
in a single fresh install run without manual follow-up.

https://claude.ai/code/session_01FvqXSZyk3g7rUombwLcprZ
2026-06-02 18:44:15 +00:00
Claude 49f91ac9c0 Fix Authelia authentication_backend config for 4.38+ format
The working authelia-setup repo uses the Authelia 4.38+ password
hashing config format with a nested argon2 block and variant key.
The previous version used the old flat format which is rejected by
Authelia 4.39.20 validation. Fix both 24.04 and 26.04 scripts.

  Before (broken):
    password:
      algorithm: argon2id
      iterations: 3
      ...

  After (correct for 4.38+):
    password:
      algorithm: argon2
      argon2:
        variant: argon2id
        iterations: 3
        ...

https://claude.ai/code/session_01FvqXSZyk3g7rUombwLcprZ
2026-06-02 17:56:39 +00:00
Claude 9e353eb921 Sync 24.04 and 26.04 scripts: rename, Authelia, NetBird SSH
- Rename ubuntu-post-install.sh → ubuntu-post-install-24.04.sh to match 26.04 naming convention
- Add --allow-server-ssh systemd override to 24.04 NetBird install (already in 26.04)
- Add full Authelia install block to 26.04 (matching what was added to 24.04)
  - Whiptail menu, uninstall, detection, default vars, parse flags, install block
- Both scripts now identical in Authelia and NetBird SSH behavior

https://claude.ai/code/session_01FvqXSZyk3g7rUombwLcprZ
2026-06-02 17:52:25 +00:00
Claude db8e83447a Add working Authelia SSO install based on authelia-setup repo
Ports the full working configuration from outis1one/authelia-setup:
- Authelia 4.39.20 on caddy_net with secrets via env var files
- Generates jwt/session/storage secrets with openssl at install time
- Prompts for domain, admin user, SMTP settings, timezone
- Generates argon2id password hash via Docker during install
- Writes configuration.yml, users.yml, docker-compose.yml, .env
- Auto-injects (authelia) snippet + auth portal block into Caddyfile
- Creates caddy_net Docker network if missing
- Adds Authelia to whiptail service menu, uninstall list, and detection
- Adds Authelia snippet as commented example in new Caddyfile template

https://claude.ai/code/session_01FvqXSZyk3g7rUombwLcprZ
2026-06-02 17:43:35 +00:00
Outis eac4f7c4f8 Merge pull request #33 from outis1one/claude/kind-knuth-j1AO6
Claude/kind knuth j1 ao6
2026-06-01 17:56:09 -04:00
Claude d790d09295 Persist --allow-server-ssh in netbird systemd override
Without --allow-server-ssh, NetBird prompts for re-authentication on
every SSH connection. This adds a systemd drop-in override at
/etc/systemd/system/netbird.service.d/ssh-server.conf so the flag
is set automatically on every boot without manual intervention.

https://claude.ai/code/session_017jFG5YuHf2CCGS5HiheoeM
2026-06-01 21:51:34 +00:00
Claude afb5d22d2e Update NetBird SSH for v0.60.0+ breaking change in 26.04 script
NetBird v0.60.0 removed the built-in SSH server ('netbird ssh <peer-name>').
SSH now routes through standard openssh-server via a drop-in config at
/etc/ssh/sshd_config.d/99-netbird.conf on port 22022.

- Ensure openssh-server is installed and enabled when NetBird is selected
- Remove all 'netbird ssh <peer-name>' references
- Update instructions: connect via 'ssh user@<netbird-ip>' using netbird status
- Note the dashboard step: Peers > [peer] > SSH to enable per-peer SSH access
- Applied across install section, SSH summary, and next-steps section

https://claude.ai/code/session_017jFG5YuHf2CCGS5HiheoeM
2026-06-01 21:49:06 +00:00
Outis dab2a8fe25 Merge pull request #32 from outis1one/claude/kind-knuth-j1AO6
Add ubuntu-post-install-26.04.sh for Ubuntu 26.04 LTS (Resolute Raccoon)
2026-06-01 16:45:34 -04:00
Claude 8a276337ab Add ubuntu-post-install-26.04.sh for Ubuntu 26.04 LTS (Resolute Raccoon)
Based on the 24.04 script with the following updates:
- Updated all version references from 24.04 to 26.04
- Fixed Tailscale APT repo from hardcoded 'jammy' to 'resolute' codename
  (was a latent bug even on 24.04; jammy is 22.04)
- All other repos (Docker, Kopia, NodeSource) already use dynamic
  VERSION_CODENAME detection and work as-is on 26.04

https://claude.ai/code/session_017jFG5YuHf2CCGS5HiheoeM
2026-06-01 20:43:24 +00:00
Outis 2ea93aab77 Merge pull request #31 from outis1one/claude/immich-external-library-yZbdk
Claude/immich external library y zbdk
2026-03-20 15:36:03 -04:00
Claude 947d9597e6 Require Node.js >= 20 for Immich CLI; install Node 22 LTS from NodeSource
The Immich CLI uses the File global class which requires Node.js v20+.
The script previously fell back to apt install nodejs which gives v18 on
Ubuntu and fails with "ReferenceError: File is not defined".

Now checks the Node.js major version first. If < 20, offers to install
Node.js 22 LTS from NodeSource before proceeding.

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 07:15:51 +00:00
Claude d3d887a548 Fix Immich docker-compose: update DB image, create marker dirs, remove broken healthcheck
- Update database image from deprecated tensorchord/pgvecto-rs:pg14-v0.2.0
  to ghcr.io/immich-app/postgres:14-vectorchord0.4.3-pgvectors0.2.0
- Remove database command block (vectors.so) that blocks VectorChord from
  loading — the new image handles shared_preload_libraries internally
- Remove bogus healthcheck using non-existent googlechecksum function
- Create required subdirectories (thumbs, upload, backups, library, profile,
  encoded-video) with .immich marker files before first start — fixes
  ENOENT crash on encoded-video/.immich
- Update Valkey from 8-bookworm to 9-bookworm
- Fix status output: show UPLOAD_LOCATION instead of unset PHOTOS_DIR
  for external library strategy

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 06:56:48 +00:00
Claude 791c9a3c47 Fix YAML syntax error in Immich docker-compose templates
The healthcheck test value contained "googlechecksum: $$Chksum"
which YAML interprets as a mapping separator (colon-space in an
unquoted scalar). This caused "mapping values are not allowed in
this context" on the command line below it.

Fixed by using >- block scalar for the healthcheck test and
multi-line array format for the postgres command, matching the
official Immich docker-compose format.

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 06:27:32 +00:00
Claude b591f44626 Skip already-configured services on rerun, respect whiptail selection
Three issues fixed:

1. SSH/VPN/Remote Desktop rerun detection: When services are already
   configured, ask a single "Reconfigure?" question instead of
   prompting through every individual service again.

2. Whiptail selection respected: When user selects specific services
   in the whiptail menu, skip all unrelated sections (linux-to-sync,
   Caddy Legacy, Kopia, local backup, cloud backup, UFW) instead of
   prompting for each one.

3. Import-photos.sh reminder: Clarify that import-photos.sh should
   be run AFTER the main setup script completes, not during.

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 06:16:03 +00:00
Outis bd9773a374 Merge pull request #30 from outis1one/claude/immich-external-library-yZbdk
Add progress feedback to import-photos.sh scan step
2026-02-19 00:25:38 -05:00
Claude 28896fd194 Add progress feedback to import-photos.sh scan step
The find command to count photos can take a long time on large
collections or slow mounts. Added visible output so it doesn't
look like the script hung.

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 05:24:32 +00:00
Outis d158b87be2 Merge pull request #29 from outis1one/claude/immich-external-library-yZbdk
Make apt upgrade optional; simplify Immich photo library prompts
2026-02-19 00:09:20 -05:00
Claude 0058af3242 Make apt upgrade optional; simplify Immich photo library prompts
- apt upgrade at end of script now prompts (default: no) instead of
  running unconditionally. This prevents unwanted package upgrades
  when running the script just to install a new service.

- Immich setup: ask "existing photos?" first (default: no) so fresh
  installs only get one path question. Strategy choice and path prompts
  now only appear when relevant to the chosen strategy.

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 05:00:18 +00:00
Outis de411fabff Merge pull request #28 from outis1one/claude/immich-external-library-yZbdk
Claude/immich external library y zbdk
2026-02-18 23:30:11 -05:00
Claude 99a6843010 Ask strategy before photo location in Immich setup
The user should decide *what* they want (import vs external library)
before being asked *where* their photos are. The "what" frames the
context for the "where" question.

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 04:24:12 +00:00
Claude 5c37d23788 Clean up post-setup instructions: one step for import path
The import-photos.sh script creates the admin account via API, so
"Open browser and create admin account" is no longer needed for the
import path. Post-setup is now just:

  Import path (Strategy 1 + existing photos):
    "Run ~/docker/immich/import-photos.sh" — one step, no browser

  External library path (Strategy 2):
    Still requires web UI for library creation (3 steps)

  No existing photos:
    Still requires web UI for storage template (2 steps)

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 04:14:37 +00:00
Claude 89c484e0f2 Fully automate Immich import: account creation, API key, and upload
The import-photos.sh helper script now handles the entire setup flow
without requiring any manual web UI interaction:

1. Checks if Immich is initialized via /api/server/config
2. If uninitialized: creates admin account via /api/auth/admin-sign-up
   (prompts for email, password, name)
3. If already initialized: prompts for existing credentials
4. Logs in via /api/auth/login to get bearer token
5. Creates API key via /api/api-keys automatically
6. Configures storage template via /api/system-config (PUT)
7. Installs immich-cli (checks immich → npx → npm → offers apt install)
8. Runs recursive upload with EXIF date preservation

Also accepts an API key as argument to skip account setup for re-runs.

Fixes:
- Removed -f flag from curl calls that suppressed error details
- Fixed $? check after login (now uses if ! command pattern)
- Variable naming collision (INSTALL_NODE → INSTALL_NODE_YN)
- Post-setup instructions now just say "run the import script"
  instead of listing manual steps

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 04:10:17 +00:00
Outis 4f9348e86a Merge pull request #27 from outis1one/claude/immich-external-library-yZbdk
Rework Immich setup UX with strategy-based photo library flow
2026-02-18 23:07:00 -05:00
Claude ee145dc736 Add automated import-photos.sh helper script for existing photos
When Strategy 1 (unified library) is chosen with existing photos, the
setup now generates an import-photos.sh script that automates the entire
import process:

- Verifies Immich is running (API health check)
- Prompts for API key with validation
- Configures the storage template via API automatically (uses python3
  for JSON manipulation, falls back to manual instructions)
- Installs immich-cli via npx if Node.js available, offers to install
  Node.js if not
- Runs the upload with --recursive from the baked-in source path
- Shows photo count and progress

Also:
- Ask where existing photos currently live (separate from library path)
- Use that path for both the external library mount (Strategy 2) and
  the import script source (Strategy 1)
- Post-setup instructions reduced to 3 steps: create account, get API
  key, run import script
- .env comments reference the import script instead of raw CLI commands

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 03:23:15 +00:00
Claude 430a30ca18 Rework Immich setup UX with strategy-based photo library flow
Replace the confusing two-prompt (upload/external) configuration with a
cohesive strategy-based flow:

- One question for photo library path instead of two separate prompts
- Ask if user has existing photos, then present two clear strategies:
  [1] Import everything into Immich (unified library, recommended)
  [2] Keep existing photos in place (external library, read-only)
- Generate strategy-specific docker-compose.yml (no unused external
  mount when not needed)
- Strategy-specific .env files with relevant instructions only
- Fix nesting issue: external library uploads now go to sibling dir
  instead of subfolder (prevents duplicate scan)
- Unified post-setup instructions that match chosen strategy

https://claude.ai/code/session_01NAtxAkC5t6YVb3gcP1VcX8
2026-02-19 02:37:02 +00:00
outis1one 104ce83ac0 Merge pull request #26 from outis1one/claude/fix-docker-ownership-UIder
Improve fix-keycloak-proxy.sh to handle existing .env files
2026-01-12 23:36:59 -05:00
Claude 3620a3adf0 Improve fix-keycloak-proxy.sh to handle existing .env files
- Check for existing .env file instead of extracting from docker-compose
- Replace KC_PROXY with KC_PROXY_HEADERS in .env
- Add KC_PROXY_HEADERS if missing
- Remove KC_PROXY from docker-compose.yml if present
- Show current configuration before restart
- Handles both migration scenarios:
  1. Old config with KC_PROXY in .env
  2. Existing .env without proxy settings
2026-01-13 04:34:46 +00:00
outis1one f2fb658a1a Merge pull request #25 from outis1one/claude/fix-docker-ownership-UIder
Claude/fix docker ownership u ider
2026-01-12 23:30:40 -05:00
Claude b4cb82c0d7 Make fix-keycloak-proxy.sh executable 2026-01-13 03:40:18 +00:00
Claude 736c53b1db Update Keycloak to use v2 proxy headers (KC_PROXY_HEADERS)
- Replace deprecated KC_PROXY=edge with KC_PROXY_HEADERS=xforwarded
- Fixes 'Hostname v1 options [proxy] are still in use' warning
- Convert docker-compose-keycloak.yml to use .env file
- Remove hardcoded passwords from docker-compose.yml
- Add comprehensive .env template in comments
- Update deployment instructions and production checklist
- Resolves CORS and secure context warnings
- All credentials now in .env with proper security
2026-01-13 03:39:08 +00:00
Claude 6098bbc209 Add Keycloak proxy configuration fix script
- Fixes deprecated KC_PROXY warning
- Updates to KC_PROXY_HEADERS=xforwarded (v2)
- Migrates credentials to .env file
- Preserves existing passwords
- Automatic backup and restart
- Resolves 'Hostname v1 options [proxy] are still in use' warning
2026-01-13 03:36:54 +00:00
outis1one 75a07a2a9b Merge pull request #24 from outis1one/claude/fix-docker-ownership-UIder
Fix Docker ownership, Keycloak security, and .env file management
2026-01-12 19:53:50 -05:00
Claude ccb145103f Fix Docker ownership, Keycloak security, and .env file management
This comprehensive update addresses multiple security and usability issues:

## Docker Directory Ownership
- Added ensure_docker_dir_ownership() helper function
- Applied to ALL 25+ services (Immich, Keycloak, ActualBudget, Jellyfin,
  Emby, ARM, FileBrowser, MagicMirror, Lyrion, Mealie, Minecraft, Frigate,
  ntfy, Uptime Kuma, wg-easy, Traccar, Portainer, MeshCentral, FindMyDevice,
  Frigate-Notify, Watchtower, Kopia, Caddy)
- Fixed disaster recovery path (line 309) to set ownership
- Docker folders now owned by sudo user, not root
- Users can run docker commands without sudo

## Keycloak Security Improvements
- Implemented password validation with retry loop
- Password requirements: 12+ chars, alphanumeric only (no special chars)
- Auto-generate secure passwords by pressing ENTER
- Moved all credentials to .env file (no passwords in docker-compose.yml)
- Added production vs development mode selection
- Production mode uses 'start' command with hostname configuration
- Development mode uses 'start-dev' for testing only
- Proper KC_HOSTNAME configuration for public deployments
- Interactive prompts with clear security warnings

## Environment Variable Management
- ActualBudget now uses .env file for configuration
- Keycloak uses .env for admin and database passwords
- Consistent .env pattern across services
- Passwords no longer visible in docker-compose files
- Easier credential management and rotation

## Helper Functions
- ensure_docker_dir_ownership(): Fix ownership recursively
- generate_password(): Generate secure alphanumeric passwords
- validate_password(): Validate Keycloak-compatible passwords

## Documentation
- Added SECURITY-IMPROVEMENTS.md with comprehensive guide
- Password requirements and best practices
- Keycloak setup guide for ActualBudget on Pikapods
- Migration guide for existing services
- Troubleshooting section
- Verification checklist

## Integration Status
- Caddy2 reverse proxy: Already integrated via configure_caddy_for_service()
- fail2ban monitoring: Already configured with labels on all services
- HTTPS and security headers: Already implemented
- JSON logging for fail2ban: Already configured

All services now follow consistent patterns for ownership, credentials,
and security configuration. Script tested with bash -n for syntax errors.
2026-01-13 00:44:23 +00:00
outis1one bc1523db8e Merge pull request #23 from outis1one/claude/fix-magic-mirror-setup-LWG3r
Claude/fix magic mirror setup lwg3r
2026-01-12 13:41:45 -05:00
Claude 7cdd9345b5 Implement global drive detection - detect once, use everywhere
MAJOR IMPROVEMENT: Drive detection now happens ONCE at startup and
is reused by all services, instead of each service detecting separately.

1. **New detect_drives() Function:**
   - Runs once before service selection menu
   - Scans ~/drives directory for all mounted drives
   - Shows drive name, path, size, used space, available space
   - Sets global variables for all services to use

2. **Global Variables Set:**
   - PRIMARY_DRIVE: name of first drive (e.g., "storage1")
   - PRIMARY_DRIVE_PATH: full path to first drive
   - DRIVES_DETECTED: true/false
   - DRIVES_DIR: base drives directory
   - AVAILABLE_DRIVES_COUNT: number of drives

3. **Display Example:**
   ```
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
     DETECTED DRIVES
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

     ✓ storage1
       Path: /home/user/drives/storage1
       Size: 2.0T (Used: 800G, Available: 1.2T)

     ✓ backup
       Path: /home/user/drives/backup
       Size: 4.0T (Used: 1.5T, Available: 2.5T)

     Using 'storage1' as primary drive for default paths
   ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
   ```

4. **Updated Services to Use Global Detection:**
   - Immich: photos/immich-uploads
   - AudioBookshelf: audiobooks
   - Emby: media
   - Jellyfin: media
   - ARM: ripped
   - FileBrowser: (root browse)
   - LMS: music

5. **Benefits:**
   - Detect drives only once (faster)
   - Consistent paths across all services
   - Shows actual drive information (size, usage)
   - Falls back to $HOME if no ~/drives exists
   - All services use PRIMARY_DRIVE_PATH variable

This fixes user complaint:
"There is no ~/drives.... it should detect which drives are already
 in ~/drives and offer to use one of those"
2026-01-12 18:05:49 +00:00
Claude de4bbf4711 Apply reconfigure fix to ActualBudget
- Added check_service_exists() to ActualBudget
- Now shows Skip/Reconfigure/Restart options
- Prevents accidental overwrite of existing configurations

Progress: 6/24 services complete (Immich, AudioBookshelf, Emby, ARM, FileBrowser, ActualBudget)
2026-01-12 17:54:08 +00:00
Claude 53f0101f9b Apply reconfigure fix to ARM and FileBrowser services
- Added check_service_exists() to ARM (Automatic Ripping Machine)
- Added check_service_exists() to FileBrowser
- Both now show Skip/Reconfigure/Restart options
- Prevents accidental overwrite of existing configurations

Progress: 5/24 services complete (Immich, AudioBookshelf, Emby, ARM, FileBrowser)
2026-01-12 17:52:47 +00:00