---
updatedAt: 2025-11-05T20:22:11.000Z
agentTools:
  projectIndex: https://esf.eurotech.com/v6.0.0/llms.txt
---

# Command Service

The CommandService provides methods for running system commands from the web console. This service also provides the ability for a script to execute using the **File** option of the **Command** tab in the Everyware Cloud Console as shown in the screen capture below. This script must be compressed into a zip file with the eventual, associated resource files.

![1063](https://files.readme.io/42pb4Fh5Q4yUATRUpnOI_commandconsole.png "commandconsole.png")

Once the file is selected and **Execute** is clicked, the zip file is sent embedded in an MQTT message on the device. The  Command Service in the device stores the file in /tmp, unzips it, and tries to execute a shell script if one is present in the file.\
**Important note**: when decompressed, the script loses its executable attribute. To fix this problem, if you plan to execute a script, the command entered into the "Execute" line must trigger the execution:\
**bash\[name of the script]** .

To use this service, select the **CommandService** option located in the **Services** area as shown in the screen capture below.

![2424](https://files.readme.io/5ae7079-ESF_Command-service.png "ESF_Command-service.png")

The CommandService provides the following configuration parameters:

* **command.enable** - sets whether this service is enabled or disabled in the Everyware Cloud Console. (Required field.)

* **command.password.value** - sets a password to protect this service.

* **command.working.directory** - specifies the working directory where the command execution is performed.

* **command.timeout** - sets the timeout (in seconds) for the command execution.

* **command.environment** - supplies a space-separated list of environment variables in the format key=value.

When a command execution is requested in the Everyware Cloud Console, it sends an MQTT control message to the device requesting the command execution. On the device, the Command Service opens a temporary shell as root in the *command.working.directory,* sets the *command.environment* variables (if any), and waits for  *command.timeout* seconds to get command response.