Commit Graph

134 Commits

Author SHA1 Message Date
cf061f35d2 Fix: Resolve password hash corruption in Authelia users_database.yml
Critical fix for argon2 password hash preservation:
- Root cause: Bash variable expansion of $ characters in argon2id hashes
- Solution: Write hash directly from Docker output to file, bypass bash variables entirely
- setup-homelab.sh: Stream Docker output directly to /tmp/authelia_password_hash.tmp
- deploy-homelab.sh: Read hash file in Python to avoid any bash expansion
- Result: Password hash correctly preserved with full $argon2id$v=19$m=... format

Other changes:
- Added DOCKER_API_VERSION=1.44 env var for watchtower (API compatibility)
- Watchtower still has issues with Docker 29.1.4 - keeping version pinned for investigation

Tested on Debian 12 with Docker 29.1.4:
 All 11 critical containers healthy
 Authelia authentication working correctly
 Password hash preserved through entire deployment workflow
⚠️  Watchtower restart loop (non-critical, under investigation)
2026-01-13 21:02:49 -05:00
659d580d14 Round 8: Attempt to fix sed escaping for password hash
Issue: sed with | delimiter still has problems with $ in argon2 hash
Attempted fix: Escape special characters before sed replacement

Note: Manual sed with double quotes works, suggesting escaping strategy
may need refinement. Need to test if this resolves the issue.
2026-01-13 20:15:21 -05:00
daaf18b7f9 Complete Round 7 and prepare for Round 8
Round 7 Summary:
 Safe reset script validated - no system crashes
 Full deployment workflow successful
 Password hash corruption fixed (heredoc issue)
 All containers running healthily
 System stability confirmed

Round 8 Preparation:
- Focus on production readiness
- Comprehensive integration testing
- Edge case validation
- SSL certificate generation testing
- Documentation accuracy verification
- User experience polish

Testing scenarios defined for:
- Fresh installation (happy path)
- Re-run detection (idempotency)
- Password reset workflows
- Clean slate between tests
- Service access validation
- SSL certificate validation
- Edge cases (invalid config, network issues, resource constraints)

Success criteria: Scripts ready for public release (v1.0.0-rc1)
2026-01-13 20:10:06 -05:00
ee8a359542 Fix password hash corruption in users_database.yml
Issue: Heredoc variable expansion was mangling password hashes containing $ characters
Solution: Use quoted heredoc ('EOF') with placeholders, then sed replace

The unquoted heredoc was interpreting $ in the argon2 hash as shell variable
expansion, corrupting the hash format.
2026-01-13 20:06:43 -05:00
8b5ba494dd Round 7 Prep: Add safe cleanup procedures to prevent system crashes
CRITICAL: Previous rounds caused system crashes during cleanup operations

New Safe Reset Script:
- Gracefully stops all containers before cleanup
- Waits for proper shutdown sequences
- Removes Docker volumes only after containers stopped
- Prevents filesystem corruption from aggressive rm operations
- Includes confirmation prompts for safety

Deploy Script Improvements:
- Stops existing containers before config file operations
- Removes dangerous auto-cleanup of Docker volumes
- Adds safety checks before directory removal
- Warns about existing databases instead of auto-removing

Dangerous Operations Removed:
- No more rm -rf while containers running
- No more automatic volume deletion
- No more blind directory removal
- No more container restart during volume operations

Testing Guidelines:
- Always use reset-test-environment.sh for cleanup
- Never run cleanup while containers active
- Monitor system health during operations
- Proper shutdown sequence documented

This prevents the BIOS-level crashes experienced in previous rounds.
2026-01-13 20:02:04 -05:00
12df3a1ae2 Round 6: Fix deployment script reliability and credential handling
- Add pre-flight validation checks (internet, disk space, Docker availability)
- Fix Authelia password hash extraction (handle 'Digest:' prefix format)
- Improve credential flow between setup and deploy scripts
- Save plain password for user reference in ADMIN_PASSWORD.txt
- Add cleanup for directory/file conflicts on re-runs
- Add automatic Authelia database cleanup for encryption key mismatches
- Add error recovery guidance with cleanup trap
- Display credentials prominently after deployment
- Update step numbering (now 10 steps with pre-flight)
- Update documentation to Round 6

Tested on fresh Debian 12 installation - both scripts now complete successfully.
2026-01-13 19:57:45 -05:00
ac0e39d091 Round 5 improvements: complete automation and documentation fixes
- Fix password file ownership (user can now read without sudo)
- Add dashboards stack to automated deployment (Step 5/6)
- Add SSL certificate notes to deploy script output
- Clarify .env file location in documentation (stays in repo folder)
- Update README and getting-started.md with accurate deployment steps
- Add Watchtower notification URL documentation
- Improve user feedback with admin credentials and dashboard URLs
- Remove dashboards from 'Next Steps' since it's now automated

User experience improvements:
- Password file readable by user immediately
- Homepage and Homarr deployed automatically
- Clear guidance on .env file management
- Better SSL certificate expectations
2026-01-13 18:43:10 -05:00
f0a3907002 Round 4 improvements: automated config, relative paths, simplified deployment
- Automate Traefik email substitution in deploy script
- Auto-generate Authelia admin password (saved to ADMIN_PASSWORD.txt)
- Standardize all volume paths to use relative paths (./service/config)
- Switch Traefik to HTTP challenge by default (DNS challenge optional)
- Update documentation with improved setup instructions
- Enhance troubleshooting guide
- Update AGENT_INSTRUCTIONS with new conventions
- Simplify .env.example with clearer guidance

These changes reduce manual configuration steps and improve deployment reliability.
2026-01-13 18:30:06 -05:00
f92424ed6d Fix critical deployment issues for Round 4
- Add DOCKER_API_VERSION=1.44 to Watchtower (fixes crash loop)
- Add dockerproxy-network creation to deploy script (fixes dashboard deployment)
- Add explicit acme.json file creation with 600 permissions (fixes SSL cert acquisition)
- Fix setup script to correctly resolve user home directory when run with sudo

These fixes resolve all critical blockers discovered in Round 3 testing.
2026-01-13 17:36:47 -05:00
a53effad10 Add docker-compose configurations and SSL troubleshooting docs
- Added compose files for core, infrastructure, and dashboards stacks
- Added Traefik, Authelia, and DuckDNS configuration files
- Added dockge.managed and dockge.url labels to all services
- Updated Watchtower to latest version with DOCKER_API_VERSION=1.44
- Created comprehensive SSL certificate troubleshooting guide for DuckDNS issues
2026-01-13 16:40:13 -05:00
bbcc4c19c9 Update Homepage dashboard and deployment scripts
- Homepage: Reorganize services by stack instead of by category
- Homepage: Add comprehensive Available to Install sections for all stacks
- Homepage: Update config templates with {{HOMEPAGE_VAR_DOMAIN}} placeholder
- Homepage: Change layout from row to column style
- Scripts: Add sudo requirement to deploy-homelab.sh
- Scripts: Replace NVIDIA driver installation with official installer method
- Scripts: Add build prerequisites and nouveau blacklisting
- Docs: Add AI Automation Guidelines section to docker-guidelines.md
- Docs: Document Homepage auto-update requirements and workflow
- Config: Add bookmarks.yaml template for Homepage
- Config: Add alternatives.yml compose file (Portainer, Authentik)
- Config: Update .env.example and authelia configuration
2026-01-13 00:04:43 -05:00
37a093189e Update documentation for wildcard SSL certificates
- Add wildcard certificate configuration to Traefik docs
- Document DuckDNS DNS challenge limitations
- Add SSL troubleshooting commands to quick reference
- Update getting-started with certificate verification steps
- Emphasize single wildcard cert vs individual certs best practice

Documentation now reflects production wildcard certificate setup.
2026-01-12 23:24:38 -05:00
90462cd179 Fix SSL wildcard certificate setup
- Remove individual certresolver labels from all services except Traefik
- Configure wildcard certificate (*.kelin-hass.duckdns.org) on Traefik only
- Remove AUTHELIA_NOTIFIER_SMTP_PASSWORD env var (filesystem notifier only)
- Fix infrastructure.yml networks section syntax
- Add wildcard SSL certificate setup action report

All services now use single wildcard Let's Encrypt certificate.
Resolves DNS challenge conflicts with DuckDNS provider.
2026-01-12 23:19:27 -05:00
Kelin
de1ac31274 Revise getting started guide for setup process
Updated setup instructions for clarity and added steps for installing git and generating secrets.
2026-01-12 18:52:19 -05:00
Kelin
a1b78ef6d2 Clean up empty lines in services-overview.md
Removed empty lines in services overview documentation.
2026-01-12 18:20:05 -05:00
kelinfoxy
cba45556c7 Complete documentation refactoring with 57 service docs
- Refactored README.md, getting-started.md, quick-reference.md
- Enhanced setup-homelab.sh with 9-step automated process
- Created services-overview.md with all stacks
- Added comprehensive documentation for 57 services in docs/service-docs/
- All services include: overview, configuration, resources, educational content
- Coverage: Core, Infrastructure, Dashboards, Media, Media-Extended, Home Assistant, Productivity, Utilities, Monitoring, Development stacks
- Educational focus with links to tutorials, videos, and guides
2026-01-12 18:03:12 -05:00
Kelin
906e6008ea Merge pull request #1 from kelinfoxy/copilot/add-ai-chat-agent
Add AI-powered Docker service management for VS Code with 60+ homelab services, unified core stack, automated setup and deployment scripts, and modular documentation
2026-01-12 01:18:27 -05:00
copilot-swe-agent[bot]
b5eac0b1e9 Create deployment script and restructure Quick Setup with automated workflow
- Create deploy-homelab.sh script for automated deployment
  - Validates prerequisites (Docker, .env file)
  - Creates required directories and networks
  - Deploys core stack (DuckDNS, Traefik, Authelia, Gluetun)
  - Deploys infrastructure stack (Dockge, Portainer, etc.)
  - Waits for Dockge web UI to be ready
  - Automatically opens browser to Dockge when accessible
  - Comprehensive error checking and user feedback

- Restructure README Quick Setup section
  - Step 1: Clone repository
  - Step 2: (Optional) Run setup-homelab.sh for fresh Debian installations
  - Step 3: Create and configure .env file
  - Step 4: Run deploy-homelab.sh (automated deployment with browser launch)
  - Step 5: Deploy additional stacks through Dockge web UI
  - Include manual deployment alternative for advanced users

- Update scripts/README.md documentation
  - Document both setup-homelab.sh and deploy-homelab.sh
  - Clear usage instructions for each script
  - Browser detection details
  - Troubleshooting section
  - Manual deployment alternatives

Key improvements:
- User only needs to run 2 scripts (setup optional, deploy required)
- Automated browser launch when Dockge is ready
- No manual directory creation or network setup needed
- Smart wait logic ensures UI is accessible before opening browser
- Better user experience with clear progress indicators

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 04:17:57 +00:00
copilot-swe-agent[bot]
afe057c543 Fix Vaultwarden SSO - disable for browser extension and mobile app compatibility
- Remove Authelia middleware from Vaultwarden
- Add comment explaining SSO bypass for app compatibility
- Update services-reference.md to show SSO disabled (✗)

Vaultwarden requires direct access for browser extensions and mobile apps to function properly, similar to Jellyfin and Plex.

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 03:49:06 +00:00
copilot-swe-agent[bot]
32974a5820 Add Bitwarden, setup script, remove redundant files, update disk requirements, and add LinuxServer preference
- Add Vaultwarden (Bitwarden) password manager to utilities.yml
  - Self-hosted password manager with web UI
  - SMTP configuration for email notifications
  - Admin token for management
  - Access at bitwarden.${DOMAIN}
  - Protected by Authelia SSO

- Create automated first-run setup script (scripts/setup-homelab.sh)
  - Installs Docker Engine and Compose V2
  - Configures user groups (sudo, docker)
  - Enables SSH for remote management
  - Detects NVIDIA GPU and provides manual driver installation instructions
  - Creates directory structure and Docker networks
  - Comprehensive instructions for post-setup deployment

- Remove redundant compose files (now in core.yml)
  - Deleted authelia.yml, duckdns.yml, gluetun.yml, traefik.yml
  - All services consolidated into unified core.yml stack
  - Eliminates confusion and duplication

- Update disk space requirements across documentation
  - Changed from "100GB+ system, 1TB+ media" to:
  - "120GB+ system drive (NVMe or SSD highly recommended)"
  - "2TB+ for media & additional disks for services like Nextcloud"
  - Updated in README.md and getting-started.md

- Add preference for LinuxServer.io images
  - Updated copilot-instructions.md
  - LinuxServer images support PUID/PGID for proper file permissions
  - Preference noted in consistency guidelines

- Update core stack documentation
  - Emphasize unified core.yml deployment
  - Add both deployment methods (cd to directory vs full path)
  - Update getting-started.md with correct deployment steps
  - Note removal of separate stack files

- Add Bitwarden environment variables to .env.example
  - BITWARDEN_ADMIN_TOKEN, SIGNUPS_ALLOWED, INVITATIONS_ALLOWED
  - SMTP configuration for email notifications
  - Generation instructions included

- Update services-reference.md
  - Add Vaultwarden to utilities section (now 7 services)
  - Update service count and access URLs

All documentation now consistent with unified core stack approach and includes all requested features.

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 03:47:53 +00:00
copilot-swe-agent[bot]
c7ca73fe78 Add Authentik SSO, fix Uptime Kuma duplicate, enable SSO on Jellyseerr, and improve documentation
- Add Authentik service stack to infrastructure.yml
  - Includes Authentik server, worker, PostgreSQL database, and Redis
  - Alternative SSO with web UI for user management
  - Access at authentik.${DOMAIN}
  - Protected by Authelia SSO (comment out to use standalone)

- Fix Uptime Kuma duplicate listing
  - Remove from utilities.yml
  - Keep only in monitoring.yml where it belongs
  - Add Traefik labels and SSO protection to monitoring instance

- Enable SSO on Jellyseerr by default
  - Changed from bypass to protected (security-first approach)
  - Users can comment out SSO if needed for public access

- Update SSO toggling documentation
  - Emphasize commenting out (not removing) middleware line
  - Add docker command examples for running from outside stack folder
  - Show both "cd to directory" and "full path" methods
  - Add examples for starting and stopping services multiple ways

- Enhance security-first methodology
  - Update copilot instructions to default SSO to enabled
  - Only Plex and Jellyfin bypass SSO by default
  - All other services start secured, expose gradually
  - Emphasize commenting (not removing) for easier re-enable

- Update services-reference.md
  - Add Authentik to infrastructure section (12 services)
  - Move Uptime Kuma to monitoring section (8 services)
  - Remove from utilities (now 6 services)
  - Update Jellyseerr SSO status from ✗ to ✓
  - Improve Authentik documentation with deployment guidance

- Add Authentik environment variables to .env.example
  - AUTHENTIK_SECRET_KEY, DB credentials
  - Generation instructions included

All changes align with security-first principle: start secure, expose services only when ready for deployment.

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 02:33:31 +00:00
copilot-swe-agent[bot]
3cdf8606ff Implement core stack, add SSO to dashboards, and create compact services reference
- Create core.yml combining DuckDNS, Traefik, Authelia, and Gluetun into single stack
  - Simplifies initial deployment (deploy all core services with one command)
  - All core services in /opt/stacks/core/ directory
  - Reduces complexity for first-time setup

- Add Authelia SSO protection to Homepage and Homarr dashboards
  - Prevents exposing service list before authentication
  - Both dashboards now require sign-in to access

- Redesign services-reference.md with compact tree-view table
  - Reduced from ~460 lines to ~150 lines while keeping all info
  - Single comprehensive table with tree structure
  - Shows: Stack, Services, SSO status, Storage paths, Access URLs
  - Fits on 1-2 screen heights as requested

- Add comprehensive "Toggling SSO On/Off" section
  - Quick guide to enable/disable Authelia middleware
  - Use cases for development vs production
  - AI can automatically toggle SSO when asked

- Add "Authelia Customization" section with:
  - Branding and appearance options
  - User management via YAML files
  - Access control rules examples
  - 2FA/TOTP configuration
  - Session management settings
  - Email notification setup
  - Explanation of no web UI (by design, perfect for AI)
  - Alternatives with web UI (Authentik, Keycloak)

- Update .github/copilot-instructions.md
  - Add core stack explanation
  - Update file organization to show core stack structure
  - Add SSO toggling instructions

- Update docs/getting-started.md
  - Simplify Step 7 to deploy single core stack
  - Remove separate steps for DuckDNS, Traefik, Authelia
  - Add verification and troubleshooting for core deployment
  - Update subsequent steps to Step 8, 9, 10

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 01:57:22 +00:00
copilot-swe-agent[bot]
6fec6b501e Update all documentation to reflect 60+ services, Dockge, Traefik, Authelia, and new features
- Update README.md with comprehensive overview of all 40+ services
- Add Quick Setup guide with Dockge deployment steps
- List all service stacks by category (Infrastructure, Media, Home Automation, Productivity, etc.)
- Update AI assistant examples for Traefik, Authelia, VPN routing
- Add network architecture with Traefik routing patterns
- Update common operations for Dockge structure
- Add storage strategy (opt/stacks vs /mnt/)
- Update configuration management section
- Add proxying external hosts overview
- Update getting started checklist with all new steps

- Update docker-guidelines.md with Dockge and Traefik sections
- Add comprehensive Dockge structure explanation
- Add Traefik and Authelia integration patterns
- Document when to use SSO vs bypass
- Add VPN routing patterns with Gluetun
- Update storage strategy recommendations

- Completely rewrite getting-started.md with step-by-step Dockge deployment
- Add DuckDNS signup instructions
- Add detailed core infrastructure deployment (DuckDNS, Traefik, Authelia, Dockge)
- Add Homepage configuration steps
- Add API key configuration for widgets
- Add troubleshooting section
- Add security checklist

- Create docs/services-reference.md - comprehensive catalog of all 60+ services
- Organized by category with descriptions
- Access URLs and SSO requirements
- Storage recommendations
- Quick deployment guide
- Summary table by stack

All documentation now accurately reflects the complete homelab setup with Dockge, Traefik, Authelia, Gluetun, Homepage, and all 40+ services across 10 stack files.

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 01:16:12 +00:00
copilot-swe-agent[bot]
63f39e51a4 Add comprehensive service stacks: Dockge, Homepage, Home Assistant, and all user services
- Add Dockge to infrastructure (primary over Portainer)
- Create dashboards.yml with Homepage and Homarr (AI-configurable)
- Create homeassistant.yml with HA, ESPHome, TasmoAdmin, Node-RED, Mosquitto, Zigbee2MQTT, MotionEye
- Create media-extended.yml with Readarr, Lidarr, Lazy Librarian, Mylar3, Calibre-Web, Jellyseerr, FlareSolverr, Tdarr, Unmanic
- Create productivity.yml with Nextcloud, Mealie, WordPress, Gitea, DokuWiki, BookStack, MediaWiki (all with databases)
- Create utilities.yml with Backrest, Duplicati, Uptime Kuma, Code Server, Form.io, Authelia Redis
- Add Homepage configuration templates (services.yaml, docker.yaml, settings.yaml, widgets.yaml)
  - All services include container names for Docker integration
  - Widgets configured for services that support them (Sonarr, Radarr, Plex, Jellyfin, etc.)
  - Organized by category with proper layouts
- Create docs/proxying-external-hosts.md - comprehensive guide for proxying Raspberry Pi and other external hosts via Traefik
- Update .env.example with all new service credentials and Homepage API keys
- Update infrastructure.yml to prioritize Dockge, add Dozzle, Glances, Docker Proxy
- All services configured with /opt/stacks paths, Traefik labels, and appropriate Authelia middleware

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 01:00:30 +00:00
copilot-swe-agent[bot]
f9a34fe9c7 Implement Dockge structure with Traefik, Authelia, DuckDNS, and Gluetun VPN
- Update AI copilot instructions for /opt/stacks structure and automated config management
- Replace Nginx Proxy Manager with Traefik (file-based configuration for AI)
- Add Authelia for SSO with bypass rules for Jellyfin/Plex apps
- Add DuckDNS for dynamic DNS with Let's Encrypt integration
- Add Gluetun VPN with Surfshark (WireGuard) for secure downloads
- Update all services to use /opt/stacks paths instead of local directories
- Add Traefik labels to all services for automatic routing
- Configure qBittorrent to route through Gluetun VPN
- Update .env.example with all new required variables
- Create configuration templates for Traefik and Authelia
- Add comprehensive Dockge deployment guide

Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-12 00:13:55 +00:00
copilot-swe-agent[bot]
6083da7036 Improve command examples in quick reference guide
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 23:01:15 +00:00
copilot-swe-agent[bot]
0611ddbff4 Fix Docker command examples and log management instructions
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:59:06 +00:00
copilot-swe-agent[bot]
9b466145c3 Clarify repository URL for forked versions
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:57:40 +00:00
copilot-swe-agent[bot]
65a77d1138 Address code review feedback - fix GPU config and documentation consistency
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:56:13 +00:00
copilot-swe-agent[bot]
4c57c58611 Add configuration templates and getting started guide
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:54:04 +00:00
copilot-swe-agent[bot]
cae7c51617 Fix Docker Compose syntax for devices arrays
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:52:10 +00:00
copilot-swe-agent[bot]
1b1464e278 Create AI chat agent for VS Code with Docker service management
Co-authored-by: kelinfoxy <67766943+kelinfoxy@users.noreply.github.com>
2026-01-11 22:50:55 +00:00
copilot-swe-agent[bot]
0c78b3f038 Initial plan 2026-01-11 22:44:55 +00:00
Kelin
ba44d4c49d Initial commit 2026-01-11 17:44:52 -05:00