incus-compose

module
v1.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 14, 2026 License: Apache-2.0

README

incus-compose

CI Go Reference

Bring the familiar Docker Compose workflow to Incus. incus-compose implements the Compose specification for the Incus ecosystem, allowing you to define and run multi-container applications using the compose.yaml files you already know.

Demos

Recorded during the beta - the workflow is unchanged in current releases:

Why incus-compose?

Incus provides system containers and virtual machines with strong isolation, but lacks the declarative multi-container orchestration that Docker Compose offers. This tool bridges that gap:

  • Use existing docker-compose.yml files with Incus containers
  • Leverage Incus's native OCI registry support for image pulling
  • Run Docker/OCI images directly from registries
  • Manage complex multi-container applications with familiar commands
  • Benefit from Incus's resource efficiency and security model

New to Incus? See Why Incus? for what the platform brings over a classic OCI engine setup.

Features

Status: Stable.

The workflow you know:

  • Familiar commands: up, down, start, stop, restart, list (and ps), logs, exec, config, plus build, healthd, incus (pass-through), and self-update
  • Compose project parsing via compose-go: .env interpolation, profiles, depends_on, secrets, and configs
  • Automatic compose.incus.yaml override file - keep the upstream compose file untouched and put Incus tuning next to it doc
  • Windows and macOS clients: No Docker Desktop, no WSL, no local Linux VM. incus-compose and the incus client are portable Go binaries: from a Windows or macOS desktop you drive a remote Incus host over HTTPS and manage OCI containers, LXC system containers, and VMs directly. See Installing on Windows.
  • Configuration via INCUS_COMPOSE_* environment variables for every flag, with a configurable parallel worker count doc

Images:

  • OCI image pulling from docker.io, ghcr.io, and other registries
  • Two-stage image cache in a dedicated Incus project (survives down/up, avoids registry rate limits)
  • Local image building via Podman/Docker doc

Networking:

  • Bridge networks with automatic name sanitization; external pre-existing networks
  • Static IPv4/IPv6 addresses with automatic DHCP ranges doc
  • Port forwarding via proxy devices or kernel NAT mode doc

Storage:

  • Storage volumes with UID/GID shifting; bind mounts (pass-through by default, optional seeding) doc
  • Per-volume storage pool placement - pin a database volume to your fast SSD pool doc

Operations:

  • Health checks, restart policies, and depends_on: service_healthy ordering via the ic-healthd sidecar doc
  • Service scaling with up --scale and orphan pruning
  • Incus project isolation
  • Resource limits and other advanced compose features (shm_size, container_name, etc.)

Beyond any OCI engine:

  • Project-wide resource limits - cap CPU and memory for the entire stack, enforced by Incus doc
  • GPU, USB, and raw disk passthrough per service via x-incus-compose.devices doc
  • The full Incus API as an escape hatch: any instance, network, or volume option passes straight through via x-incus doc

Quick Start

Requires Incus 7.0.1 (LTS) or 7.2+, podman or docker for image building and an Incus https remote (needed for healthchecking) with OCI registries added. See Getting Started for the full setup walkthrough.

Install the latest release:

curl -sSfL https://raw.githubusercontent.com/lxc/incus-compose/main/install.sh | sh -s -- -b ~/.local/bin

Or grab a prebuilt archive from the Releases Page. On Arch Linux, install incus-compose-bin (or incus-compose-git for builds from main) from the AUR - maintained by @neitsab and @jochumdev.

Then point it at your existing compose.yaml:

# Start services
incus-compose up -d

# View logs
incus-compose logs -f

# List running services
incus-compose list

# Stop and remove
incus-compose down

All docs: docs.incus-compose.org

Examples

Descriptions are in our docs while the files are in examples.

Support and community

The following channels are available for questions and discussion around incus-compose.

Bug reports

You can file bug reports and feature requests at: https://github.com/lxc/incus-compose/issues/new

Community support

Community support is handled at: https://discuss.linuxcontainers.org

Contributing

Fixes and new features are greatly appreciated. Make sure to read our contributing guidelines first!

Credits

This project is inspired by @bketelsen. Some components are adapted from docker compose. The install.sh script is adapted from golangci-lint.

This project uses AI tools as development aids (drafting, iteration, reviews, tests, and documentation). Architecture, constraints, and final code decisions are owned by the human committers.

Earlier development was on Gitlab.

License

Apache 2.0

Directories

Path Synopsis
Package client - a High-level Incus API wrapper with resource management and parallel execution.
Package client - a High-level Incus API wrapper with resource management and parallel execution.
cmd
ic-healthd command
ic-healthd monitors incus-compose instances with healthchecks and restarts unhealthy ones.
ic-healthd monitors incus-compose instances with healthchecks and restarts unhealthy ones.
ic-healthd/version
Package version provides build version information.
Package version provides build version information.
incus-compose command
Package main provides the incus-compose CLI.
Package main provides the incus-compose CLI.
incus-compose/version
Package version provides build version information.
Package version provides build version information.
Package iclient is a fork of github.com/lxc/incus/v7/client (Apache-2.0).
Package iclient is a fork of github.com/lxc/incus/v7/client (Apache-2.0).
Package project loads Docker Compose files and configures client resources.
Package project loads Docker Compose files and configures client resources.
Package shared holds constants and small helpers shared across packages that would otherwise need to import the full client package.
Package shared holds constants and small helpers shared across packages that would otherwise need to import the full client package.
Package testlib holds what every package's tests need: the tier guards, the naming and argument conventions, and snapshot normalization.
Package testlib holds what every package's tests need: the tier guards, the naming and argument conventions, and snapshot normalization.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL