Skip to content

Running

This article describes how to start and stop the CSE, and how to use the command console interface.

Running the CSE

You can start the CSE by simply running it from the command line. This is the simplest way to start the ACME CSE.

Start ACME CSE
acmecse
Start ACME CSE as a module
python3 -m acme

The current working directory is used as the base directory for the CSE and the acme.ini configuration file must be in the same directory. An interactive configuration process is started if the configuration file is not found.

Different Configuration File

The CSE can also be started with a different configuration file:

Start ACME CSE with a different configuration file
acmecse --config <filename>
Start ACME CSE with a different configuration file
python3 -m acme --config <filename>

The current working directory is still the base directory for the CSE and the configuration file is still expected to be located in this directory.

Different Base Directory

The CSE can also be started with a different base directory:

Start ACME CSE with a different base directory
acmecse -dir <directory>
Start ACME CSE with a different base directory
python3 -m acme -dir <directory>

This will use the specified directory as the root directory for runtime data such as data, logs, and temporary files. The configuration file acme.iniis expected to be in the specified directory, or it will be created there if it does not exist.

Secondary init Directory

A base directory may also host a secondary init directory that is used for importing further resources such as attribute definitions and scripts. Resources in this directory are automatically imported when the CSE starts, and processed after the resources in the primary init directory have been imported and processed.

Command Line Arguments

The ACME CSE provides a number of command line arguments that will override the respective settings from the configuration file. They can be used to change certain CSE behaviours without changing the configuration file.

Command Line Argument Description
-h, --help Show a help message and exit.
--config <filename> Specify a configuration file that is used instead of the default (acme.ini) one.
--base-directory <directory>,
-dir <directory>
Specify the root directory for runtime data such as data, logs, and temporary files.
--db-directory <directory> Specify the directory where the CSE's data base files are stored.
--db-reset Reset and clear the database when starting the CSE.
--db-type Specify the DB's storage type.
This overrides the database.type configuration setting.
--headless Operate the CSE in headless mode. This disables almost all screen output and also the build-in console interface.
--http, --https Run the CSE with http or https server.
This overrides the useTLS configuration setting.
--http-wsgi Run CSE with http WSGI support.
This overrides the http.wsgi.enable configuration setting.
--http-address <server URL> Specify the CSE's http server URL.
This overrides the address configuration setting.
--http-port <http port> Specify the CSE's http server port.
This overrides the address configuration setting.
--init-directory <directory> Specify the import directory.
This overrides the resourcesPath configuration setting.
--network-interface <ip address Specify the network interface/IP address to bind to.
This overrides the listenIF configuration setting.
--log-level Set the log level, or turn logging off.
This overrides the level configuration setting.
--mqtt, --no-mqtt Enable or disable the MQTT binding.
This overrides the mqtt.enable configuration setting.
--remote-cse, --no-remote-cse Enable or disable remote CSE connections and checking.
This overrides the enableRemoteCSE configuration setting.
--statistics, --no-statistics Enable or disable collecting CSE statistics.
This overrides the enable configuration setting.
--textui Run the CSE's text UI after startup.
--ws, --no-ws Enable or disable the WebSocket binding.
This overrides the websocket.enable configuration setting.

Stopping the CSE

The CSE can be stopped by pressing pressing the uppercase Q key or CTRL-C once on the command line.1

Please note, that the shutdown might take a moment (e.g. gracefully terminating background processes, writing database caches, sending notifications etc).

Warning

Being impatient and hitting CTRL-C twice might lead to data corruption.


  1. You can configure this behavior with the [cse.console].confirmQuit configuration setting.