This page documents the Canasta CLI commands for creating, importing, and managing wikis and wiki farms.
Create a new Canasta installation.
Usage:
canasta create [flags]
Required flags:
| Flag | Short | Description |
|---|---|---|
--id |
-i |
Canasta instance ID (must be alphanumeric with optional hyphens/underscores) |
--admin |
-a |
Initial wiki admin username |
Optional flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--path |
-p |
Current directory | Directory where the installation will be created |
--orchestrator |
-o |
compose |
Orchestrator to use (currently only compose is supported) |
--wiki |
-w |
ID of the wiki (required if --yamlfile is not provided) |
|
--site-name |
-t |
Wiki ID | Display name of the wiki |
--domain-name |
-n |
localhost |
Domain name for the wiki |
--password |
-s |
Auto-generated | Initial wiki admin password |
--yamlfile |
-f |
Path to a custom wikis.yaml file | |
--keep-config |
-k |
false |
Keep config files on installation failure |
--override |
-r |
File to copy as docker-compose.override.yml | |
--rootdbpass |
Auto-generated | Root database password | |
--wikidbuser |
root |
Wiki database username | |
--wikidbpass |
Auto-generated | Wiki database password | |
--envfile |
-e |
Path to .env file with password overrides |
Examples:
Create a basic wiki:
sudo canasta create -i mywiki -w main -n example.com -a admin
Create with custom admin password:
sudo canasta create -i mywiki -w main -n example.com -a admin -s "MySecurePassword123"
Create with custom database passwords (using environment variables to avoid shell history):
sudo canasta create -i mywiki -w main -n example.com -a admin \
--rootdbpass "$ROOT_DB_PASS" --wikidbpass "$WIKI_DB_PASS"
Create with a custom wikis.yaml file:
sudo canasta create -i mywiki -a admin -f ./my-wikis.yaml
Notes:
config/admin-password_{wikiid}.env fileImport an existing MediaWiki installation into Canasta.
Usage:
canasta import [flags]
Required Flags:
| Flag | Short | Description |
|---|---|---|
--id |
-i |
Canasta instance ID |
Optional Flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--path |
-p |
Current directory | Directory for the installation |
--orchestrator |
-o |
compose |
Orchestrator to use |
--domain-name |
-n |
localhost |
Domain name |
--database |
-d |
Path to database dump (.sql or .sql.gz) | |
--localsettings |
-l |
Path to existing LocalSettings.php | |
--env |
-e |
Path to existing .env file | |
--override |
-r |
File to copy as docker-compose.override.yml | |
--keep-config |
-k |
false |
Keep config files on failure |
Example:
sudo canasta import -i importedwiki -d ./backup.sql.gz -e ./.env -l ./LocalSettings.php
Before importing:
.env file (see .env.example)dbroot.env fileAdd a new wiki to an existing Canasta instance (wiki farm).
Usage:
canasta add [flags]
Required Flags:
| Flag | Short | Description |
|---|---|---|
--wiki |
-w |
ID of the new wiki |
--url |
-u |
URL of the new wiki (domain/path format, e.g., 'localhost/wiki2') |
--id |
-i |
Canasta instance ID |
--admin |
-a |
Admin username for the new wiki |
Optional Flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--path |
-p |
Current directory | Path to the Canasta installation |
--orchestrator |
-o |
compose |
Orchestrator to use |
--site-name |
-t |
Wiki ID | Display name of the wiki |
--database |
-d |
Path to existing database dump | |
--password |
-s |
Auto-generated | Admin password for the new wiki |
--wikidbuser |
root |
Wiki database username |
Examples:
Add a wiki at a subdomain:
sudo canasta add -i mywiki -w soccerwiki -u soccer.example.com -a admin
Add a wiki at a path:
sudo canasta add -i mywiki -w docs -u example.com/docs -t "Documentation Wiki" -a admin
Import an existing wiki database:
sudo canasta add -i mywiki -w imported -u example.com/imported -a admin -d ./backup.sql.gz
URL Format:
localhost/wiki2, example.com/docs, wiki.example.comRemove a wiki from a Canasta instance (wiki farm).
Usage:
canasta remove [flags]
Flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--wiki |
-w |
ID of the wiki to remove (required) | |
--id |
-i |
Canasta instance ID | |
--path |
-p |
Current directory | Path to the Canasta installation |
Example:
sudo canasta remove -i mywiki -w soccerwiki
Warning: This command will delete the wiki and its corresponding database. You will be prompted for confirmation.
Delete an entire Canasta installation.
Usage:
canasta delete [flags]
Flags:
| Flag | Short | Default | Description |
|---|---|---|---|
--id |
-i |
Canasta instance ID | |
--path |
-p |
Current directory | Path to the Canasta installation |
Example:
sudo canasta delete -i mywiki
Warning: This command stops and removes all containers, volumes, and configuration files for the installation.
List all Canasta installations managed by the CLI.
Usage:
canasta list
Example:
sudo canasta list
Example output:
Canasta ID Wiki ID Server Name Server Path Installation Path Orchestrator
myfarm wiki1 example.com / /home/user/myfarm compose
myfarm wiki2 example.com /docs /home/user/myfarm compose
mywiki main localhost / /home/user/mywiki compose
This displays all registered installations and wikis, showing:
This example demonstrates creating a wiki farm with multiple wikis using different URL schemes.
1. Create the initial installation with the first wiki:
sudo canasta create -i myfarm -w mainwiki -n example.com -a admin
2. Add a wiki using a path on the same domain:
sudo canasta add -i myfarm -w docs -u example.com/docs -t "Documentation Wiki" -a admin
3. Add a wiki using a subdomain:
sudo canasta add -i myfarm -w community -u community.example.com -a admin
4. View all wikis in the farm:
sudo canasta list
5. Manage extensions for a specific wiki:
sudo canasta extension enable SemanticMediaWiki -i myfarm -w docs
6. Remove a wiki from the farm:
sudo canasta remove -i myfarm -w community