canasta config set
From Canasta Wiki
canasta config set
Change configuration values
Synopsis
Change one or more configuration values in the instance .env file. Handles side effects automatically (e.g. updating wikis.yaml when changing HTTPS_PORT).
A Kubernetes instance managed through gitops is not restarted: Argo CD deploys it from its gitops repo. Config set saves the change for that repo, and you deploy it with canasta gitops push, then canasta gitops sync.
canasta config set [flags] [SETTINGS...]
Examples
canasta config set MW_SITE_SERVER=https://example.com
canasta config set --web MW_MAP_DOMAIN_TO_DOCKER_GATEWAY=false
canasta config set --secret --web MAPS_API_KEY=abc123
Arguments
| Argument | Description | Default | Required | Orchestrator |
|---|---|---|---|---|
SETTINGS |
KEY=VALUE pairs to set | Both |
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--force |
-f |
Allow setting unrecognized keys | Both | ||
--id |
-i |
Canasta instance ID | * | Both | |
--no-restart |
Save settings without restarting the instance | Both | |||
--secret |
Store opaque app secrets such as a sidecar credential or a Settings.php API key, bypassing .env validation and side effects. On Compose the value goes in .env, where a sidecar's env can reference it as ${KEY}, and the key name is recorded in config/secret-keys; on a gitops instance it is also stored in the encrypted host vars. On Kubernetes it goes in the gitignored config/secrets.env, which feeds a per-instance Secret consumed by sidecars via secretKeyRef. Recognized configuration keys are rejected; set them without --secret. | Both | |||
--web |
Pass the key(s) to the web container's environment (which also runs the job runner), for a setting the web image or Settings.php reads with getenv() that Canasta does not pass on its own. Without --secret the value is a plain setting: it is stored in .env (and env.template on a gitops instance), shown by 'config get', and the key is listed in config/env-keys-web; on Compose it reaches the container through the generated docker-compose.web-env.yml, on Kubernetes through the web pods' env ConfigMap. Unrecognized keys are accepted without --force; recognized keys and keys named like credentials are refused. With --secret, on Compose the key is listed in config/secret-keys-web and passed the same way; on Kubernetes it is listed in config/secrets-web and exposed to the web pods via secretKeyRef. | Both |
* Defaults to the Canasta instance matching the current directory, if any.
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |