Introduces centralized configuration management for home lab:
- sync-configs.sh script for pull/push/diff/deploy operations
- hosts.yml inventory tracking 9 hosts (Proxmox, VMs, LXCs, cloud)
- Docker Compose files from all active hosts (sanitized)
- Proxmox VM and LXC configurations for backup reference
- .env.example files for services requiring secrets
All hardcoded secrets replaced with ${VAR} references.
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
6.8 KiB
Home Lab Server Configurations
Version-controlled configuration files for the home lab infrastructure. This system provides a centralized way to track, sync, and deploy Docker Compose files and VM/LXC configurations across multiple hosts.
Quick Start
# Check status of all hosts
./sync-configs.sh status
# Pull latest configs from all hosts
./sync-configs.sh pull
# Pull from a specific host
./sync-configs.sh pull ubuntu-manticore
# Show differences between local and remote
./sync-configs.sh diff
# Push configs (no restart)
./sync-configs.sh push
# Deploy and restart a specific service
./sync-configs.sh deploy sba-bots paper-dynasty
Directory Structure
server-configs/
├── hosts.yml # Host inventory with connection details
├── sync-configs.sh # Main sync script
├── .gitignore # Prevents secrets from being committed
├── README.md # This file
│
├── proxmox/ # Proxmox hypervisor configs
│ ├── lxc/ # LXC container configurations
│ └── qemu/ # VM configurations
│
├── ubuntu-manticore/ # Physical Ubuntu server
│ └── docker-compose/
│ ├── jellyfin/
│ ├── tdarr/
│ └── watchstate/
│
├── sba-bots/ # SBA Discord bots VM
│ └── docker-compose/
│ ├── paper-dynasty/
│ ├── major-domo/
│ └── ...
│
├── strat-database/ # Database services VM
│ └── docker-compose/
│ ├── pd-database/
│ ├── sba-database/
│ └── ...
│
├── arr-stack/ # Media automation LXC
│ └── docker-compose/
│ └── arr-stack/
│
├── n8n/ # Workflow automation LXC
│ └── docker-compose/
│ └── n8n/
│
├── akamai/ # Cloud server (Linode)
│ └── docker-compose/
│ ├── nginx-proxy-manager/
│ ├── major-domo/
│ └── ...
│
└── nobara-desktop/ # Local dev machine
└── docker-compose/
Host Inventory
| Host | Type | IP | Description |
|---|---|---|---|
| proxmox | Proxmox VE | 10.10.0.11 | Main hypervisor (VMs/LXCs) |
| ubuntu-manticore | Docker | 10.10.0.226 | Physical server - media services |
| discord-bots | Docker | 10.10.0.33 | Discord bots and game services |
| sba-bots | Docker | 10.10.0.88 | SBA/Paper Dynasty production |
| strat-database | Docker | 10.10.0.42 | Database services |
| arr-stack | Docker | 10.10.0.221 | Sonarr/Radarr/etc. |
| n8n | Docker | 10.10.0.210 | Workflow automation |
| akamai | Docker | 172.237.147.99 | Public-facing services |
| nobara-desktop | Local | - | Development workstation |
Commands Reference
./sync-configs.sh pull [host]
Pulls Docker Compose files from remote hosts to the local repository. Only syncs docker-compose*.yml, compose.yml, and .env.example files - not application data.
./sync-configs.sh push [host]
Pushes local configs to remote hosts. Does NOT restart services. Use this to stage changes before deployment.
./sync-configs.sh diff [host]
Shows differences between local repository and remote host configurations.
./sync-configs.sh deploy <host> <service>
Pushes config for a specific service and restarts it. Example:
./sync-configs.sh deploy sba-bots paper-dynasty
./sync-configs.sh status
Shows connectivity status and config count for all hosts.
./sync-configs.sh list
Lists all configured hosts and their services.
Secrets Management
Secrets are NOT stored in this repository.
All sensitive values (tokens, passwords, API keys) are referenced via environment variables (${VAR_NAME}) and stored in .env files on each host. The .gitignore prevents .env files from being committed.
For each service that requires secrets, a .env.example file is provided showing the required variables:
# Example .env.example
BOT_TOKEN=your_discord_bot_token_here
API_TOKEN=your_api_token_here
DB_PASSWORD=your_database_password_here
When deploying a new service:
- Copy
.env.exampleto.envon the target host - Fill in the actual secret values
- Run
docker compose up -d
Workflow
Making Configuration Changes
-
Pull latest to ensure you have current configs:
./sync-configs.sh pull -
Edit locally in your preferred editor
-
Review changes before pushing:
./sync-configs.sh diff <host> -
Push changes to the host:
./sync-configs.sh push <host> -
Deploy when ready to restart:
./sync-configs.sh deploy <host> <service> -
Commit to git:
git add -A && git commit -m "Update <service> config"
Adding a New Host
-
Add host entry to
hosts.yml:new-host: type: docker ssh_alias: new-host ip: 10.10.0.XXX user: cal description: "Description here" config_paths: docker-compose: /path/to/compose/files services: - service1 - service2 -
Add SSH alias to
~/.ssh/configif needed -
Create directory and pull:
mkdir -p server-configs/new-host/docker-compose ./sync-configs.sh pull new-host
Adding a New Service
- Create the service on the host with
docker-compose.yml - Pull the config:
./sync-configs.sh pull <host> - Sanitize any hardcoded secrets (replace with
${VAR}references) - Create
.env.exampleif secrets are required - Commit to git
Proxmox Configs
Proxmox VM and LXC configurations are pulled for reference and backup purposes. The sync script does NOT push Proxmox configs back automatically due to the sensitive nature of hypervisor configuration.
To restore a VM/LXC config:
- Review the config file in
proxmox/qemu/orproxmox/lxc/ - Manually copy to Proxmox if needed
- Use Proxmox web UI or CLI for actual restoration
Troubleshooting
Host shows as offline
- Check if the VM/LXC is running on Proxmox
- Verify SSH connectivity:
ssh <host-alias> - Check
hosts.ymlfor correct IP/alias
Changes not taking effect
- Ensure you ran
pushafter editing - Check if service needs restart:
deploycommand - Verify the remote file was updated:
diffcommand
Permission denied on push
- Check SSH key is loaded:
ssh-add -l - Verify user has write access to config directory
- For root-owned paths (arr-stack, n8n), ensure SSH alias uses correct user
Related Documentation
- Tdarr Setup - Media transcoding configuration
- Networking - NPM and network config
- Monitoring - System monitoring setup