Why I Use Docker Compose for Self-Hosting
Most services documented on this site are deployed using Docker Compose.
This is not because Docker Compose is the only solution, or necessarily the "best" solution for every situation. It is simply the approach that I have found most practical for running and maintaining a homelab.
What Docker Compose Solves
Docker Compose makes it easy to define and manage containers using a single YAML file.
Instead of running long docker run commands manually, services can be described in a structured and repeatable way.
For example:
services:
jellyfin:
image: jellyfin/jellyfin
ports:
- "8096:8096"
volumes:
- ./config:/config
This approach makes container setups easier to read, recreate, back up, and troubleshoot.
Why I Prefer It
Readability
A Compose file acts as documentation for the service.
Months later, it is still possible to quickly understand:
- which ports are exposed
- where data is stored
- which environment variables are used
- how the service is configured
Simpler Backups
Most of my Docker services follow a very predictable structure:
/app
├── docker-compose.yml
├── config/
├── data/
This makes backups straightforward and easy to automate.
Easier Rebuilds
If a server fails or needs replacing, services can usually be restored by:
- Installing Docker
- Copying the folders back
- Running:
docker compose up -d
This has made recovery and migration significantly less stressful.
Works Well for Small Infrastructure
My environment is relatively small:
- Ubuntu mini PCs
- Synology NAS systems
- Self-hosted applications
- Reverse proxies
- UPS shutdown coordination
Docker Compose handles this level of infrastructure comfortably without introducing unnecessary complexity.
Downsides
Docker Compose is not perfect.
YAML Formatting Errors
Small indentation mistakes can break deployments entirely.
This is especially frustrating for beginners.
Large Compose Files Can Become Messy
As environments grow, Compose files can become difficult to maintain.
Some applications also require increasingly complex configurations.
Not Designed for Large-Scale Orchestration
Docker Compose works very well for homelabs and small environments, but it is not intended to replace platforms such as Kubernetes in large production infrastructure.
Why I Still Use It
For self-hosting and homelab use, Docker Compose strikes a balance between:
- simplicity
- flexibility
- portability
- readability
Most importantly, it allows infrastructure to remain understandable.
That matters more to me than using the most advanced orchestration platform available.
Final Thoughts
One of the biggest advantages of Docker Compose is that it lowers the barrier to experimentation.
It becomes easy to:
- test new applications
- rebuild services
- migrate systems
- document infrastructure
- learn gradually over time
For a homelab, that combination is extremely valuable.