compose-farm
Compose Farm - run docker compose commands across multiple hosts
Alternatives
Tech stack
No tech stack added yet. Sign in to suggest some
Introduction
Compose Farm is an open-source tool developed by Bas Nijholt for centrally managing Docker Compose stacks on one or more machines. As the project describes it, it's similar to Dockge, but it offers both a CLI and a web interface, and it's designed for multi-host deployments.
You simply specify in a single YAML file which stack runs on which host, then run cf apply. The tool starts, migrates or stops the relevant stacks so that the actual state matches the configuration. It can also manage just a single host: use one folder per stack and map them all to localhost.
It's just a convenient wrapper, not a new paradigm: your existing
docker-compose.ymlfiles work without any modification.
Why Compose Farm
| Problem | How Compose Farm solves it |
|---|---|
| 100+ containers running on one machine | Spread them across multiple hosts |
| Kubernetes is too complex | Just SSH + docker compose |
| Swarm is in maintenance mode | No infrastructure changes required |
| Having to SSH into each host manually | Manage all hosts with a single command |
Key Features
- Declarative configuration: one YAML file defines where every service runs
- Automatic migration: change the host assigned to a stack and run
cf up, and the stack is migrated automatically - Parallel execution: multiple stacks can be started or stopped at the same time
- State tracking: records which host each stack is currently running on
- Traefik integration: generates file-provider configuration for cross-host HTTP routing
- Plugin system: use rsync instead of NFS, pass secrets decrypted on the host, or migrate ZFS datasets per stack
- Web UI: manage stacks from your browser
- Zero changes: existing compose files work as they are
Who It's For
- HomeLab and self-hosting users with several servers running lots of containers
- Operators who find Kubernetes too complex but don't want to depend on Docker Swarm
- Individuals or small teams who want to manage Compose stacks from a single configuration
Installation
uv tool install compose-farm
# or
pip install compose-farm
The official documentation also describes how to deploy it with Docker.
Configuration Example
Create compose-farm.yaml in the directory where you run commands (for example /opt/stacks) or under ~/.config/compose-farm/:
compose_dir: /opt/compose
hosts:
server-1:
address: 192.168.1.10
server-2:
address: 192.168.1.11
stacks:
plex: server-1
jellyfin: server-2
grafana: server-1
Each entry under stacks: corresponds to a folder in compose_dir, which holds that stack's compose file.
Common Commands
cf apply # Make the actual state match the configuration
cf up plex grafana # Start the specified stacks
cf ps # Check status
cf logs -f plex # View logs
Technical Requirements
- uv is recommended, or Python 3.11+
- SSH key login to each Docker host
- Docker and Docker Compose installed on all target hosts
- Shared storage: compose file paths must be identical on all hosts (achievable with NFS or syncing); alternatively, you can use the
syncplugin - With a single host, you don't need SSH, shared storage or the Traefik file-provider
License
MIT open-source license. The source code is hosted on GitHub (basnijholt/compose-farm) and is also published on PyPI.
Discover more
Activepieces
No-code business automation tool like Zapier or Tray. For example, you can send a Slack notification for each new Trello card.
Cronicle
A simple, distributed task scheduler and runner with a web based UI.
Dittofeed
Omni-channel customer engagement and messaging automation platform (alternative to Braze, Customer.io, Iterable).
GameAP
High-performance, free and open-source game server management panel. Pterodactyl and Pelican alternative
HomeButler
🏠 Tells you what changed on your server — only what's worth telling. Single Go binary, no database, nothing running on the machines it watches. MCP server built in.
Infisical
Infisical is the open-source platform for secrets, certificates, and privileged access management.