Deploy to IIS

Octopus.IIS exported 2026-07-22 by Octopus Deploy belongs to ‘Package’ category.

Deploy the contents of a package to a Website, a Web Application or a Virtual Directory.

Parameters

When this step is included in a project’s deployment process, the parameters below can be set.

Enabled features

Octopus.Action.EnabledFeatures

Comma-separated list of the feature ids enabled on this step. Always include Octopus.Features.IISWebSite (this step requires it); add any other optional feature ids from the step features catalogue.

Example: Octopus.Features.IISWebSite

IIS Deployment Type

Octopus.Action.IISWebSite.DeploymentType (required)

Configure the type of IIS deployment: IIS Web Site, IIS Virtual Directory, or IIS Web Application.

Allowed values: webSite, virtualDirectory, webApplication

Default: webSite

Create or update an IIS Web Site and Application Pool

Octopus.Action.IISWebSite.CreateOrUpdateWebSite

If enabled, Tentacle will use the PowerShell Web Administration module to attempt to create or modify an IIS Web Site and Application Pool.

Allowed values: True, False

Default: True

Web site name

Octopus.Action.IISWebSite.WebSiteName (required)

The display name of the IIS Web Site to create or reconfigure.

Example: MyWebSite

Physical path

Octopus.Action.IISWebSite.WebRootType

Whether to serve content from the package installation directory or a relative path under it.

Allowed values: packageRoot, relativeToPackageRoot

Default: packageRoot

Package installation directory

Octopus.Action.IISWebSite.WebRoot

A path relative to the package installation directory from which the IIS Web Site will serve content.

Start IIS Web Site

Octopus.Action.IISWebSite.StartWebSite

Whether the deployment step should start the IIS Web Site after a successful deployment or not.

Allowed values: True, False

Default: True

Bindings

Octopus.Action.IISWebSite.Bindings (required)

Bindings define what protocols, ports and host names this site will listen on. Stored as a JSON-encoded collection of binding objects.

Existing Bindings

Octopus.Action.IISWebSite.ExistingBindings

How to handle existing bindings on the IIS Web Site: Replace removes all existing bindings; Merge combines them with the configured bindings.

Allowed values: Replace, Merge

Default: Replace

Enable Anonymous authentication

Octopus.Action.IISWebSite.EnableAnonymousAuthentication

Whether IIS should allow anonymous authentication.

Allowed values: True, False

Default: False

Enable Basic authentication

Octopus.Action.IISWebSite.EnableBasicAuthentication

Whether IIS should allow basic authentication with a 401 challenge.

Allowed values: True, False

Default: False

Enable Windows authentication

Octopus.Action.IISWebSite.EnableWindowsAuthentication

Whether IIS should allow integrated Windows authentication with a 401 challenge.

Allowed values: True, False

Default: True

Application Pool name

Octopus.Action.IISWebSite.ApplicationPoolName (required)

Name of the application pool in IIS to create or reconfigure.

.NET CLR version

Octopus.Action.IISWebSite.ApplicationPoolFrameworkVersion

The version of the .NET common language runtime that this application pool will use.

Allowed values: v4.0, v2.0, No Managed Code

Default: v4.0

Identity

Octopus.Action.IISWebSite.ApplicationPoolIdentityType

Which built-in account will the application pool run under.

Allowed values: ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, SpecificUser

Default: ApplicationPoolIdentity

Username

Octopus.Action.IISWebSite.ApplicationPoolUsername

The Windows/domain account of the custom user that the application pool will run under.

Example: YOURDOMAIN\YourAccount

Password

Octopus.Action.IISWebSite.ApplicationPoolPassword

The password for the custom account given above.

Start IIS Application Pool

Octopus.Action.IISWebSite.StartApplicationPool

Whether the deployment step should start the IIS Application Pool after a successful deployment or not.

Allowed values: True, False

Default: True

Create or update an IIS Virtual Directory

Octopus.Action.IISWebSite.VirtualDirectory.CreateOrUpdate

If enabled, Tentacle will use the PowerShell Web Administration module to attempt to create or modify an IIS Virtual Directory using the settings below.

Allowed values: True, False

Default: False

Parent web site name

Octopus.Action.IISWebSite.VirtualDirectory.WebSiteName

The name of the parent Web Site for this Virtual Directory in IIS. The Web Site should already exist when this step runs.

Virtual path

Octopus.Action.IISWebSite.VirtualDirectory.VirtualPath

The virtual path in IIS relative to the parent Web Site. All parent directories/applications must already exist.

Example: /application1/directory2/mydirectory

Package installation directory

Octopus.Action.IISWebSite.VirtualDirectory.PhysicalPath

A path relative to the package installation directory from which the Virtual Directory will serve content.

Create or update an IIS Web Application

Octopus.Action.IISWebSite.WebApplication.CreateOrUpdate

If enabled, Tentacle will use the PowerShell Web Administration module to attempt to create or modify an IIS Web Application and Application Pool using the settings below.

Allowed values: True, False

Default: False

Parent web site name

Octopus.Action.IISWebSite.WebApplication.WebSiteName

The name of the parent Web Site for this Web Application in IIS. The Web Site should already exist when this step runs.

Virtual path

Octopus.Action.IISWebSite.WebApplication.VirtualPath

The virtual path in IIS relative to the parent Web Site. All parent directories/applications must already exist.

Example: /myapplication

Package installation directory

Octopus.Action.IISWebSite.WebApplication.PhysicalPath

A path relative to the package installation directory from which the Web Application will serve content.

Physical path

Octopus.Action.WebApplication.WebRootType

Whether the Web Application should serve content from the package installation directory or a relative path under it.

Allowed values: packageRoot, relativeToPackageRoot

Default: packageRoot

Application Pool name

Octopus.Action.IISWebSite.WebApplication.ApplicationPoolName

Name of the application pool in IIS to create or reconfigure for the Web Application.

.NET CLR version

Octopus.Action.IISWebSite.WebApplication.ApplicationPoolFrameworkVersion

The version of the .NET common language runtime that the Web Application’s application pool will use.

Allowed values: v4.0, v2.0, No Managed Code

Default: v4.0

Identity

Octopus.Action.IISWebSite.WebApplication.ApplicationPoolIdentityType

Which built-in account will the Web Application’s application pool run under.

Allowed values: ApplicationPoolIdentity, LocalService, LocalSystem, NetworkService, SpecificUser

Default: ApplicationPoolIdentity

Username

Octopus.Action.IISWebSite.WebApplication.ApplicationPoolUsername

The Windows/domain account of the custom user that the Web Application’s application pool will run under.

Example: YOURDOMAIN\YourAccount

Password

Octopus.Action.IISWebSite.WebApplication.ApplicationPoolPassword

The password for the custom account given above.

Optional features

Enable features by adding their IDs to Octopus.Action.EnabledFeatures (a comma-separated list).

.NET Configuration Transforms Octopus.Features.ConfigurationTransforms

Runs configuration file transforms. Enabled by default for package deployments.

Octopus.Action.Package.AutomaticallyRunConfigurationTransformationFiles

Octopus.Action.Package.AutomaticallyRunConfigurationTransformationFiles

Run default XML transforms (True/False).

Octopus.Action.Package.AdditionalXmlConfigurationTransforms

Octopus.Action.Package.AdditionalXmlConfigurationTransforms

Comma- or newline-separated list of additional transform rules (e.g. Web.Release.config => Web.config).

.NET Configuration Variables Octopus.Features.ConfigurationVariables

Replace appSettings and connectionStrings in .config files. Enabled by default for package deployments.

Octopus.Action.Package.AutomaticallyUpdateAppSettingsAndConnectionStrings

Octopus.Action.Package.AutomaticallyUpdateAppSettingsAndConnectionStrings

Replace appSettings and connectionStrings in .config files (True/False).

Custom Installation Directory Octopus.Features.CustomDirectory

Change where the package is extracted on the target.

Octopus.Action.Package.CustomInstallationDirectory

Octopus.Action.Package.CustomInstallationDirectory

Path on the target to install the package.

Octopus.Action.Package.CustomInstallationDirectoryShouldBePurgedBeforeDeployment

Octopus.Action.Package.CustomInstallationDirectoryShouldBePurgedBeforeDeployment

Purge this directory before installation (True/False).

Octopus.Action.Package.CustomInstallationDirectoryPurgeExclusions

Octopus.Action.Package.CustomInstallationDirectoryPurgeExclusions

Newline-separated list of files/dirs to exclude from purge.

Custom Deployment Scripts Octopus.Features.CustomScripts

Execute scripts during the deployment (pre-deploy, deploy, post-deploy) without embedding them in your package.

Octopus.Action.CustomScripts.PreDeploy.

Octopus.Action.CustomScripts.PreDeploy.<ext>

Pre-deploy script body. The key’s is the script language extension: ps1 (PowerShell), sh (Bash), csx (C#), or py (Python).

Octopus.Action.CustomScripts.Deploy.

Octopus.Action.CustomScripts.Deploy.<ext>

Deploy-phase script body. The key’s is the script language extension: ps1 (PowerShell), sh (Bash), csx (C#), or py (Python).

Octopus.Action.CustomScripts.PostDeploy.

Octopus.Action.CustomScripts.PostDeploy.<ext>

Post-deploy script body. The key’s is the script language extension: ps1 (PowerShell), sh (Bash), csx (C#), or py (Python).

Structured Configuration Variables Octopus.Features.JsonConfigurationVariables

Replace settings in JSON, YAML, XML, and Java Properties files with Octopus variables. Enabled by default for package deployments.

Octopus.Action.Package.JsonConfigurationVariablesTargets

Octopus.Action.Package.JsonConfigurationVariablesTargets

Newline-separated list of target files (e.g. appsettings.json). Wildcards supported.

Substitute Variables in Templates Octopus.Features.SubstituteInFiles

Transforms files using the Octopus #{Variable} substitution syntax. Enabled by default for package deployments.

Octopus.Action.SubstituteInFiles.TargetFiles

Octopus.Action.SubstituteInFiles.TargetFiles

Newline-separated list of file names to transform (relative to package). Wildcards supported.

Octopus.Action.SubstituteInFiles.OutputEncoding

Octopus.Action.SubstituteInFiles.OutputEncoding

Encoding name for the output file (e.g. utf-8). Optional.

PowerShell Edition Octopus.Features.SelectPowerShellEditionForWindows

Specify the edition of PowerShell used during deployments on Windows.

Octopus.Action.PowerShell.Edition

Octopus.Action.PowerShell.Edition

PowerShell edition on Windows (Desktop or Core).

Allowed values: Desktop, Core

Step configuration using OCL

Example in Octopus Configuration Language (OCL):

step "deploy-to-iis" {
    name = "Deploy to IIS"
    properties = {
        Octopus.Action.TargetRoles = "web-server"
    }

    action {
        action_type = "Octopus.IIS"
        properties = {
            Octopus.Action.EnabledFeatures = "Octopus.Features.IISWebSite"
            Octopus.Action.IISWebSite.ApplicationPoolFrameworkVersion = "v4.0"
            Octopus.Action.IISWebSite.ApplicationPoolIdentityType = "ApplicationPoolIdentity"
            Octopus.Action.IISWebSite.ApplicationPoolName = "MyAppPool"
            Octopus.Action.IISWebSite.Bindings = "[{\"protocol\":\"http\",\"port\":\"80\",\"host\":\"\",\"enabled\":\"True\"}]"
            Octopus.Action.IISWebSite.CreateOrUpdateWebSite = "True"
            Octopus.Action.IISWebSite.DeploymentType = "webSite"
            Octopus.Action.IISWebSite.EnableWindowsAuthentication = "True"
            Octopus.Action.IISWebSite.WebSiteName = "MyWebSite"
            Octopus.Action.Package.DownloadOnTentacle = "False"
            Octopus.Action.Package.FeedId = "octopus-server-built-in"
            Octopus.Action.Package.PackageId = "MyWebApp"
            Octopus.Action.RunOnServer = "false"
        }

        packages {
            acquisition_location = "Server"
            feed = "octopus-server-built-in"
            package_id = "MyWebApp"
        }
    }
}

Page updated on Wednesday, July 22, 2026