Configuration

Merging

How Lawn merges template and instance compose files.
The catalog is community-driven. Want to add an app? Open a PR on GitHub. Support for custom catalogs from other sources is coming soon.

Merging & Overrides

When a container starts, Lawn merges the template compose file with the instance override to produce the final configuration. The template defines the baseline. The instance override stores the user's customizations.

By default, maps (like environment) are merged key by key. The instance override's values take precedence. Lists (like volumes) are replaced entirely if present in the override.

Removing a Variable

Set a variable to null in the override to remove it from the merged result:

services:
  app:
    environment:
      UNWANTED_VAR: null

Replacing Entire Values

Use the !override YAML tag to replace a value entirely instead of merging:

services:
  app:
    ports: !override
      - "9090:8080"

Use the !reset tag to remove a value entirely (the property becomes absent, rather than empty):

services:
  app:
    volumes: !reset

Variable Resolution

Template variables declared in x-lawn.config are resolved at install time. The values are stored in the instance override and substituted into environment variables at container start using ${VAR:-default} syntax.

Config Option Layers

When a config variable uses selectable options, Lawn merges the selected option's compose overlay as an additional layer. The layers are applied bottom to top:

LayerSource
3. User overrideInstance customizations (always wins)
2. Config option overlaysOne layer per active selection
1. TemplateBase compose file from lawn-compose/

Lawn resolves config options recursively — if one option depends on another, the system iterates until the layer set stabilizes.

What Users Can Override

Through the Lawn UI or CLI, users can customize:

SettingHow it's stored
Environment variablesservices.<name>.environment entries
Port mappingsservices.<name>.ports entries
Memory limitsservices.<name>.deploy.resources.limits.memory
Instance namex-lawn.instance.name
Auto-startx-lawn.instance.autoStart
Dismissed noticesx-lawn.instance.dismissedNoticeIds