`juju` CLI commands

See also:

This document provides links to Reference documentation for each juju CLI command.

Alternatively, for similar information in a terminal, do as follows:

  • To get a list of all juju commands and their function, run juju help commands.
  • To drill down into a particular command, execute juju help <command>.
  • To get a list of all command aliases, run juju help commands | grep Alias.
  • To get a list of all the commands, excluding the aliases, run juju help commands | grep -v Alias.

In addition to juju CLI commands, there are also juju plugin commands. See List of known juju plugins.

Command Effect Aliases
actions List actions defined for an application. list-actions
add-cloud Add a cloud definition to Juju.
add-credential Adds a credential for a cloud to a local client and uploads it to a controller.
add-k8s Adds a k8s endpoint and credential to Juju.
add-machine Provision a new machine or assign one to the model.
add-secret-backend Add a new secret backend to the controller.
add-model Adds a workload model.
add-space Add a new network space.
add-ssh-key Adds a public SSH key to a model.
add-storage Adds storage to a unit after it has been deployed.
add-unit Adds one or more units to a deployed application.
add-user Adds a Juju user to a controller.
agree Agree to terms.
agreements List user’s agreements. list-agreements
attach-resource Update a resource for an application.
attach-storage Attaches existing storage to a unit.
autoload-credentials Attempts to automatically detect and add credentials for a cloud.
bind Change bindings for a deployed application.
bootstrap Initializes a cloud environment.
cancel-task Cancel pending or running tasks.
change-user-password Changes the password for the current or specified Juju user.
charm-resources Display the resources for a charm in a repository. list-charm-resources
clouds Lists all clouds available to Juju. list-clouds
collect-metrics Collect metrics on the given unit/application.
config Gets, sets, or resets configuration for a deployed application.
constraints Displays machine constraints for an application.
consume Add a remote offer to the model.
controller-config Displays or sets configuration settings for a controller.
controllers Lists all controllers. list-controllers
create-backup Create a backup.
create-storage-pool Create or define a storage pool.
credentials Lists Juju credentials for a cloud. list-credentials
dashboard Print the Juju Dashboard URL, or open the Juju Dashboard in the default browser.
debug-code Launch a tmux session to debug hooks and/or actions.
debug-hooks Launch a tmux session to debug hooks and/or actions. debug-hook
debug-log Displays log messages for a model.
default-credential Sets local default credentials for a cloud on this client. set-default-credentials
default-region Sets the default region for a cloud. set-default-region
deploy Deploys a new application or bundle.
destroy-controller Destroys a controller.
destroy-model Terminate all machines/containers and resources for a non-controller model.
detach-storage Detaches storage from units.
diff-bundle Compare a bundle with a model and report any differences.
disable-command Disable commands for the model.
disable-user Disables a Juju user.
disabled-commands List disabled commands. list-disabled-commands
download Locates and then downloads a Charmhub charm.
download-backup Download a backup archive file.
enable-command Enable commands that had been previously disabled.
enable-destroy-controller Enable destroy-controller by removing disabled commands in the controller.
enable-ha Ensure that sufficient controllers exist to provide redundancy.
enable-user Re-enables a previously disabled Juju user.
exec Run the commands on the remote targets specified.
export-bundle Exports the current model configuration as a reusable bundle.
expose Makes an application publicly available over the network.
find Queries the Charmhub store for available charms or bundles.
find-offers Find offered application endpoints.
firewall-rules Prints the firewall rules. list-firewall-rules
grant Grants access level to a Juju user for a model, controller, or application offer.
grant-cloud Grants access level to a Juju user for a cloud.
help Show help on a command or other topic.
help-tool Show help on a Juju charm hook tool.
import-filesystem Imports a filesystem into the model.
import-ssh-key Adds a public SSH key from a trusted identity source to a model.
info Displays detailed information about Charmhub charms.
integrate Integrate two applications. relate
kill-controller Forcibly terminate all machines and other associated resources for a Juju controller.
login Logs a user in to a controller.
logout Logs a Juju user out of a controller.
machines Lists machines in a model. list-machines
metrics Retrieve metrics collected by specified entities.
migrate Migrate a workload model to another controller.
model-config Displays or sets configuration values on a model.
model-constraints Displays machine constraints for a model.
model-defaults Displays or sets default configuration settings for new models. model-default
models Lists models a user can access on a controller. list-models
move-to-space Update a network space’s CIDR.
offer Offer application endpoints for use in other models.
offers Lists shared endpoints. list-offers
operations Lists pending, running, or completed operations for specified application, units, machines, or all. list-operations
payloads Display status information about known payloads. list-payloads
refresh Refresh an application’s charm.
regions Lists regions for a given cloud. list-regions
register Registers a controller.
reload-spaces Reloads spaces and subnets from substrate.
remove-application Remove applications from the model.
remove-cloud Removes a cloud from Juju.
remove-credential Removes Juju credentials for a cloud.
remove-k8s Removes a k8s cloud from Juju.
remove-machine Removes one or more machines from a model.
remove-offer Removes one or more offers specified by their URL.
remove-relation Removes an existing relation between two applications.
remove-saas Remove consumed applications (SAAS) from the model.
remove-secret-backend Removes a secret backend from the controller.
remove-space Remove a network space.
remove-ssh-key Removes a public SSH key (or keys) from a model.
remove-storage Removes storage from the model.
remove-storage-pool Remove an existing storage pool.
remove-unit Remove application units from the model.
remove-user Deletes a Juju user from a controller.
rename-space Rename a network space.
resolved Marks unit errors resolved and re-executes failed hooks. resolve
resources Show the resources for an application or unit. list-resources
resume-relation Resumes a suspended relation to an application offer.
retry-provisioning Retries provisioning for failed machines.
revoke Revokes access from a Juju user for a model, controller, or application offer.
revoke-cloud Revokes access from a Juju user for a cloud.
run Run an action on a specified unit.
scale-application Set the desired number of application units.
scp Securely transfer files within a model.
secret-backends Lists secret backends available in the controller. list-secret-backends
secrets Lists secrets available in the model. list-secrets
set-application-base Set an application’s base.
set-constraints Sets machine constraints for an application.
set-credential Relates a remote credential to a model.
set-firewall-rule Sets a firewall rule.
set-meter-status Sets the meter status on an application or unit.
set-model-constraints Sets machine constraints on a model.
show-action Shows detailed information about an action.
show-application Displays information about an application.
show-cloud Shows detailed information for a cloud.
show-controller Shows detailed information of a controller.
show-credential Shows credential information stored either on this client or on a controller. show-credentials
show-machine Show a machine’s status.
show-model Shows information about the current or specified model.
show-offer Shows extended information about the offered application.
show-operation Show results of an operation.
show-secret Shows details for a specific secret.
show-secret-backend Displays the specified secret backend.
show-space Shows information about the network space.
show-status-log Output past statuses for the specified entity.
show-storage Shows storage instance information.
show-task Show results of a task by ID.
show-unit Displays information about a unit.
show-user Show information about a user.
spaces List known spaces, including associated subnets. list-spaces
ssh Initiates an SSH session or executes a command on a Juju machine or container.
ssh-keys Lists the currently known SSH keys for the current (or specified) model. list-ssh-keys
status Report the status of the model, its machines, applications and units.
storage Lists storage details. list-storage
storage-pools List storage pools. list-storage-pools
subnets List subnets known to Juju. list-subnets
suspend-relation Suspends a relation to an application offer.
switch Selects or identifies the current controller and model.
sync-agent-binary Copy agent binaries from the official agent store into a local controller.
trust Sets the trust status of a deployed application to true.
unexpose Removes public availability over the network for an application.
unregister Unregisters a Juju controller.
update-cloud Updates cloud information available to Juju.
update-credential Updates a controller credential for a cloud. update-credentials
update-k8s Updates an existing k8s endpoint used by Juju.
update-secret-backend Update an existing secret backend on the controller.
update-public-clouds Updates public cloud information available to Juju.
update-storage-pool Update storage pool attributes.
upgrade-controller Upgrades Juju on a controller.
upgrade-machine Upgrade the Ubuntu base of a machine.
upgrade-model Upgrades Juju on all machines in a model.
users Lists Juju users allowed to connect to a controller or model. list-users
version Print the Juju CLI client version.
wait-for Wait for an entity to reach a specified state.
whoami Print current login details.

Last updated 6 months ago.