canasta create
canasta > create
canasta create
Create a new Canasta instance
Synopsis
Create a new Canasta MediaWiki instance. Generates configuration files, starts the containers, and runs the MediaWiki installer. With --skip-install, the installer is skipped and the instance is connected to an external database that already holds a MediaWiki schema.
With --database, the wiki is created from the dump instead of by the installer. Dumps that canasta export writes beside the main one for the wiki's extra databases (<stem>.<database>.sql, .sql.gz, .sql.xz or .sql.zst, where <stem> is the main dump's path without its .sql extension and compression suffix) are imported too, and each database is declared for the wiki (see canasta backup databases). A file whose database name is not valid, is a MariaDB system database, or is another wiki's database is reported and skipped.
canasta create [flags]
Examples
canasta create -i mysite -w main -n example.com
canasta create -i mysite -w main -n example.com -d /path/to/dump.sql
canasta create -i mysite -w main -n localhost
canasta create -i mysite -w main -n example.com -e prod.env --skip-install
Flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--domain-name |
-n |
Domain name | ✓ | Both | |
--id |
-i |
Canasta instance ID | ✓ | Both | |
--wiki |
-w |
ID of the wiki | Unless --yamlfile |
Both | |
--access-mode |
Access mode for content PVCs (ReadWriteOnce or ReadWriteMany). Use ReadWriteMany with an RWM-capable storage class for multi-node multi-replica web pods. | Kubernetes | |||
--admin |
-a |
Initial wiki admin username | WikiSysop |
Both | |
--argocd-namespace |
Namespace for Argo CD | argocd |
Kubernetes | ||
--build-arg |
Build argument KEY=VALUE forwarded to the --build-from image builds (repeatable, e.g. --build-arg MW_VERSION=master). A user-supplied BASE_IMAGE overrides the auto-detected base: a local canasta-base build, from Canasta/ when it has Dockerfile.canasta or else from CanastaBase/ when that is in the source directory, else the published canasta-base image for Canasta source and the current Canasta release image for an overlay. The local canasta-base build is then skipped. |
Both | |||
--build-from |
Build from a source directory on the instance's host (with --host, an absolute path or one starting with a quoted '~' (for example '~/x')) | Both | |||
--canasta-base |
Run the canasta-base image (MediaWiki core without the bundled extensions and skins) instead of canasta. Without --build-from it is the canasta-base release matching this CLI's Canasta version, which upgrade moves to each new release. With --build-from, only canasta-base is built from the source directory, and upgrade rebuilds it the same way. |
Both | |||
--canasta-image |
Custom Canasta image reference | Both | |||
--composer |
Path on the controller (the machine running canasta) to a custom composer.local.json | Both | |||
--database |
-d |
Path on the controller (the machine running canasta) to an existing database dump (plain SQL, or compressed with gzip, xz or zstd). Extra-database dumps beside it (<stem>.<database>.sql, .sql.gz, .sql.xz or .sql.zst) are imported and declared for the wiki. | Both | ||
--docker-host |
Docker API socket on the target. Set this when the target uses rootless podman (typically unix:///run/user/<uid>/podman/podman.sock) or rootless Docker. Persisted to the instance registry so subsequent start, stop, config set, etc. inherit it. Leave unset for system Docker on /var/run/docker.sock. |
Both | |||
--envfile |
-e |
Path on the controller (the machine running canasta) to a .env file with password overrides | Both | ||
--global-settings |
-g |
Path on the controller (the machine running canasta) to a global settings file | Both | ||
--host |
-H |
Target host for the new instance (default: localhost) | Both | ||
--images |
-I |
Path on the controller (the machine running canasta) to a tar (.tar or .tar.gz) of a wiki's images directory at the hash-directory level (0/, 1/, archive/, ...). Its files are copied into the wiki's uploads (images/<wiki>/) as www-data — a placement restore, not importImages. Pairs with --database, which supplies the File: page rows; a leading images/ parent in the tar is elided. | Both | ||
--ingress-class |
Kubernetes ingress class name (e.g. nginx, traefik, alb) | Kubernetes | |||
--keep-config |
-k |
Keep config files on failure | Both | ||
--orchestrator |
-o |
Container orchestrator (k8s is an alias for kubernetes) | compose |
Both | |
--override |
-r |
File on the controller (the machine running canasta) to copy to docker-compose.override.yml | Compose | ||
--password |
-s |
Initial wiki admin password (auto-generated if not provided) | Both | ||
--path |
-p |
Canasta installation directory. Default is '.' for local installs; with --host, default is '~/canasta' on the remote and the value must be absolute (or '~'-prefixed) — relative paths are rejected because they'd otherwise be resolved against the laptop's filesystem. | . |
Both | |
--rootdbpass |
Root database password (auto-generated if not provided) | Both | |||
--site-name |
-t |
Display name of the wiki (defaults to wiki ID) | Both | ||
--skip-argocd-install |
Skip Argo CD installation (assume already present) | Kubernetes | |||
--skip-install |
Skip the MediaWiki installer (install.php) and connect to a database that already has a MediaWiki schema. Requires USE_EXTERNAL_DB=true (set via -e envfile) and cannot be combined with --database. Use this when an external database (e.g. RDS/Aurora) was provisioned separately and already holds the wiki's tables. | Both | |||
--skip-tls |
Skip automatic Let's Encrypt TLS setup | Both | |||
--staging-certs |
Use Let's Encrypt staging CA (untrusted by browsers, but avoids rate limits while testing) | Both | |||
--storage-class |
Kubernetes storage class for shared volumes (e.g. nfs, efs) | Kubernetes | |||
--tls-email |
Email for Let's Encrypt certificate notifications | Kubernetes | |||
--wiki-settings |
-l |
Path on the controller (the machine running canasta) to a per-wiki Settings.php | Both | ||
--wikidbpass |
Wiki database password (auto-generated if not provided) | Both | |||
--wikidbuser |
Database account MediaWiki connects with (default: mediawiki, or mediawiki_<id> on an external database on Docker Compose, since the server can serve other instances). The CLI creates it with access to the instance's wiki databases only, logging in to an external database as the env file's MYSQL_USER. Pass root to start MediaWiki on the database administrator account; the next upgrade moves it to its own account unless CANASTA_DB_ROOT_ACCOUNT=true is set. | Both | |||
--yamlfile |
-f |
Initial wikis.yaml file, on the controller (the machine running canasta) | Both |
Global flags
| Flag | Shorthand | Description | Default | Required | Orchestrator |
|---|---|---|---|---|---|
--help |
-h |
Show help message and exit | Both | ||
--verbose |
-v |
Enable verbose output | Both |