For the complete documentation index, see llms.txt. A markdown version of this page is at /workstations/configuration/configuration-layers/index.md.

Configuration layers

A configuration layer is a WorkstationConfig: packages, tools, code and settings you define once and attach to many workstations.

A configuration layer is a WorkstationConfig: packages, tools, code and settings you define once and attach to many workstations. Setups outlive workstations, so a team’s baseline, a project’s toolchain and your own preferences can each be a layer. Several layers can reach one workstation. Ringleader stacks them by priority, and a higher priority wins. By default, a project layer refines the team’s, and your personal layer sits above both.

A layer reaches a workstation in one of two ways: by label, or by name. Attaching by label is the usual way. Every workstation that carries the label gets the layer, including workstations created later, and a labeled workstation gets layers added later too.

Workstations a layer reaches

A selector never reaches a workstation in another namespace. Inside its namespace, how far a layer’s selector reaches depends on who applied the layer:

  • An ordinary member’s layer reaches only the workstations that member owns. Labels narrow that further, and never widen it to a colleague’s workstation.
  • A namespace administrator’s layer reaches every workstation in the namespace that its labels match.
  • spec.selector.ownerScope: true limits either one to the workstations its author owns.

An Integration has rules of its own, which Integration reach describes.

A reference in spec.configs is not limited this way: the workstation’s owner chose it. Roles and RoleBindings describes ownership and roles.

Layer merge order

Ringleader starts from the workstation’s own settings and applies every layer that reaches it over them, in order of priority, lowest first. Each layer has a priority:

  • A layer attached by label: 50, unless it sets another.
  • A personal layer, which reaches every workstation you own: 75, unless it sets another.
  • A layer attached by name: the priority written on the reference, or 0.
  • A layer Ringleader generates from an Integration, which connects workstations to a shared service: always -100. A layer you write wins over it at any priority above -100.

When layers conflict, the layer applied later wins. A devtool or a tool configuration that more than one layer declares keeps the highest layer’s whole entry. A higher-priority layer replaces the whole dotfilesRepo setting, the workstation’s own included. capabilities doesn’t merge by priority, as Workstation capabilities explains.

Only image, defaultLocalBinding and tailscale work the other way. Ringleader applies the workstation’s own value for them after the layers, so the workstation’s value wins.

Because the workstation’s own settings are the base, a layer that sets the same single value or variable overrides them, whatever its priority. To override a layer, write a layer of your own at a higher priority. Override an Integration for Claude Code shows an example.

Placement and lifetime come from the workstation alone, and a WorkstationConfig that sets them is refused when you apply it. Attachment fields lists the fields it refuses. To see the merged result for a workstation, run rl workstation get-resolved-configuration with its name, as Configuration merging and resolution describes.

Layers and the local runtime

The local container runtime is the workstation that runs Docker on your own computer. It is named local-runtime, it is in the local namespace, and it carries one label, role: local-container-runtime. A selector treats it like any other workstation:

  • A WorkstationConfig or an Integration in local with ownerScope: true and no labels reaches it, because you own it.
  • A selector with labels reaches it only when the runtime carries every one of them.

So in the local namespace, give a WorkstationConfig or an Integration labels. A WorkstationConfig that reaches the runtime installs its packages and tools next to Docker. An Integration that adds a key there adds it for the runtime. The local runtime installs the docker and kind devtools, so its containers trust the certificate an Edge presents, when the runtime has one. Containers on the workstation explains which connections reach the Edge and what a hand-created kind cluster needs.

To reach the local runtime on purpose, name its label:

spec:
  selector:
    matchLabels:
      role: local-container-runtime

Personal layers

A personal layer follows you rather than a group of workstations: it reaches every workstation you own in the namespace. It is a WorkstationConfig whose selector sets ownerScope: true and names no labels:

spec:
  selector:
    ownerScope: true      # no matchLabels, which is what makes it personal

Leave out namespace from its file, and the same file works in whichever namespace you apply it to. A personal layer differs from other layers in these ways:

  • It defaults to priority 75, above the default of 50 for a layer attached by label. So your preferences beat a team default without your picking a number.
  • Most of its steps don’t block the workstation by default: a failed package, devtool, script, source, file or service from a personal layer leaves the workstation Available. Step failures and retries lists the steps that still block it.
  • It reaches every workstation you own in the namespace, whatever the workstation is for, including the local runtime in local. Choose how wide a selector reaches says what to keep in it.
  • It doesn’t reach a teammate’s workstation that you have been granted SSH on. That workstation gets its owner’s personal layer.
  • Editing it reconfigures every workstation you own at once, not just the next one you create. To preview an edit before you apply it, run rl diff -f on the file.

ownerScope: true together with matchLabels is not a personal layer. It is a layer that reaches only its author’s workstations with those labels, at the ordinary priority and with the ordinary failure policy.

To write one step by step, follow Bring your setup to every workstation.

Attach a layer by label

To give a group of workstations the same layer, follow these steps:

  1. Put a label on each workstation that should get the layer:

    apiVersion: workstations.ringleader.dev/v1
    kind: Workstation
    metadata:
      name: billing-dev
      namespace: acme
      labels:
        project: billing
  2. Name that label in the layer’s selector:

    apiVersion: workstations.ringleader.dev/v1
    kind: WorkstationConfig
    metadata:
      name: billing-tools
      namespace: acme
    spec:
      selector:
        matchLabels:
          project: billing
      packages:
        - postgresql-client

The selector matches every workstation in its own namespace that carries all the labels it names. A workstation can carry other labels too. A WorkstationConfig with no labels in its selector matches nothing, unless it is a personal layer.

Attach a layer by name

To give a layer to one workstation, or a few you pick by hand, list it in each workstation’s spec.configs, and give the layer no selector. The layer must be in the workstation’s own namespace, and no other workstation gets it.

spec:
  configs:
    - name: team-base
      priority: 100

Write the priority on each entry. An entry with no priority sits at 0, below every default, so a personal layer at 75 would override the layer you picked.

Choose how wide a selector reaches

One edit to a layer changes every workstation its selector matches, at once. A wide selector also reaches workstations you weren’t thinking about: one that does a different job, or one somebody creates next month. Pick the narrowest of these that covers the workstations you mean:

  • For one workstation, or a few you pick by hand, attach the layer by name.
  • For a group with a shared purpose, select a label that names the purpose, such as project: billing. A workstation joins the group when someone gives it the label.
  • For every workstation you own, use a personal layer. Keep it to settings that are safe on any workstation, whatever it runs: your dotfiles, your shell, a few small packages.

Keep network layers behind a label

Each of these changes how a workstation reaches the network, so keep both behind a label:

  • An Integration of type: httpProxy, which adds a key to requests as they leave the workstation. Effects of injection on a workstation lists what changes, for the workstation and for the containers it runs.
  • A WorkstationConfig with an egress policy, which restricts outbound connections (see outbound restrictions).

To see what a selector reaches, list the workstations that carry the label, then read what applies to one of them:

rl workstation get -n acme -l project=billing
rl workstation get-resolved-configuration billing-dev -n acme

The second command lists each layer under appliedConfigs, with source: selector for a label match. An Integration appears there as integration-<name>. In rl tui, x on a workstation lists the layers and other resources whose selectors reach it.

Next steps

  • WorkstationConfig lists every field a layer can set.
  • Selectors says what a selector with no labels matches, for each kind of resource.
  • Integration connects workstations to a shared service through a generated layer.