Fantastic Settings and Where to Find Them

It can be difficult to understand how to see how Juju has made its decisions. There are several commands that affect Juju’s behaviour, each with a different scope. Each command controls dozens of settings. This post aims to simplify navigating this.

Juju has lots of knobs to adjust. Almost every option has a bug report (or several) attached to them. Juju is a system that has implemented functionality in response to user requests.


Constraints affect which machine is provisioned. They’re constraints on the shape of the machine that are provisioned. The smallest instance type that satisfies the constraints is chosen.

Configuration affects everything else. Configuration options affect Juju’s behaviour, outside of selecting machines to provision.

Additionally, you may also see series options as command-line arguments for a few commands. They affect the operating system that’s deployed to the newly provisioned machine and behave as a configuration option.

Precedence Rules

Highest position wins.


  • command-line options (--constraints)
  • application constraints
  • model constraints


  • command-line options (--config)
  • application config
  • model config, which is initially set by
  • model defaults

Types of Settings

Bootstrap Constraints

juju bootstrap --bootstrap-constraints --bootstrap-series

The bootstrap process deploys the Juju controller onto a newly provisioned machine on a cloud. Bootstrap constraints only affect the machine that the Juju controller is deployed to.

Application Constraints


Users can define constraints to apply whenever a unit of an application is deployed.

Application constraints are combined with model constraints to determine which instance is provisioned.

Where model and application constraints overlap, the application constraints take precedence.

Model Constraints


Model constraints affect all machines that are created within the model, irrespective which charm is being deployed or application being added to.

They work with application constraints to determine which instance type to provision.

Model Defaults

juju model-defaults

Model defaults specify the model config settings that will be used for any future models.

Model Config

juju model-config

Model-level configuration settings affect anything under the model’s control.

Application Config

juju model-config

Application-level configuration settings affect any new models within the application.

Further Reading


Community Advice on Using Juju in Production

1 Like

@timClicks, in the topic of constraints, perhaps it is handy to note the special case for LXD and Kubernetes?

That’s an excellent point. I will take some time to expand this out.