Skip to content

Repository files navigation

#Labops - A declarative, YAML-based homelab manager

A declarative, YAML-based homelab manager. labops is a CLI tool that simplifies, automates and standardizes the setup, configuration and maintenance of your homelab infrastructure using simple configuration files and powerful backend automation.

📖 Documentation  ·  Getting started  ·  Configuration  ·  Commands

What it does

You describe your homelab once — the machines, the containers, the services they expose — and labops derives the rest from it.

hosts:
  cprox:
    hypervisor: proxmox
    os: debian
    ip: 10.0.10.3
    lxc:
      pihole:
        ip: 10.0.10.5
        os: debian
        vmid: 105
        web_services:
          - proxy_name: pihole
            port: 8080

That container is now three things at once: something labops update will patch, a pihole.lab DNS record, and a pihole.example.com route in your Caddyfile. Nothing was declared twice, so nothing can drift.

  • Host management — setup and updates across Alpine, Debian and RedHat, via built-in Ansible playbooks
  • Proxmox VMs & LXC — containers driven through the Proxmox host with pct, so they need no sshd
  • Target selection — update an arbitrary slice of the lab by kind, OS, tag or position in the tree, ad-hoc or from a named set
  • Docker stacks — sync compose files to a node, bring them up, pull newer images
  • DNS automation — every node becomes a Pi-hole v6 record, derived from the inventory
  • Reverse proxy — a Caddyfile rendered from your web_services, with access lists and wildcard TLS
  • Wake — a magic packet for bare metal, qm / pct start for a Proxmox guest

Installation

pipx install labops
# or
pip install labops

Since labops is a standalone CLI tool, using pipx is highly recommended to isolate its dependencies.

Usage

Point it at a YAML config and go. labops finds homelab.yml by walking up from your current directory, the way docker compose finds a compose file.

labops --help          # every available command
labops validate        # is the config sound?
labops host list       # what do I have?
labops update --all    # patch everything

Full documentation, including a configuration reference and a JSON Schema for editor autocompletion.

Development

See the development guide for the full setup. In short:

uv sync
source .venv/bin/activate

just check      # lint + type-check
just test       # pytest
just docs-serve # preview the docs site

The project uses Dev Containers for a consistent environment and uv for package management. Releases are automated with release-please; the package is published to PyPI by GitHub Actions, not by hand.

About

Manage (Home) Lab Infrastructure

Resources

Stars

1 star

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages