The nuxeoctl
script enables various options and commands, explained in details below.
It is available as an executable in the Docker image.
If you have installed Nuxeo from the Tomcat server ZIP, its location is the bin
folder of the Nuxeo server.
For Windows users, its equivalent is the nuxeoctl.bat
script, also located in the bin
folder.
nuxeoctl Usage
Here is the script usage:
nuxeoctl <command> [options] [--] [command parameters]
Issue nuxeoctl help
to print this information:
docker run docker.packages.nuxeo.com/nuxeo/nuxeo nuxeoctl help
Particularities:
- You can use multiple options at once but only one command.
- The values separated by
|
are choices (|
means "exclusive or"). - Option and command parameters between square brackets (
[]
) are optional. - Options and commands can have some parameters, optional or not. An equal sign (
=
) can be used (ie.-d org.nuxeo com.company
equals to-d=org.nuxeo,com.company
). - Some options also have a shortcut (ie.
-h
equals to--help
). - Two dots (
..
) means the command accepts repeated parameters. - Commands may need to be prefixed with
--
to separate them from options when confusion arises.
Per-command Usage
nuxeoctl encrypt [--encrypt <algorithm>] [<clearValue>..] [-d [<categories>]|-q]
Output encrypted value for <clearValue>.
If <clearValue> is not provided, it is read from stdin.
nuxeoctl decrypt '<cryptedValue>'.. [-d [<categories>]|-q]
Output decrypted value for <cryptedValue>. The secret key is read from stdin.
nuxeoctl config [<key> <value>].. <key> [<value>] [--encrypt [<algorithm>]] [--set [<template>]] [-d [<categories>]|-q]
Set template or global parameters.
If <value> is not provided and the --set 'option' is used, then the value is read from stdin.
nuxeoctl config [--get] <key>.. [-d [<categories>]|-q]
Get value for the given key(s).
nuxeoctl config [--get-regexp] <regexp>.. [-d [<categories>]|-q]
Get value for the keys matching the given regular expression(s).
nuxeoctl help|status|showconf [-d [<categories>]|-q]
nuxeoctl configure [-d [<categories>]|-q|-hdw]
nuxeoctl stop [-d [<categories>]|-q|--gui <true|false|yes|no>]
nuxeoctl start|restart|console|startbg|restartbg [-d [<categories>]|-q|--clid <arg>|--gui <true|false|yes|no>|--lenient|-hdw]
nuxeoctl mp-show [command parameters] [-d [<categories>]|-q|--clid <arg>|--xml|--json]
nuxeoctl mp-list|mp-listall|mp-update [command parameters] [-d [<categories>]|-q|--clid <arg>|--xml|--json]
nuxeoctl mp-reset|mp-purge|mp-hotfix|mp-upgrade [command parameters] [-d [<categories>]|-q|--clid <arg>|--xml|--json|--accept <true|false|yes|no|ask>]
nuxeoctl mp-add|mp-install|mp-uninstall|mp-remove|mp-set|mp-request [command parameters] [-d [<categories>]|-q|--clid <arg>|--xml|--json|--nodeps|--relax <true|false|yes|no|ask>|--accept <true|false|yes|no|ask>|-s|-im]
nuxeoctl register [<username> [<project> [<type> <description>] [<pwd>]]]
Register an instance with Nuxeo Online Services.
nuxeoctl register --clid <arg>
Register an instance according to the given CLID file.
nuxeoctl register --renew [--clid <arg>]
Renew an instance registration with Nuxeo Online Services.
nuxeoctl pack <target> [-d [<categories>]|-q]
nuxeoctl connect-report [--output <file>|--gzip <*true|false|yes|no>|--pretty-print <true|*false|yes|no>]
Options
Commands
Command | Description |
---|---|
help |
Print this message. |
gui |
Deprecated: use start --gui true option instead. |
start |
Start Nuxeo server in background, waiting for effective start. Useful for batch executions requiring the server being immediately available after the script returned. Note: On Windows with the Tomcat server ZIP, the start command launches the Control Panel. |
stop |
Stop any Nuxeo server started with the same nuxeo.conf file. |
restart |
Restart Nuxeo server. |
config |
Get and set template or global parameters. |
encrypt |
Output encrypted value for a given parameter. |
decrypt |
Output decrypted value for a given parameter. |
configure |
Configure Nuxeo server with parameters from nuxeo.conf . |
console |
Start Nuxeo server in a console mode. Ctrl+C will stop it. |
status |
Print server running status. |
startbg |
Start Nuxeo server in background, without waiting for effective start. Useful for starting Nuxeo as a service. |
restartbg |
Restart Nuxeo server with a call to startbg after stop . |
pack |
Build a static archive. |
showconf |
Display the server configuration. |
connect-report |
Dump a json report about the running server. |
mp-list |
List local Marketplace packages (including hotfixes). |
mp-listall |
List all Marketplace packages. |
mp-update |
Update cache of Marketplace packages list. |
mp-add |
Add Marketplace package(s) to local cache. You must provide the package file(s), name(s) or ID(s) as parameter. |
mp-install |
Run Marketplace package installation. It is automatically called at startup if installAfterRestart.log file exists in data directory. Else you must provide the package file(s), name(s) or ID(s) as parameter. |
mp-uninstall |
Uninstall Marketplace package(s). You must provide the package name(s) or ID(s) as parameter (see mp-list command).If uninstalling a package by its ID and other versions of the same package are available, the most up-to-date will be installed instead. |
mp-remove |
Remove Marketplace package(s). You must provide the package name(s) or ID(s) as parameter (see mp-list command). |
mp-reset |
Reset all packages to DOWNLOADED state. May be useful after a manual server upgrade. |
mp-set |
(Since Nuxeo 5.9.2) Install a list of Marketplace packages and remove those not in the list. |
mp-request |
Install and uninstall Marketplace package(s) in one command. You must provide a quoted list of package names or IDs prefixed with + (install) or - (uninstall). |
mp-purge |
Uninstall and remove all packages from the local cache. |
mp-hotfix |
Install all the available hotfixes for the current platform, but do not upgrade already installed hotfixes versions. For the latter, please use mp-upgrade (to upgrade everything) or mp-install with the desired version (to install a specific package) instead. (requires a registered instance).
|
mp-upgrade |
Get all the available upgrades for the Nuxeo Packages currently installed (including installed hotfixes and Studio package(s)). If a snapshot package is installed, it will not be reinstalled even if it has been updated. In this case, you should use mp-remove then mp-install instead. |
mp-show |
(Since Nuxeo 5.7.1) Show Marketplace package(s) information. You must provide the package file(s), name(s) or ID(s) as parameter. |
register |
Register your instance with an existing Connect account. You must provide the credentials, the project name or ID, its type and a description. |
The following commands cannot be executed on a running server: pack
, mp-purge
, mp-add
, mp-install
, mp-uninstall
, mp-request
, mp-remove
, mp-hotfix
, mp-upgrade
, mp-reset
.
Most mp-*
commands will have different behavior if the instance is registered or not (they need an authenticated access to the private Marketplace channels).
If the server has no access to Internet, mp-*
commands will only use packages available in the local cache.
If using a Nuxeo Package not compliant with the current platform, you will have to relax the constraint on current platform (see --relax
option). Be very careful since that can lead to install other packages not designed for your current Nuxeo version unless you perform a unitary install (see --nodeps
option).
Additional Parameters
All parameters following a command which accepts no parameter are passed to the Java process when executing the command. That can be used for specific installs on which you rely on server specific parameters.
Environment Variables
Here are the OS environment variables which are read by nuxeoctl
.
Variable | Description |
---|---|
NUXEO_HOME |
Path to server root directory. |
NUXEO_CONF |
Path to nuxeo.conf file. |
PATH |
|
JAVA |
Path to the java executable. |
JAVA_HOME |
Path to the Java home directory. Can also be defined in nuxeo.conf . |
JAVA_OPTS |
Optional values passed to the JVM. Can also be defined in nuxeo.conf . |
REQUIRED_JAVA_VERSION |
Nuxeo requirement on Java version. |
Java Usage
Launcher can be run as a Java command, without using the Shell (nuxeoctl
) or Batch (nuxeoctl.bat
) script.
The equivalent Java command to Shell command is printed at startup. See the line starting with "Launcher command:". It can be reused for writing your own scripts.
Here is the Java usage:
java [-Dlauncher.java.opts="JVM options"] [-Dnuxeo.home="/path/to/nuxeo"] [-Dnuxeo.conf="/path/to/nuxeo.conf"] \
[-Djvmcheck=nofail] -jar "path/to/nuxeo-launcher.jar" \
[options] <command> [command parameters]
Java Options
Option | Description |
---|---|
launcher.java.opts |
Parameters for the server JVM (default are -Xms512m -Xmx1024m -XX:MaxPermSize=512m ). |
nuxeo.home |
Nuxeo server root path (default is parent of called script). |
nuxeo.conf |
Path to nuxeo.conf file (default is $NUXEO_HOME/bin/nuxeo.conf ). |
jvmcheck |
If equals to "nofail", will continue execution even if JVM does not fit requirements, else will exit. |
Commands
Additional Parameters
See the nuxeoctl
additional parameters.
Exit Code Values
Exit code values are following the Linux Standard Base Core Specification 4.1.
If the status command was requested, nuxeoctl
will return the following exit status codes:
0 | Program is running or service is OK |
3 | Program is not running |
4 | Program or service status is unknown |
In case of an error while processing any action except for status, nuxeoctl
shall print an error message and exit with a non-zero status code:
1 | Generic or unspecified error |
2 | Invalid or excess argument(s) |
3 | Unimplemented feature |
4 | User had insufficient privilege |
5 | Program is not installed |
6 | Program is not configured |
7 | Program is not running |