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 --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 |
With --secret, also pass the key(s) to MediaWiki, which reads them with getenv() in Settings.php. On Compose the key is listed in config/secret-keys-web and added to the web container's environment (which also runs the job runner) through the generated docker-compose.web-env.yml. 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 |