This repository contains Docker-Compose files used to manage and orchestrate various services within my homelab environment. Each configuration is tailored for efficient deployment, management, and scaling of containerized applications. Feel free to explore, use, and modify these files to suit your own homelab needs. Contributions and suggestions are welcome!
- Introduction
- Prerequisites
- Usage
- Secret Management
- Available Services
- Configuration
- Contributing
- License
- Contact
This repository aims to simplify the setup and management of containerized services in a homelab environment using Docker Compose. Each service is defined in a separate compose file, making it easy to start, stop, and configure as needed.
Before using these Docker-Compose files, ensure you have the following installed:
Clone the repository to your local machine using:
git clone https://github.com/andronics/homelab-docker-compose.git
cd homelab-docker-composeThe repository is organized as follows:
homelab-docker-compose/
├── audiobookshelf/
│ └── .env
│ └── compose.yml
├── service2/
│ └── compose.yml
└── README.md
Navigate to the directory of the desired service. If available copy .env.sample to .env by executing:
$ cp '.env.sample' '.env'$ docker compose up -dThis command starts the service in detached mode.
All .env files in this repository are encrypted at rest using a custom git-crypt implementation built on top of OpenSSL AES-256-CBC. Git's clean/smudge filter mechanism transparently encrypts files on git add and decrypts them on git checkout — no manual steps required once the key is in place.
Working directory Git object store
───────────────── ────────────────
plaintext .env ──clean──▶ encrypted blob (what GitHub sees)
plaintext .env ◀─smudge── encrypted blob (restored on checkout)
- clean — runs on
git add; pipes the file throughopenssl enc -aes-256-cbc -pbkdf2 -saltbefore writing to the index. - smudge — runs on
git checkout; pipes the stored blob throughopenssl dec -aes-256-cbc -pbkdf2to restore plaintext in the working tree.
The filter is wired up in .git/config:
[filter "git-crypt"]
clean = git-crypt clean
smudge = git-crypt smudge
required = trueAnd applied to all *.env files via .gitattributes:
*.env filter=git-crypt diff=git-crypt
The encryption key is resolved in priority order:
GIT_CRYPT_KEYenvironment variablepass show git/crypt-key(GPG-encrypted password store)
passwith a GPG key configured, or theGIT_CRYPT_KEYenvironment variable setopenssl(ships with most Linux distros and macOS)- The
git-cryptscript installed to your$PATH
- Install the
git-cryptscript:
# Place the script somewhere on your PATH, e.g.
cp git-crypt ~/.local/bin/git-crypt
chmod +x ~/.local/bin/git-crypt- Make the encryption key available:
# Option A — password store (recommended)
pass insert git/crypt-key # paste the shared key when prompted
# Option B — environment variable
export GIT_CRYPT_KEY='<shared-key>'- Initialise the git filters in the cloned repo:
git-crypt initThis configures the clean/smudge filters in .git/config. Existing .env files will be decrypted automatically on the next git checkout or by running:
git checkout -- .- Create the
.envfile in the service directory. - Force-add it (
.envis in.gitignoreas a fallback safety net):
git add -f <service>/.env
git commit -m "feat(<service>): Add encrypted .env"The clean filter encrypts the file before it ever touches the index. Verify the stored blob is ciphertext with:
git show HEAD:<service>/.env | xxd | head -3
# Should start with: 53 61 6c 74 65 64 5f 5f (ASCII "Salted__")- Audiobookshelf: Audiobook & Podcast Server
- Authentik: Identity Provider & SSO Solution
- Baserow: No-Code Database Platform
- Bazarr: Subtitle Management for Sonarr & Radarr
- Booklore: Book Library Management
- Calibre: Powerful eBook Manager
- Checkmk: Infrastructure Monitoring
- Code: VS Code In The Browser
- Cross-seed: Torrent Cross-Seeding Automation
- Crowdsec: Curated Threat Intelligence Powered By The Crowd
- Emby: Media Server That Streams Audio & Video To Various Devices
- Error-pages: Custom Error Pages For Traefik
- Flaresolverr: Proxy Server To Bypass Cloudflare Protection
- Homer: Full Static HTML/JS Dashboard
- Immich: Photo & Video Management Solution
- Kavita: Multi Format Digital Library
- Lidarr: Music Collection Manager For Usenet And BitTorrent
- Metube: YouTube-DL Web Interface
- MQTT: Message Broker Service
- N8N: Workflow Automation Platform
- Navidrome: Your Music Collection From Anywhere
- NordVPN: VPN Container Network
- Nuclio: Serverless Functions Platform
- OpenWebUI: Web UI For LLM Interactions
- Portainer: Container Management
- Prowlarr: Indexer Manager & Proxy For *ARR PVR Apps
- qBittorrent: BitTorrent Client
- Radarr: Movie Collection Manager
- Readarr: Book Collection Manager
- Recyclarr: TRaSH Guides Sync For Sonarr & Radarr
- ROMM: ROM Library Manager
- Searxng: Privacy-Respecting Metasearch Engine
- Seedbox: Seedbox Management
- Sonarr: Television Collection Manager
- Tdarr: Distributed Transcoding System
- Termix: Terminal Service
- Tor: Overlay Network Enabling Anonymous Communication
- Traefik: Cloud Native Application Proxy
- Traktarr: Trakt Monitoring Daemon That Adds New TV Series & Movies
- TVmaze-sync: TV Show Tracking Sync
- Unpackerr: Monitors Downloads And Automatically Extracts Archives
- Whisparr: Adult Content Management
For detailed information on each service, refer to the respective compose.yml file and any accompanying documentation within the service directory.
Each service directory contains a compose.yml file which can be customized to fit your needs. Common configurations include:
- Ports
- Environment variables
- Volumes
Modify these settings according to your specific requirements before starting the services.
Contributions are welcome! If you have improvements or additional services to add, please fork the repository, create a new branch, and submit a pull request. Ensure your code adheres to the following guidelines:
- Follow the existing directory and file naming conventions.
- Test your changes before submitting.
- Provide a clear description of your changes in the pull request.
This project is licensed under the MIT License. See the LICENSE file for details.
For questions, suggestions, or feedback, please open an issue on GitHub or contact me at andronics@gmail.com.