Skip to content

Server command-line arguments

See also: Client command-line arguments.

MultiTaction Canvus Server has a command-line program, mt-canvus-server, for licensing, user management, backups and troubleshooting.

Deployment Program
Linux package /opt/canvus/bin/mt-canvus-server (run with sudo)
Windows MSI "C:\Program Files\MT Canvus Server\bin\mt-canvus-server.exe" (run from an elevated prompt; the folder differs if you chose another install location)
Container /opt/canvus/bin/mt-canvus-server inside the canvus-combined container

Running CLI commands in a containerised deployment

In a containerised deployment, run CLI commands using podman exec. Use the full path: the program folder is not on the PATH inside the container, so a bare mt-canvus-server is not found.

sudo podman exec -it canvus-combined /opt/canvus/bin/mt-canvus-server <command>

For example:

# Activate a license
sudo podman exec -it canvus-combined /opt/canvus/bin/mt-canvus-server --activate XXXX-XXXX-XXXX-XXXX

# Create an admin user
sudo podman exec -it canvus-combined /opt/canvus/bin/mt-canvus-server --create-admin admin@example.com

# Run a backup
sudo podman exec -it canvus-combined /opt/canvus/bin/mt-canvus-server --backup --backup-path /var/lib/mt-canvus-server/backups/manual

Alternatively, open a shell inside the container and run commands interactively, see maintenance.

The command reference below lists all available options. For standalone installations, replace sudo podman exec -it canvus-combined /opt/canvus/bin/mt-canvus-server with the program path from the table above. For the location of the server application, see server-application.

Which commands need the server running

  • License and user commands (--activate, --create-license-request, --reload-certs and every user command) connect to the server running on the same machine, so the server must be running.
  • --restore: stop the server first. On standalone installations, leave the database service running.
  • --backup runs whether or not the server is running. See backup-and-restore for when to stop it.

Usage

mt-canvus-server [options]

Available options

--help : Show this help.

--version : Show version information.

--activate <activation key> : Activate a server license over the internet using an activation key.

--create-license-request <activation key> : Write an HTML offline activation request to the user's home directory (Ubuntu) or Documents directory (Windows) using an activation key. Upload the file at ls2026.multitaction.com to receive the license file.

--reload-certs : Reload the server TLS certificates after renewal.

--clear-db : Permanently delete everything in the Canvus database, including all canvases, folders and users.

--server-config <filename> : Set the server configuration file. Default: /etc/MultiTaction/canvus/mt-canvus-server.ini on Linux, %PROGRAMDATA%\MultiTaction\canvus\mt-canvus-server.ini on Windows. When this option is not given, the server uses the file named in the MT_CANVUS_SERVER_CONFIG environment variable, if set, before the default.

--no-crash-reporter : Disable the built-in crash reporting system and automatic crash dump upload. Crash reporting is on by default. Setting the environment variable MULTI_DISABLE_CRASH_REPORTER (to any value) also turns it off.

--verbose : Print out verbose debug information.

--verbose-modules <list> : Print debug information only from the named modules (comma-separated). Ignored when --verbose is given. Use when MultiTaction support asks for it.

--print-thread-id : Add the thread ID to each log line.

--minidump-path <path> : Folder where crash dumps are written.

--configure-db : Automatically set up the local Postgresql server and configure Canvus DB settings if needed. Run as root (with sudo) to make sure the application has access to DB and config.

Commands for managing users

Some commands have an optional [passwd] parameter that sets the new password from the command line. If this parameter is not given, a random password is generated and printed. Giving the password on the command line is not secure on a shared system. Passwords set with these commands are not checked against the password policy.

--list-users : List all users on the server, with ID, email, name, type (admin or user) and state (active or blocked).

--create-user <email> [passwd] : Create a new user.

--create-admin <email> [passwd] : Create a new admin user.

--delete-user <email | id> : Delete a user.

--change-email <email | id> <new email> : Change a user login / email address.

--change-name <email | id> <name> : Change a user name.

--change-password <email | id> [passwd] : Change a password for an existing user.

--make-admin <email | id> : Make an existing user an admin.

--make-normal-user <email | id> : Make an existing admin a normal user.

--block-user <email | id> : Block an existing user.

--unblock-user <email | id> : Unblock an existing user.

Commands for creating and restoring backups

--backup : Make a backup of Canvus multisite server and exit. Uses exit code 0 on success.

--restore : Restore a Canvus multisite server backup from the path specified with --backup-path and exit. Any existing canvases and assets will be deleted. Run as an admin user.

--backup-path <path> : Specify the folder where the backup is created to (with --backup) or restored from (with --restore). When creating a backup and --backup-path is specified, the backup is written directly to the given folder. If not specified when creating a backup, a new subfolder is created under the backup/root folder specified in the configuration file and the backup is written to the subfolder. When restoring a backup, this parameter is mandatory.

--backup-skip <list> : Can be used to exclude parts of the data from the backup process. Only used with --backup. <list> is a comma-separated list of these tokens:

-   `db`
-   `assets`

--backup-delete : Delete all files and folders in the backup-path prior to writing the new backup in there. Only used with --backup.

Windows service host (mt-canvus-server-ctl)

On Windows, the mt-canvus-server service runs mt-canvus-server-ctl.exe from the same bin folder. The MSI registers the service for you, set to start automatically, running as LocalSystem and depending on the mt-canvus-postgres service. You only need mt-canvus-server-ctl to register the service by hand:

--install : Register the mt-canvus-server service (display name MT Canvus Server), set to start automatically. Without --username the service runs as LocalSystem.

--username <domain>\<user> : With --install: the account the service runs as. Use . as the domain for a local account.

--password <password> : With --install: the password of that account.

--uninstall : Remove the mt-canvus-server service.

--minidump-path <path> : Folder where crash dumps are written.

--help : Show the options.

Warning

A service registered with --install has no dependency on mt-canvus-postgres, so Windows may start it before the database. Prefer the MSI, which registers the dependency.

The service always reads the default configuration file, %PROGRAMDATA%\MultiTaction\canvus\mt-canvus-server.ini. See Operating Canvus Server on Windows.