Canasta has a commmand-line interface (CLI) for creating and running wikis; it is actually also the easiest way to install Canasta in general.
You should have Docker Engine and Docker Compose installed. This is very fast and easy to do on common Linux distros such as Debian, Ubuntu, Red Hat, and CentOS. By installing Docker Engine from apt
or yum
, you get Docker Compose along with it. See the following install guides for each OS:
curl -fsL https://raw.githubusercontent.com/CanastaWiki/Canasta-CLI/main/install.sh | bash
A CLI tool to create, import, start, stop and backup multiple Canasta installations
Usage:
sudo canasta [command]
Available Commands:
list List all Canasta installations
create Create a Canasta installation
import Import a wiki installation
start Start the Canasta installation
stop Shuts down the Canasta installation
restart Restart the Canasta installation
skin Manage Canasta skins
extension Manage Canasta extensions
restic Use restic to backup and restore Canasta
maintenance Run maintenance update jobs
delete Delete a Canasta installation
help Help about any command
Flags:
-h, --help help for Canasta
-v, --verbose Verbose output
Use "sudo canasta [command] --help" for more information about a command.
sudo canasta create -i canastaId -n example.com -w Canasta Wiki -a admin -o docker-compose
sudo canasta import -i importWikiId -d ./backup.sql.gz -e ./.env -l ./LocalSettings.php
sudo canasta extension list -i canastaId
sudo canasta extension enable Bootstrap -i canastaId
sudo canasta extension disable VisualEditor -i canastaId
sudo canasta extension enable VisualEditor,PluggableAuth -i canastaId
sudo canasta skin list -i canastaId
sudo canasta skin enable Vector -i canastaId
sudo canasta skin disable Refreshed -i canastaId
sudo canasta skin enable CologneBlue,Modern -i canastaId
restic is a very useful utility for doing automated backups to a variety of different storage types; though Canasta's usage of restic is configured for using AWS S3-based repositories.
Canasta makes use of restic's dockerized binary.
.env
file. Follow the steps at cli-configure-quickstart to obtain ACCESS_KEY_ID and SECRET_ACESS_KEY.AWS_S3_API=s3.amazonaws.com
AWS_ACCESS_KEY_ID=
AWS_SECRET_ACCESS_KEY=
AWS_S3_BUCKET=
RESTIC_PASSWORD=
.env
file:sudo canata restic init -i canastaId
Now you should be able to use any of the available commands.
check Check restic snapshots
diff Show difference between two snapshots
forget Forget restic snapshots
init Initialize a restic repo
list List files in a snapshost
restore Restore restic snapshot
take-snapshot Take restic snapshots
unlock Remove locks other processes created
view View restic snapshots
Use "sudo canasta restic [command] --help" for more information about a command.
/etc/canasta/
folder.conf.json
file is as follows{
"Installations": {
"wiki1": {
"Id": "wiki1",
"Path": "/home/user/wiki1",
"Orchestrator": "docker-compose"
},
"wiki2": {
"Id": "wiki2",
"Path": "/home/user/canasta/wiki2",
"Orchestrator": "docker-compose"
}
}
}
Installations
there is the list of installations that the CLI currently manages.sudo rm /usr/local/bin/canasta && sudo rm /etc/canasta/conf.json