Search

User Manual

GETTING STARTED


MODULES AND PLATFORM


APPENDIX


TUTORIALS & HELPFUL TRICKS


GLOSSARY


STRATEGIC PARTNER LINKS

Sepasoft - MES Modules
Cirrus Link - MQTT Modules

RESOURCES

Inductive University
Ignition Demo Project
Knowledge Base Articles
Forum
IA Support
SDK Documentation
SDK Examples

ALL MANUAL VERSIONS

Ignition 8
Ignition 7.9
Ignition 7.8

Deprecated Pages

Skip to end of metadata
Go to start of metadata



The Gateway Command-line Utility provides a list of commands you can use to perform specific functions in the Gateway. The Gateway Command-line Utility or 'gwcmd' provides basic commands, such as resetting the main password, changing the Gateway's port, or restarting the Gateway. 


A note to our legacy users...

Older versions of Ignition featured a visual Gateway Control Utility or GCU that could start and stop the Ignition service. This visual element of the GCU, as well as the ability to start and stop the service have since been removed in Ignition 8.0. For more information on starting or stopping the service, please see the Gateway Settings page.

More information on the older version of the GCU can be found in Deprecated Features of the user manual.

Command-line Utility Options

The Gateway command-line utility supports Windows, Linux, and Mac OS platforms. The 'gwcmd' only runs on the same machine as the Ignition Gateway and requires administrative privileges. 

On this page ...


IULocgo


Gateway Command-line Utility

To run the Gateway Command-line Utility, open a command shell and type: gwcmd <option>. This example uses the Windows platform:

  1. Open the Command Prompt with admin privileges. In the search bar, enter cmd then right click next to the Command Prompt to select Run as administrator.



  2. Any time you run any of the Gateway command utility options, you need to run them from the director that Ignition is installed in. The default install directory is: C:/Program Files/Inductive Automation/Ignition.
  3. From here, you can enter any of the command options listed in the table below. This example is of a Gateway backup using the following command: gwcmd -b "C:/Gateway Backups/Backup_190108.gwbk".

    Using spaces in a file path

    When using spaces in a file path name, use quotation marks around the full path name, as shown in the example above. Forward or backward slashes can be used to separate folders. The file path includes the disk name, folder path, and file name.

  4. The above command created a Gateway Backup on the C drive, in the Gateway Backups folder with a file name of Backup_190108.gwbk. The image below shows all the commands used in Steps 2 and 3. 

Use the Command-Line Utility to Start or Stop the Gateway

One of the common uses for the Command-Line Utility is to start or stop the Gateway.

Windows

Ignition's installation directory contains start-ignition.bat and stop-ignition.bat, which can start or stop the service. Example:

C:\Program Files\Inductive Automation\Ignition> start-ignition.bat


However, you can also use Windows native service commands to control the running state of the Gateway:

net start ignition
net stop ignition

Linux

You can control the service using the ignition.sh script. It can be called with the start and stop parameters to perform the relevant operations.

For example:

/usr/local/bin/ignition/ignition.sh start


Additionally, you can use native terminal commands to start or stop the service:

service ignition start
service ignition stop


Mac OS X

You can access the service from the install directory using the "ignition.sh" script. On a typical Mac install using the dmg installer, the full command (without a custom location specified) is the following: 

/usr/local/ignition/ignition.sh start

Command-Line Utility 'gwcmd' Options

The followingn table lists all available 'gwcmd' options.

Options

Description

-a,-–activate <CDk-key> Offline activation
Creates an activation_request.txt file that can be used to request a license.ipl file from the Inductive Automation website. You must specify the CD-key to use for activation. The activation_request.txt file is saved in the current directory.
-b,--backup <new filepath>  

Downloads a Gateway backup.gwbk file and saves the file to the specified path. The path can be either an absolute path or a relative path.  

You will be prompted whether it is OK to overwrite the file if another .gwbk file with the same name already exists. You can override with the -y option to force the file to always be overwritten.

-c,--clearks

This feature is new in Ignition version 8.0.3
Click here to check out the other new features

Clears the gateway's SSL / TLS setup. The gateway's SSL / TLS connector will be immediately shut down.

-e, --exportks <new filepath>

This feature is new in Ignition version 8.0.3
Click here to check out the other new features
Exports the gateway's SSL key store in PKCS12 format and saves to the specified path.

-f, --exportpk<new filepath>

This feature is new in Ignition version 8.0.3
Click here to check out the other new features
Exports the private key from the gateway's SSL key store in PEM format and saves to the specified path.

-g,--reloadks

This feature is new in Ignition version 8.0.3
Click here to check out the other new features

Reloads the Gateway's SSL keystore from disk. Any update to the keystore will be automatically applied to any new connections.

-h,--helpShows the usage for this command.
-i,--infoRetrieves server status and port information from the Gateway if it is running.
-k,--port <new port>Changes the Gateway http port.
-l,--sslport <new port>Changes the Gateway https port.
-n, --nocrypt


This feature is new in Ignition version 8.0.3
Click here to check out the other new features
Add to the export private key command to not encrypt the private key.

-o,--name

This feature is new in Ignition version 8.0.3
Click here to check out the other new features

Specifies a Gateway name while restoring a backup. Additionally, the  -y  command now skips prompts asking for a Gateway name override.

-p,--passwdEnables a password change for the initial user.
-r,--restartRestarts the Gateway.
-s,--restore

Restores a Gateway backup (.gwbk) file.

-t,--tdumpPerforms a thread dump in the Gateway and prints the dump to the command-line.
-u,--unactivate Offline unactivationCreates an unactivation_message.txt file that you can use to unactivate a license via the Inductive Automation website. The unactivation_message.txt file is saved in the current directory.
-w,--uselicense <license.ipl path> Applies a license.ipl file that was downloaded from the Inductive Automation website. You must supply the location of the license.ipl file. If it is in the current directory, use license.ipl for the location.
-y,--promptyesAutomatically answers yes to any prompt that may appear in the above commands, such as permission to overwrite an existing file.




  • No labels