Commit Graph

246 Commits

Author SHA1 Message Date
Kelin
802a4d1ba0 Fix multiserver deployment: domain in docker-provider and auto-disable remote Traefik
- Fix missing domain in docker provider defaultRule (use DOMAIN or DUCKDNS_DOMAIN)
- Add disable_traefik_on_remote_services() to strip routing labels from remote services
- Call disable function automatically during remote server deployment (Step 5.5)
- Remote services now properly accessed through core Traefik via docker provider
- Prevents errors: middleware/certresolver not found on remote Traefik

Resolves Traefik errors on remote servers where services had labels for
SSL/auth that only exist on core server.
2026-02-07 16:24:57 -05:00
Kelin
9fea40c8b5 Fix multiserver deployment: Add SSH config automation, enhance registration verification, improve Traefik deployment
- Auto-create SSH config entry for passwordless core server access
- Add pre-flight SSH connectivity check before registration
- Verify docker-provider and sablier-middleware files are created on core
- Display explicit success/failure messages with troubleshooting steps
- Create placeholder routes.yml for Traefik dynamic config
- Verify Traefik container starts successfully after deployment
- Add container status check after Traefik deployment

Fixes issues where remote server registration silently failed and
Traefik deployment did not verify configuration files existed.
2026-02-07 16:09:56 -05:00
kelin
44b529a7cb feat: Add Option 3 - Deploy Additional Server with multi-server support
Major features:
- Automated SSH key setup between remote and core servers
- Docker TLS configuration with shared CA certificates
- Automatic deployment of Dockge, Traefik, Sablier, and Infrastructure stacks
- Copy all stacks (except core) to remote server for on-demand deployment
- New standalone Traefik stack for remote server container discovery
- Locale-aware SSH/SCP commands to handle Raspberry Pi warnings
- Variable expansion support in .env files (${VAR} references)
- Comprehensive error handling and verbose deployment logging

Technical improvements:
- setup_ssh_key_to_core() - Automated RSA 4096-bit key generation and installation
- setup_multi_server_tls() - Fetch shared CA from core server via SSH
- copy_all_stacks_for_remote() - Deploy all stacks except core
- deploy_traefik_stack() - Local Traefik for container discovery
- Enhanced localization with envsubst support
- Docker network creation (traefik-network, homelab-network)
- Password authentication with special character handling

Fixes:
- Fixed SSH key path handling for non-root users
- Fixed SCP exit code checking (was checking grep instead of scp)
- Fixed CA file detection with proper test commands
- Removed unnecessary prepare_deployment() function call
- Added ACTUAL_USER variable initialization for remote deployments
v0.2.0
2026-02-06 22:00:25 -05:00
kelinfoxy
5b3c4a2c5b Chage homarr image & add SECRET_ENCRYPTION_KEY 2026-02-06 17:17:17 -05:00
kelinfoxy
5cbb106160 Add multi-server support and update docs
Introduce multi-server architecture documentation and reorganize README content. Top-level README now documents Core vs Remote server roles, links to local docs instead of wiki pages, and highlights Traefik/Sablier multi-server behavior. docker-compose/README.md was rewritten to be a template-style reference with single- and multi-server deployment guidance, Traefik label examples, and sablier usage; dockge README was moved into docker-compose/dockge/. docker-compose/core/README.md was updated to describe core responsibilities, shared CA artifacts, and startup order for multi-server deployments. Several obsolete/duplicated docs and action reports were removed and a new multi-server deployment doc was added to centralize on-demand/remote service guidance. Overall this cleans up legacy docs and documents the multi-server workflow and TLS/shared-CA requirements.
2026-02-05 22:30:52 -05:00
Kelin
84b2cabacc Merge pull request #2 from kelinfoxy/copilot/scan-and-replace-personal-data
Sanitize personal data from repository history
2026-02-05 14:09:23 -05:00
copilot-swe-agent[bot]
0052fa4ddc Complete personal data replacement in Traefik configs
- Replace remaining domain references in Traefik dynamic configs
- Replace kelinreij.duckdns.org with yourdomain.duckdns.org in:
  - external-host-homeassistant.yml
  - local-host-production.yml
  - sablier.yml
  - markup.yml service URLs

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-02-05 18:41:42 +00:00
copilot-swe-agent[bot]
300d870a2b Replace personal data with variables and placeholders
- Replace hardcoded password in code-server config with ${CODE_SERVER_PASSWORD}
- Replace domain kelin-hass.duckdns.org with yourdomain.duckdns.org in docs
- Replace domain kelinreij.duckdns.org with yourdomain.duckdns.org in homepage config
- Replace personal emails with example addresses
- Replace DuckDNS token and credentials in markup.yml with placeholders
- Replace Let's Encrypt account numbers with placeholders

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-02-05 18:40:44 +00:00
copilot-swe-agent[bot]
94b4906a6a Initial plan 2026-02-05 18:35:18 +00:00
kelin
10aee3b3b1 Fix: Correct Dozzle port and remove unnecessary template files
- Changed Dozzle service port from 8085 to 8080 (correct port)
- Removed authelia config template files (no longer needed)
- Removed db.sqlite3 runtime data file
2026-02-05 13:13:44 -05:00
kelin
4803d2c856 Fix: Add multi-line secret sanitization to deployment script
Added Python script to automatically merge multi-line Authelia secrets
(JWT_SECRET, SESSION_SECRET, STORAGE_ENCRYPTION_KEY) during core
deployment. This prevents envsubst from reading truncated values when
the .env file contains accidental line breaks.

Fixes Authelia startup errors:
- 'encryption key does not appear to be valid for this database'
- Invalid URL parsing due to incomplete variable expansion
2026-02-05 12:36:19 -05:00
kelin
d4c9516e00 Fix: Generate users_database.yml in secrets folder with proper variables
- Move users_database.yml template from config/ to secrets/ folder
- Authelia configuration expects users file at /secrets/users_database.yml
- Replace hardcoded values in configuration.yml with variables:
  - jwt_secret, session secret, storage encryption_key
  - Domain references (kelinreij.duckdns.org → ${DOMAIN})
- Update deploy script to not move config files (already in subdirectories)
- Fix sed command path to target config/configuration.yml
- Remove unnecessary mkdir and mv commands from deploy_core()

This ensures Authelia uses the correctly generated file with user credentials.
2026-02-05 12:12:33 -05:00
kelin
a554d00fd3 Fix: Use variables instead of placeholders in docker-compose files
- Replace hardcoded placeholders with Docker Compose variables
- docker-compose.yml: Use ${DUCKDNS_SUBDOMAINS}, ${DUCKDNS_TOKEN}, ${DOMAIN}, ${SERVER_IP}
- traefik.yml: Use ${DEFAULT_EMAIL} for ACME email
- users_database.yml: Use ${AUTHELIA_ADMIN_USER}, ${AUTHELIA_ADMIN_EMAIL}, ${AUTHELIA_ADMIN_PASSWORD_HASH}
- sablier/docker-compose.yml: Fix to use ${DOMAIN} instead of {{DUCKDNS_DOMAIN}}

This aligns with the correct strategy:
- Docker-compose files use variables (${VAR})
- .env files use placeholders or actual values
2026-02-05 11:57:42 -05:00
Kelin
73cb274160 v0.1.2: Multi-server architecture + security cleanup
- Implement multi-server Traefik + Sablier architecture
- Add label-based automatic service discovery
- Create separate Sablier stack deployment
- Add remote server deployment workflow (Option 3)
- Add 9 new functions for multi-server management
- Remove deprecated config-templates folder
- Replace hardcoded private data with placeholders
- Update backup timestamp format to YY_MM_DD_hh_mm
- Add markup.yml to .gitignore

Breaking changes:
- Removed Sablier from core docker-compose.yml (now separate stack)
- Config templates moved from config-templates/ to docker-compose/core/
- REQUIRED_VARS now dynamic based on deployment type
v0.1.2
2026-02-04 19:36:18 -05:00
Kelin Fox
75e66586d1 Fix Authelia password hash generation to remove 'digest:' prefix
- Use awk to extract only the argon2 hash from Authelia command output
- Prevent 'Digest:' or 'digest:' prefixes from being included in password hashes
- Apply fix to both password generation locations in the script
2026-02-03 23:43:31 -05:00
Kelin
5a4360bc53 Fix Docker Compose variable substitution for password hashes
- Escape $ characters in AUTHELIA_ADMIN_PASSWORD_HASH in deployed .env file
- Prevent Docker Compose from interpreting password hash as environment variables
- Update ez-homelab.sh to source common.sh and use specialized users_database.yml processing
2026-02-03 22:58:52 -05:00
Kelin
59cd225e0e Fix variable substitution in users_database.yml
- Update localize_users_database_file to properly resolve nested variables in AUTHELIA_ADMIN_EMAIL
- Fix template to use correct AUTHELIA_* variables instead of DEFAULT_* variables
- Update deploy-core.sh to only process files containing variables and fix .env path
- Fix file permissions for authelia config files
2026-02-03 22:48:27 -05:00
Kelin
e2a654b3f4 Refactor docker-compose configurations and add new services
- Reorganize Authelia configuration files
- Add new dynamic routing files for Traefik
- Update various service docker-compose files
- Remove outdated templates and scripts
2026-02-03 22:20:09 -05:00
Kelin
ed17bf295a Fix variable substitution in users_database.yml to preserve password hashes
- Modified load_env_file_safely to prevent expansion of $ in .env values
- Updated localize_users_database_file to handle nested variables correctly
- Added fresh template copying in deploy-core.sh to ensure reliable processing
- Fixed password hash corruption during deployment
2026-02-03 21:07:36 -05:00
Kelin
3d5979b5f1 Implement fixes from test results
- Update Docker install to use curl method
- Rename ADMIN_PASSWORD to AUTHELIA_ADMIN_PASSWORD
- Fix Authelia password hash generation (remove grep, no quotes)
- Revert compose labels to single quotes
- Ensure users_database.yml has unquoted password placeholder
2026-02-02 20:59:07 -05:00
Kelin
7e4799f27e Update media docker-compose.yml 2026-02-02 18:48:15 -05:00
Kelin
5b5df8960b Fix variable replacement logic for nested variables and remove repo file modification
- Remove localize_deployment call from main flow to avoid modifying repo files
- Enhance localize_yml_file to recursively expand nested variables using envsubst
- Ensure config files contain actual values, not variable names
2026-02-02 17:30:24 -05:00
Kelin
fd15c18389 Strip carriage returns from .env values to handle DOS line endings 2026-02-02 14:48:28 -05:00
Kelin
10338f2de5 Fix subshell issue in config file processing loops to allow env var replacement 2026-02-02 14:45:13 -05:00
Kelin
98f6b55fdf Fix load_env_file_safely to actually export environment variables 2026-02-02 14:37:23 -05:00
Kelin
457d803f57 Strip inline comments from .env values before parsing to prevent xargs quote issues 2026-02-02 14:11:14 -05:00
Kelin
e5d678ebbe Replace sed-based variable replacement with envsubst for universal handling of special characters 2026-02-02 14:06:26 -05:00
Kelin
cd9dc925f3 Add logging of missing variables and trim keys in .env parsing 2026-02-02 13:56:27 -05:00
Kelin
80b44f8bef Trim whitespace from .env values to ensure proper secret generation 2026-02-02 13:52:28 -05:00
Kelin
4fd30340ef Quote Authelia password hash to prevent Docker expansion warnings, fix variable trimming with xargs, and update comment exclusion pattern 2026-02-02 13:46:44 -05:00
Kelin
1be1ecb264 Fix variable trimming, reload .env after secret generation, and improve comment exclusion in validation 2026-02-02 13:42:22 -05:00
Kelin
faaf39002a Replace personal URLs with placeholders and fix variable replacement logic 2026-02-02 13:19:22 -05:00
Kelin
0041b15cc2 Fix Authelia password copying and update menu logic
- Fix password hash copying to user_database.yml by removing premature env cleanup
- Update menu case logic to match display options (1-4)
- Add input validation loop for better user experience
- Handle special menu options (prerequisites, NVIDIA drivers) appropriately
2026-02-01 01:12:03 -05:00
Kelin
ea5e34935b Resolve merge conflicts and restore local configuration
- Keep local DuckDNS subdomain and token customizations
- Preserve user-specific Authelia configuration
- Maintain local docker-compose customizations
2026-01-31 23:32:42 -05:00
EZ-Homelab Assistant
6c4a3362e0 feat: Major UI improvements to ez-homelab.sh
- Add professional ASCII box styling to main menu
- Implement interactive variable configuration with validation
- Add icons to all prompts (🌐 🌍 🦆 🔑 👤 🔒 📧 🏠)
- Create vanishing prompts that replace with status confirmations
- Add comprehensive menu system with proceed/review/quit options
- Show current configuration values before deployment choices
- Implement proper error handling for invalid inputs
- Add immediate quit functionality with 'q' during any prompt
- Improve spacing and visual hierarchy throughout interface
- Fix deployment flow to prevent accidental starts on invalid input
2026-01-31 05:41:30 -05:00
EZ-Homelab Assistant
41d9a4cd7f feat: standardize traefik.docker.network labels across all docker-compose files
- Add traefik.docker.network=traefik-network label to all local services with traefik.enable=true
- Ensures consistent network selection for Traefik IP discovery
- Prevents routing conflicts when services are on multiple networks
- Updated 12 docker-compose files with 32+ service labels
- Maintains dual network access (homelab-network + traefik-network) for web UIs
2026-01-30 23:45:55 -05:00
EZ-Homelab Assistant
90a26a9ac4 Fix homepage Traefik network routing and update configurations
- Add traefik.docker.network=traefik-network label to homepage service
- Prevent Traefik from using wrong IP from homelab-network
- Resolve 504 Gateway Timeout issues after authentication
- Update various docker-compose configurations and templates
- Clean up unused configuration files
2026-01-30 23:29:00 -05:00
EZ-Homelab Assistant
465c10ae42 fix: ensure script properly configures Traefik and Authelia
- Move Traefik traefik.yml to config/ directory for correct Docker mounting
- Remove invalid session.cookies section from Authelia template and config processing
- Ensure all configuration files are placed in correct locations for Docker containers
- Prevent configuration validation errors that cause service restarts
2026-01-30 19:42:05 -05:00
EZ-Homelab Assistant
072a3384fd fix: update Authelia template with valid password hash
- Replace CHANGEME placeholder with proper argon2 hash
- Default password is 'admin123' for initial setup
- Prevents argon2 decode errors on first startup
2026-01-30 19:18:04 -05:00
EZ-Homelab Assistant
c6fbcb785e fix: move Authelia config files to correct Docker mount location
- Move configuration.yml and users_database.yml to authelia/config/ directory
- Ensure files are in the correct location for Docker volume mount ./authelia/config:/config
- Prevent Authelia from using default configuration instead of processed template
2026-01-30 19:12:49 -05:00
EZ-Homelab Assistant
ea75ea9829 fix: remove REMOTE_SERVER_HOSTNAME dependencies for local deployments
- Remove local-host-production.yml for single-server setups
- Remove remote server sections from sablier.yml for local deployments
- Remove remote server entries from homepage services files when no REMOTE_SERVER_HOSTNAME is set
- Prevent placeholder replacement failures on files not needed for local deployments
2026-01-30 19:06:30 -05:00
EZ-Homelab Assistant
437eb37aff fix: resolve ez-homelab.sh issues for local deployments
- Fix variable substitution in prompt_for_values() to properly display DEFAULT_USER
- Only rename external-host-production.yml for multi-server setups (option 3)
- Prevent REMOTE_SERVER_HOSTNAME validation errors for local deployments (options 1-2)
- Ensure local deployments don't fail on missing remote server variables
2026-01-30 19:03:21 -05:00
EZ-Homelab Assistant
1dd6664968 feat: reorganize .env.example in alphabetical order
- Reorganize OTHER OPTIONAL CONFIGURATIONS section alphabetically by service name
- Improve user experience for finding specific service configurations
- Add clarifying comments for Authelia admin account variables
- Generalize AUTHELIA_ADMIN_PASSWORD to use DEFAULT_PASSWORD variable
2026-01-30 18:39:08 -05:00
Kelin
1225564694 Add UI tool availability check before running wizard
- Menu now checks for whiptail/dialog before launching wizard
- Prevents wizard crashes due to missing UI dependencies
- Provides clear error message and installation instructions
2026-01-29 22:41:31 -05:00
Kelin
8b89575bbb Fix pre-deployment wizard execution and return handling
- Changed menu to run wizard as subprocess instead of exec
- Removed wizard's exec of menu since it now returns naturally
- Wizard now properly returns to menu on completion or error
- Prevents terminal freezing when wizard crashes
2026-01-29 22:41:25 -05:00
Kelin
0bbed196ed Remove legacy Python virtual environment setup
- Removed setup_python_environment function and its call
- Commented out PYTHON_PACKAGES array as it's no longer needed
- Docker Compose V2 is built into Docker CLI, no Python package needed
- Streamlines setup process by removing unnecessary Python setup
2026-01-29 22:19:54 -05:00
Kelin
ea06ac1f92 Improve system package installation error handling
- Added sudo access check before attempting package installation
- Better error messages for apt update/install failures
- Graceful handling of package installation failures in main setup flow
- Provides specific guidance when package installation fails
2026-01-29 22:11:15 -05:00
Kelin
497965473c Fix dependency handling in preflight and setup scripts
- Changed required packages to warnings in preflight.sh (setup.sh installs them)
- Modified setup.sh to proceed with warnings from preflight checks
- Ensures Docker installation installs all dependencies automatically
- Preflight no longer fails on missing jq, tmux, etc.
2026-01-29 22:06:53 -05:00
Kelin
04050454f7 Add support for Debian 13 (Trixie) in OS validation
- Updated validate_os() function to accept Debian 13
- Enables testing on newer Debian versions including Raspberry Pi OS
2026-01-29 21:50:43 -05:00
Kelin
b2436bd81d Fix menu system error handling and OS detection
- Add comprehensive error handling to menu.sh to prevent crashes when scripts fail
- Fix OS detection in common.sh for lsb_release output parsing
- Modify preflight.sh to run all checks without early exit on failures
- Ensure menu navigation remains stable during testing phase
2026-01-29 21:42:37 -05:00