Documentation and Support Documentation and Support

Show configuration

The show-configuration command is used to ‘export’ Octopus Deploy’s current configuration. The intended audience for this command are those using configuration management tools such as Chef, Puppet or Desired State Configuration (DSC).

The command supports the following options:

OptionDescription
fileExports the server configuration to a file. If not specified, output goes to the console.
formatThe format of the export (XML, JSON, JSON-hierarchical). Defaults to XML.
noconsoleloggingIf specified, all output to the console other than the configuration is suppressed. This is important when using the JSON formats and converting to an object.

Format

The format option defaults to XML, but also supports two JSON formats.

The first format, JSON, outputs a ‘flat’ structure that is keyed in the same way the XML file is. An example of the output is:

{
    "Octopus.Communications.ServicesPort":"10943",
    "Octopus.Storage.NodeName":"NodeA",
    "Octopus.Home":"C:\\Octopus\\Server",
    "Octopus.WebPortal.AutoLoginEnabled":"True"
}

The second format, JSON-hierarchical, outputs a hierarchical object structure based on the setting keys. An example of the output is:

{
    "Octopus": {
        "Communications": {
            "ServicesPort":"10943"
        },
        "Storage":{
            "NodeName":"NodeA"
        },
        "Home":"C:\\Octopus\\Server",
        "WebPortal": {
            "AutoLoginEnabled":"True"
        }
    }
}

Where this second format really comes into play is in languages such as PowerShell or node.js, as it can be parsed easily into an object structure for use in the script. An example of how you could use this in PowerShell would be:

$config = & .\Octopus.Server.exe show-configuration --format=json-hierarchical --noconsolelogging --console | Out-String | ConvertFrom-Json

if ($config.Octopus.WebPortal.AutoLoginEnabled -eq $FALSE) {
    & Octopus.Server.exe configure --autoLoginEnabled=true --console
}

Extensions

Some of the values displayed by this command come from the core part of Octopus Server and some come from server extensions. Learn about how extensions can contribute values to the show-configuration output.

Help us continuously improve

Please let us know if you have any feedback about this page.

Send feedback

Page updated on Sunday, January 1, 2023