System variables

This page lists built-in variables Octopus provides for use in deployment processes, runbooks, and custom scripts.

All Octopus variables are strings, even when the value looks like a number or a boolean.

Release variables

Release-level variables are drawn from the project and release being created, and are available throughout a deployment or runbook run.

VariableDescriptionExample
Octopus.Release.IdThe ID of the release.releases-123
Octopus.Release.NumberThe version number of the release.1.2.3
Octopus.Release.NotesRelease notes associated with the release, in Markdown format.Fixes bugs 1, 2, and 3
Octopus.Release.CreatedThe date and time the release was created.Tuesday, September 10, 1<23> PM
Octopus.Release.CustomFields[name]The value of a custom field set on the release.TST-123
Octopus.Release.Channel.NameThe channel name associated with the release.2.x Feature Branch
Octopus.Release.Previous.IdThe ID of the previous release of the project.releases-122
Octopus.Release.Previous.NumberThe version number of the previous release of the project.1.2.2
Octopus.Release.PreviousForEnvironment.IdThe ID of the previous release of the project to the current environment.releases-122
Octopus.Release.PreviousForEnvironment.NumberThe version number of the previous release of the project to the current environment.1.2.2
Octopus.Release.CurrentForEnvironment.IdThe ID of the release of the last successful deployment to the current environment.releases-122
Octopus.Release.CurrentForEnvironment.NumberThe version number of the release of the last successful deployment to the current environment.1.2.2
Octopus.Release.Git.BranchNameThe branch name the release was created from. Available for version-controlled projects.features/some-new-feature
Octopus.Release.Git.CommitHashThe commit hash the release was created from. Available for version-controlled projects.0c708f...6eba
Octopus.Release.Git.RefThe git reference the release was created from. Available for version-controlled projects.refs/heads/main

Release package and build information variables

These variables expose the build information pushed from your build server for the packages in a release. They’re populated only when build information has been pushed, and they’re available only in project release notes, not in deployment steps. Each variable is a collection; see Variable substitution syntax for how to iterate and index collections.

VariableDescriptionExample
Octopus.Release.PackageThe packages, with their commits and work items, associated with the release. A collection of package objects.#{Octopus.Release.Package[Acme.Web].Version}
Octopus.Release.BuildsThe build and version-control details associated with the release. A collection of build objects.#{Octopus.Release.Builds[0].BuildUrl}
Octopus.Release.WorkItemsThe distinct work items across all packages in the release. A collection of work item objects.#{Octopus.Release.WorkItems[0].Id}

Package object properties

PropertyDescriptionExample
PackageIdThe ID of the package.#{package.PackageId}
VersionThe version of the package.#{package.Version}
CommitsThe commits associated with the package. A collection.#{package.Commits[0].CommitId}
WorkItemsThe work items associated with the package. A collection.#{package.WorkItems[0].Id}

Commit properties (release package and build info)

PropertyDescriptionExample
CommitIdThe commit ID. When using Git, this is the commit hash.#{commit.CommitId}
LinkUrlA link to the commit.#{commit.LinkUrl}
CommentThe commit message.#{commit.Comment}

Work item properties (release package and build info)

PropertyDescriptionExample
IdThe work item ID.#{issue.Id}
LinkUrlA link to the work item.#{issue.LinkUrl}
DescriptionA description of the work item.#{issue.Description}

Build properties

PropertyDescriptionExample
PackagesA JSON array of the packages created by the build. A collection.#{build.Packages}
BuildUrlA link to the CI build.#{build.BuildUrl}
BranchThe version-control branch associated with the build.#{build.Branch}
BuildEnvironmentThe CI server that ran the build.#{build.BuildEnvironment}
BuildNumberThe build number associated with the build.#{build.BuildNumber}
VcsRootA link to the version-control repository associated with the build.#{build.VcsRoot}
VcsTypeThe type of version control associated with the build.#{build.VcsType}
VcsCommitNumberThe commit ID associated with the build.#{build.VcsCommitNumber}
VcsCommitUrlA link to the commit associated with the build.#{build.VcsCommitUrl}

Build package properties

PropertyDescriptionExample
PackageIdThe ID of the package created by the build.#{build.Packages[0].PackageId}
VersionThe version of the package created by the build.#{build.Packages[0].Version}

Deployment variables

Deployment-level variables are drawn from the project and release being deployed, and the infrastructure being deployed to.

VariableDescriptionExample
Octopus.Acquire.MaxParallelismThe maximum number of packages deployed concurrently to multiple targets. Default: 10.2
Octopus.Acquire.DeltaCompressionEnabledWhether delta compression is used when sending packages to targets.true
Octopus.Deployment.CommentsUser-provided comments on the deployment.Signed off by Alice
Octopus.Deployment.CreatedThe date and time the deployment was created.Tuesday, September 10, 1<23> PM
Octopus.Deployment.CreatedBy.DisplayNameThe full name of the user who started the deployment.Alice King
Octopus.Deployment.CreatedBy.EmailAddressThe email address of the user who started the deployment.alice@example.com
Octopus.Deployment.CreatedBy.IdThe ID of the user who started the deployment.users-123
Octopus.Deployment.CreatedBy.UsernameThe username of the user who started the deployment.alice
Octopus.Deployment.ErrorThe error or exit code for a failed deployment.Script returned exit code 123
Octopus.Deployment.ErrorDetailThe error or exit code for a failed deployment, with the Octopus stack trace.System.IO.FileNotFoundException: file C:\Missing.txt does not exist
Octopus.Deployment.ForcePackageDownloadWhether the package is downloaded fresh from the feed regardless of whether it’s already on the target.False
Octopus.Deployment.IdThe ID of the deployment.deployments-123
Octopus.Deployment.NameThe name of the deployment.Deploy to Production
Octopus.Deployment.PreviousSuccessful.IdThe ID of the previous successful deployment of this project to the target environment.deployments-122
Octopus.Deployment.MachinesThe IDs of the machines targeted by the deployment.machines-123,machines-124
Octopus.Deployment.SpecificMachinesThe specific machines targeted by the deployment, if any.machines-123,machines-124
Octopus.Deployment.ExcludedMachinesThe IDs of machines excluded from the deployment, usually because they were unavailable.machines-123,machines-124
Octopus.Deployment.Tenant.IdThe ID of the tenant being deployed for. Not present for untenanted deployments.Tenants-123
Octopus.Deployment.Tenant.NameThe name of the tenant being deployed for. Not present for untenanted deployments.Acme Corp
Octopus.Deployment.Tenant.TagsA comma-separated list of the tenant’s tags. Not present for untenanted deployments.Tenant type/External, Upgrade ring/Early adopter
Octopus.Deployment.Trigger.IdThe ID of the trigger that created the deployment. If several triggers apply, the ID of one of them.ProjectTriggers-522
Octopus.Deployment.Trigger.NameThe name of the trigger that created the deployment. If several triggers apply, the name of one of them.Nightly Deploy to Dev
Octopus.Deployment.WorkerLeaseCapAn opt-in cap on how many steps referencing the same package reuse a single worker before another is selected. Disabled by default; set to a number above zero to opt in. Applies to deployments and runbooks.5
Octopus.Deployment.TargetsThe distinct targets being deployed to across all steps. A dictionary of objects with Id and Name properties, keyed on ID.#{Octopus.Deployment.Targets[machines-123].Name}
Octopus.Endpoint.type.propertyProperties describing the endpoint being deployed to.ftp.example.com
Octopus.Environment.IdThe ID of the environment.environments-123
Octopus.Environment.MachinesInRole[role]The machines with the specified target tag being deployed to.machines-123,machines-124
Octopus.Environment.NameThe name of the environment.Production
Octopus.Environment.SortOrderThe order applied to the environment on the dashboard and elsewhere.3
Octopus.Machine.IdThe ID of the machine.machines-123
Octopus.Machine.NameThe name used to register the machine in Octopus. Not the same as the hostname.WEBSVR01
Octopus.Machine.RolesThe target tags associated with the machine.web-server,frontend
Octopus.Machine.HostnameThe host part of the URI used to register the machine. Set only for Listening Tentacles.192.168.200.100
Octopus.Project.IdThe ID of the project.projects-123
Octopus.Project.NameThe name of the project.OctoFx
Octopus.ProjectGroup.IdThe ID of the project group.project-groups-123
Octopus.ProjectGroup.NameThe name of the project group.Public Web Properties
Octopus.Space.IdThe ID of the space.Spaces-1
Octopus.Space.NameThe name of the space.Dev Space
Octopus.Task.Argument[name]An argument value provided when the task was created.deployments-123
Octopus.Task.IdThe ID of the task.server-tasks-123
Octopus.Task.NameThe name of the task.Deploy release 1.2.3 to Production
Octopus.Task.QueueTimeThe date and time the task should be queued for execution.Tuesday, September 10, 1<30> PM
Octopus.Task.QueueTimeExpiryThe date and time before which the task must start.Tuesday, September 10, 2<30> PM
Octopus.Tentacle.CurrentDeployment.PackageFilePathThe path to the package file being deployed.C:\Octopus\Tentacle\Packages\OctoFx.1.2.3.nupkg
Octopus.Tentacle.CurrentDeployment.TargetedRolesThe intersection of the target tags targeted by the step and those on the machine.web-server
Octopus.Tentacle.PreviousInstallation.CustomInstallationDirectoryThe directory the previous version of the package was deployed to.C:\InetPub\WWWRoot\OctoFx
Octopus.Tentacle.PreviousInstallation.OriginalInstalledPathThe directory the previous version of the package was extracted to.C:\Octopus\Tentacle\Apps\Production\OctoFx\1.2.2
Octopus.Tentacle.PreviousInstallation.PackageFilePathThe path to the previously deployed package file.C:\Octopus\Tentacle\Packages\OctoFx.1.2.2.nupkg
Octopus.Tentacle.PreviousInstallation.PackageVersionThe previous version of the package deployed to the Tentacle.1.2.2
Octopus.Web.ProjectLinkA path relative to the Octopus Server URL where the project can be viewed./app/projects/projects-123
Octopus.Web.ReleaseLinkA path relative to the Octopus Server URL where the release can be viewed./app/releases/releases-123
Octopus.Web.DeploymentLinkA path relative to the Octopus Server URL where the deployment can be viewed./app/deployment/deployments-123

Deployment change variables

These variables expose the changes included in a deployment, aggregated across the releases being deployed. They’re available only where build information has been pushed and, for work items, an issue tracker integration is enabled. Several are JSON collections; see Variable substitution syntax for how to iterate and index them.

VariableDescriptionExample
Octopus.Deployment.ChangesA JSON array of release-change objects, one per release, each with its release notes and build information.#{Octopus.Deployment.Changes[0].Version}
Octopus.Deployment.WorkItemsA JSON array of the distinct work items across all changes in the deployment.#{Octopus.Deployment.WorkItems[0].Id}
Octopus.Deployment.PackageBuildInformationA JSON array of the distinct package build information across all changes in the deployment.#{Octopus.Deployment.PackageBuildInformation[0].PackageId}
Octopus.Deployment.ChangesMarkdownThe output of applying the project’s deployment changes template, in Markdown.#{Octopus.Deployment.ChangesMarkdown}

Release change properties

PropertyDescriptionExample
VersionThe release version.#{change.Version}
ReleaseNotesThe release notes, in Markdown.#{change.ReleaseNotes}
BuildInformationThe build information for each package in the release. A collection.#{change.BuildInformation[0].PackageId}
WorkItemsThe work items for the release. A collection.#{change.WorkItems[0].Id}
CommitsThe commits for the release. A collection.#{change.Commits[0].Id}

Package build information properties

PropertyDescriptionExample
PackageIdThe ID of the package.#{info.PackageId}
VersionThe version of the package.#{info.Version}
BuildEnvironmentThe CI server that ran the build.#{info.BuildEnvironment}
BuildNumberThe build number associated with the build.#{info.BuildNumber}
BuildUrlA link to the CI build.#{info.BuildUrl}
BranchThe version-control branch associated with the build.#{info.Branch}
VcsTypeThe type of version control associated with the build.#{info.VcsType}
VcsRootA link to the version-control repository.#{info.VcsRoot}
VcsCommitNumberThe commit ID associated with the build.#{info.VcsCommitNumber}
VcsCommitUrlA link to the commit associated with the build.#{info.VcsCommitUrl}
WorkItemsThe work items for the package. A collection.#{info.WorkItems[0].Id}
CommitsThe commits for the package. A collection.#{info.Commits[0].Id}

Work item properties (deployment change)

PropertyDescriptionExample
IdThe work item ID.#{workItem.Id}
LinkUrlA link to the work item.#{workItem.LinkUrl}
SourceThe issue tracker the work item came from.#{workItem.Source}
DescriptionA description of the work item.#{workItem.Description}

Commit properties (deployment change)

PropertyDescriptionExample
IdThe commit ID.#{commit.Id}
LinkUrlA link to the commit.#{commit.LinkUrl}
CommentThe commit message.#{commit.Comment}

Action variables

Action-level variables are available while an action runs.

You can also read these variables for a different action using indexed notation, for example Octopus.Action[ActionName].IsSkipped. This is useful when writing run conditions that depend on another action’s status.

VariableDescriptionExample
Octopus.Action.Container.ImageThe name of the container image being deployed.OctoFx-RateService
Octopus.Action.IdThe ID of the action.85287bef-fe6c-4eb7-beef-74f5e5a6b5b0
Octopus.Action.IsSkippedWhether the action was skipped in the current deployment. Can be True or empty.True
Octopus.Action.Manual.InstructionsThe instructions provided for a manual step.Don’t break anything
Octopus.Action.Manual.ResponsibleTeamIdsThe teams responsible for completing a manual step.teams-123,teams-124
Octopus.Action.MaxParallelismThe maximum number of targets an action runs on concurrently, and the maximum number of steps that run in parallel. Some built-in steps ignore this value. Default: 10.5
Octopus.Action.NameThe name of the action.Website
Octopus.Action.NumberThe sequence number of the action in the deployment process.5
Octopus.Action.Package.CustomInstallationDirectoryThe specific directory the package is copied to after extraction, if set.C:\InetPub\WWWRoot\OctoFx
Octopus.Action.Package.CustomInstallationDirectoryShouldBePurgedBeforeDeploymentWhether all files in the custom installation directory are deleted before deployment.False
Octopus.Action.Package.DownloadOnTentacleWhether the package is downloaded by the Tentacle rather than pushed by the Octopus Server.False
Octopus.Action.Package.TreatConfigTransformationWarningsAsErrorsWhether warnings in .NET configuration transformations fail the deployment.True
Octopus.Action.Package.IgnoreConfigTransformationErrorsWhether errors in .NET configuration transformations are treated as informational rather than failing the deployment.False
Octopus.Action.Package.IgnoreVariableReplacementErrorsWhether errors in variable replacement are treated as a warning rather than failing the deployment.False
Octopus.Action.Package.InstallationDirectoryPathThe directory the package was installed to. Not available before extraction.C:\InetPub\WWWRoot\OctoFx
Octopus.Action.Package.FeedIdThe ID of the feed the package was pulled from.feeds-123
Octopus.Action.Package.PackageIdThe ID of the package being deployed.OctoFx.RateService
Octopus.Action.Package.PackageVersionThe version of the package being deployed.1.2.3
Octopus.Action.Package.SkipIfAlreadyInstalledWhether re-deployment is skipped when the package version is already on the machine.False
Octopus.Action.Script.ScriptBodyThe script being run in a script step.Write-Host 'Hello'
Octopus.Action.Script.SyntaxThe syntax of the script being run in a script step.PowerShell
Octopus.Action.Script.CSharp.NuGetSourceThe NuGet source used by the dotnet executor for C# script steps.https://my-nuget-server/nuget
Octopus.Action.SkipRemainingConventionsSet as an output variable to finish the action without running further conventions or scripts.True
Octopus.Action.TargetRolesThe machine target tags targeted by the action.web-server,frontend
Octopus.Action.Template.IdThe ID of the step template the action is based on, if any.action-templates-123
Octopus.Action.Template.VersionThe version of the step template in use, if any.123
Octopus.Action.Status.ErrorA description of the error, if the action failed.The server could not be contacted
Octopus.Action.Status.ErrorDetailA full description of the error, if the action failed.System.Net.SocketException: The server could not be contacted
Octopus.Action.SubstituteInFiles.EnableNoMatchWarningWhether a warning is logged when no files match a glob pattern in Substitute Variables in Files.False

Package reference variables

When you reference a package in a custom script, that package contributes its own variables, available per package. The examples below assume a package reference named Acme.

VariableDescriptionExample
Octopus.Action.Package[Acme].PackageIdThe package ID.Acme
Octopus.Action.Package[Acme].FeedIdThe feed ID.feeds-123
Octopus.Action.Package[Acme].PackageVersionThe version of the package included in the release.1.4.0
Octopus.Action.Package[Acme].OriginalPathThe location of the package file before any actions are taken.C:\Octopus\Packages\Spaces-1\feeds-builtin\Acme\Acme.1.4.0.zip
Octopus.Action.Package[Acme].ExtractedPathThe absolute path to the extracted directory, if the package is extracted.C:\Octopus\Work\20210821060923-7117-31\Acme
Octopus.Action.Package[Acme].PackageFilePathThe absolute path to the package file, if the package isn’t extracted.C:\Octopus\Work\20210821060923-7117-31\Acme.zip
Octopus.Action.Package[Acme].PackageFileNameThe name of the package file, if the package isn’t extracted.Acme.zip

Docker image package variables

When the package reference is a Docker image, these additional variables are contributed.

VariableDescriptionExample
Octopus.Action.Package[Acme].ImageThe fully qualified image name.index.docker.io/Acme:1.4.0
Octopus.Action.Package[Acme].RegistryThe URI of the registry the image was acquired from.index.docker.io
Octopus.Action.Package[Acme].VersionThe version of the image included in the release.1.4.0
Octopus.Action.Package[Acme].Feed.UserNameThe username for the feed the image was acquired from, if the feed uses credentials.Alice
Octopus.Action.Package[Acme].Feed.PasswordThe password for the feed the image was acquired from, if the feed uses credentials.Password01!

Azure variables

These variables are available during Azure deployment actions.

VariableDescriptionExample
Octopus.Action.Azure.CertificateThumbprintThe thumbprint of the X.509 certificate used to authenticate with the target Azure subscription.86B5C...96AC
Octopus.Action.Azure.PackageExtractionPathThe temporary path Azure packages are extracted to during deployment, if set.Z:\Temp\packages\
Octopus.Action.Azure.SubscriptionIdThe Azure subscription ID targeted by the action.8affaa7d-3d74-427c-93c5-2d7f6a16e754
Octopus.Action.Azure.ResourceGroupDeploymentNameOverrides the auto-generated resource group deployment name when deploying a resource group.my-resource-group-deployment-name

Azure Cloud Service variables

VariableDescriptionExample
Octopus.Action.Azure.CloudServiceConfigurationFileRelativePathThe relative path to the .cscfg file, if set. Falls back to ServiceConfiguration.{Environment}.cscfg or ServiceConfiguration.Cloud.cscfg.ServiceConfiguration.Custom.cscfg
Octopus.Action.Azure.CloudServiceNameThe name of the cloud service targeted by the action.my-cloud-service-web
Octopus.Action.Azure.CloudServicePackageExtractionDisabledWhether Octopus pushes the .cspkg file to Azure as-is without unpacking it.True
Octopus.Action.Azure.CloudServicePackagePathThe path of the .cspkg file used by the action.Z:\Temp\packages\my-cloud-service-web.cspkg
Octopus.Action.Azure.LogExtractedCspkgWhether the contents of the extracted .cspkg are written to the log.True
Octopus.Action.Azure.SlotThe slot of the cloud service targeted by the action.Staging
Octopus.Action.Azure.StorageAccountNameThe Azure storage account .cspkg files are uploaded to.my-storage-account
Octopus.Action.Azure.SwapIfPossibleWhether the action attempts a VIP swap instead of deploying directly into the targeted slot.True
Octopus.Action.Azure.UploadedPackageUriThe storage URI of the .cspkg file to be deployed.https://my-storage-account/container/my-cloudservice.web.cspkg
Octopus.Action.Azure.UseCurrentInstanceCountWhether the action keeps the current instance count rather than reverting to the .cspkg definition.True
Octopus.Action.Azure.DeploymentLabelThe custom deployment label used for the Azure cloud service deployment, if set.my custom label for build 3.x.x

Azure Web App variables

VariableDescriptionExample
Octopus.Action.Azure.WebAppNameThe name of the web app targeted by the deployment.my-web-app
Octopus.Action.Azure.DeploymentSlotThe name of the web app slot targeted by the deployment.staging
Octopus.Action.Azure.ResourceGroupNameThe name of the resource group targeted by the deployment.MyResourceGroup
Octopus.Action.Azure.RemoveAdditionalFilesWhether Web Deploy deletes files at the destination that aren’t in the source package.True
Octopus.Action.Azure.PreserveAppDataWhether Web Deploy skips delete operations in the App_Data directory.True
Octopus.Action.Azure.AppOfflineWhether Web Deploy takes the app domain down by adding an app_offline.html file in the site root.True

Output variables

Output variables are collected while a step runs and made available to later steps.

VariableDescriptionExample
Octopus.Action[name].Output.propertyThe result of calling Set-OctopusVariable during an action, exposed for use in other actions.Octopus.Action[Website].Output.WarmUpResponseTime
Octopus.Action[name].Output.Manual.NotesNotes provided by the user who completed a manual step.Signed off by Alice
Octopus.Action[name].Output.Package.InstallationDirectoryPathThe directory the package was installed to.C:\Octopus\Tentacle\Apps\Production\MyApp\1.2.3
Octopus.Action[name].Output[machine].Package.InstallationDirectoryPathThe directory the package was installed to on a specific target machine. Use this to read the installation directory for a machine other than the one currently running, for example in a run condition.C:\Octopus\Tentacle\Apps\Production\MyApp\1.2.3
Octopus.Action[name].Output.Manual.ResponsibleUser.DisplayNameThe full name of the user who completed the manual step.Alice King
Octopus.Action[name].Output.Manual.ResponsibleUser.EmailAddressThe email address of the user who completed the manual step.alice@example.com
Octopus.Action[name].Output.Manual.ResponsibleUser.IdThe ID of the user who completed the manual step.users-123
Octopus.Action[name].Output.Manual.ResponsibleUser.UsernameThe username of the user who completed the manual step.alice
Octopus.Action[name].Output.OctopusAzureCloudServiceDeploymentIDThe ID of the completed Azure cloud service deployment.c9f52d...409f
Octopus.Action[name].Output.OctopusAzureCloudServiceDeploymentUrlThe URL of the completed Azure cloud service deployment.http://c9f52d...409f.cloudapp.net/

Step variables

Step-level variables are available while a step runs.

You can also read these variables for a different step using indexed notation, for example Octopus.Step[StepName].Status.Code. This is useful when writing run conditions that depend on another step’s status.

VariableDescriptionExample
Octopus.Step.IdThe ID of the step.80b3ad09-eedf-40d6-9b66-cf97f5c0ffee
Octopus.Step.NameThe name of the step.Website
Octopus.Step.NumberThe number of the step.2
Octopus.Step.Status.CodeA code describing the current status of the step.Succeeded
Octopus.Step.Status.ErrorA description of the error, if the step failed.The server could not be contacted
Octopus.Step.Status.ErrorDetailA full description of the error, if the step failed.System.Net.SocketException: The server could not be contacted

The status codes returned by Octopus.Step.Status.Code are Pending, Skipped, Abandoned, Canceled, Running, Succeeded, and Failed.

Tracking deployment status

During a deployment or runbook run, Octopus provides variables describing the status of each step and action, including ones other than the one currently running. This lets you reference another step or action’s outcome, for example when writing a run condition.

Where StepName is the name of the step:

VariableDescriptionExample
Octopus.Step[StepName].Status.CodeA code describing the status of the step.Succeeded
Octopus.Step[StepName].Status.ErrorA description of the error, if the step failed.The server could not be contacted
Octopus.Step[StepName].Status.ErrorDetailA full description of the error, if the step failed.System.Net.SocketException: The server could not be contacted

Where ActionName is the name of the action:

VariableDescriptionExample
Octopus.Action[ActionName].IsSkippedWhether the action was skipped in the current deployment. Can be True or empty.True
Octopus.Action[ActionName].TargetRolesThe machine target tags targeted by the action.web-server,frontend

For the deployment as a whole, see Octopus.Deployment.Error and Octopus.Deployment.ErrorDetail in Deployment variables. These only contain the exit code and Octopus stack trace for the error. Octopus can’t parse the deployment log, so it can only extract exit and error codes, not detailed information on the cause of the failure. Check the logs for full details on why a deployment failed.

Agent variables

Agent-level variables describe the deployment agent or Tentacle the deployment runs on.

VariableDescriptionExample
Octopus.Tentacle.Agent.ApplicationDirectoryPathThe directory the agent installs packages under.C:\Octopus\Tentacle\Apps
Octopus.Tentacle.Agent.InstanceNameThe instance name the agent runs under.Tentacle
Octopus.Tentacle.Agent.ProgramDirectoryPathThe directory containing the agent’s own executables.C:\Program Files\Octopus Deploy\Tentacle
Octopus.Agent.ProgramDirectoryPathThe directory containing the server’s or Tentacle’s executables, depending on where the step runs.C:\Program Files\Octopus Deploy\Octopus

Worker pool variables

When a step runs on a worker, these variables are available.

VariableDescriptionExample
Octopus.WorkerPool.IdThe ID of the pool.WorkerPools-1
Octopus.WorkerPool.NameThe name of the pool.Default Worker Pool

Server variables

Server-level variables describe the Octopus Server the deployment runs on.

VariableDescriptionExample
Octopus.Web.BaseUrlThe default URL the server API can be accessed at, based on the server’s listen prefixes. May not be suitable behind a load balancer or reverse proxy.https://my-octopus
Octopus.Web.ServerUriThe default URL the server portal can be accessed at, as configured in Configuration ➜ Nodes.https://my-octopus

Runbook variables

These variables are available during a runbook run.

VariableDescriptionExample
Octopus.Runbook.IdThe ID of the runbook.Runbooks-123
Octopus.Runbook.NameThe name of the runbook.Restore Database
Octopus.RunbookRun.CreatedThe date and time the runbook was run.Friday, March 13, 2020 6:23<38> AM
Octopus.RunbookRun.CreatedUtcThe date and time the runbook was run, in UTC.3/13/20 6:23:38 AM +00:00
Octopus.RunbookRun.Git.BranchNameThe branch name, if the run was created from a branch.branch-abc
Octopus.RunbookRun.Git.CommitHashThe commit hash used to create the run, for a version-controlled runbook.14677f...a1e9
Octopus.RunbookRun.Git.RefThe full git ref used to create the run, for a version-controlled runbook.refs/heads/branch-abc
Octopus.RunbookRun.Git.TagNameThe tag name, if the run was created for a tag.v1.0.234
Octopus.RunbookRun.IdThe ID of the run.RunbookRuns-123
Octopus.RunbookRun.NameThe name of the run.Run on Production
Octopus.RunbookSnapshot.IdThe ID of the snapshot being run.RunbookSnapshots-123
Octopus.RunbookSnapshot.NameThe name of the snapshot.Snapshot EXAMPLE3
Octopus.RunbookSnapshot.NotesNotes associated with the snapshot, in Markdown.Restores the database
Octopus.Web.RunbookSnapshotLinkA path relative to the Octopus Server URL where the runbook snapshot can be viewed./app/snapshots/runbookSnapshots-123
Octopus.Web.RunbookRunLinkA path relative to the Octopus Server URL where the runbook run can be viewed./app/runs/runbookRuns-123

Kubernetes variables

This variable controls Kubernetes CLI output during Kubernetes deployment actions.

VariableDescriptionExample
Octopus.Action.Kubernetes.LogCliOutputAsInfoWhether successful output from Kubernetes CLI tools (kubectl, helm, aws, az, gcloud) is logged at the Info level instead of Verbose.True

User-modifiable settings

You define these variables in your project to change how Octopus behaves. Unlike the variables above, you set these values and Octopus reads them.

VariableDescriptionExample
Octopus.Acquire.MaxParallelismThe maximum number of NuGet packages downloaded at once when acquiring packages.3
Octopus.Action.MaxParallelismThe maximum number of targets an action runs on concurrently, and the maximum number of steps that run in parallel. Default: 10.5
OctopusPrintVariablesSet to True to have Tentacle print the value of all variables passed to it.True
OctopusPrintEvaluatedVariablesSet to True to have Tentacle print the value of all variables passed to it after evaluation.True
OctopusSkipFreeDiskSpaceCheckSet to True to skip the free disk space check when deploying packages.True
OctopusFreeDiskSpaceOverrideInMegaBytesThe amount of free disk space, in megabytes, to check for, overriding the 500 MB default.100
OctopusShouldFailDeploymentOnSubstitutionFailsSet to True to fail the deployment if any variable substitution fails.True
Octopus.Action.PowerShell.CustomPowerShellVersionThe version Windows PowerShell scripts are invoked with (2.0, 3.0, 4.0, 5.0). For PowerShell Core, the value must match a directory in %PROGRAMFILES%\PowerShell.2.0
OctopusDeleteScriptsOnCleanupSet to False to keep packaged PreDeploy, Deploy, and PostDeploy scripts in the target directory.False
Octopus.Action.Script.SuppressEnvironmentLoggingSet to True to suppress script environment-variable logging.True
Octopus.Action.PowerShell.ExecuteWithoutProfileSet to True to skip the Tentacle service account’s PowerShell profile when running PowerShell steps.True
OctopusSuppressDuplicateVariableWarningSet to True to log the duplicate-variable message as verbose instead of a warning.True
Octopus.Action.Package.RunScriptsSet to False to prevent scripts inside packages from running.True
Octopus.Calamari.CopyWorkingDirectoryIncludingKeyToA file path the Calamari working directory is copied to, including the one-time key used to decrypt sensitive variables.c:\temp\octopus-debug
Octopus.Deployment.WorkerLeaseCapAn opt-in cap on how many steps referencing the same package reuse a single worker. Disabled by default; set above zero to opt in. Applies to deployments and runbooks.5
Octopus.Task.ConcurrencyTagRuns one task at a time per concurrency tag. Set to run tasks in parallel instead of serial, or in serial instead of parallel.#{Octopus.Deployment.Tenant.Id}/#{Octopus.Project.Id}/#{Octopus.Environment.Id}

Version notes

Some variables are available only from a specific version of Octopus. This topic lists those variables and the version each became available in.

VariableAvailable from
Octopus.Release.Git.BranchName, Octopus.Release.Git.CommitHash, Octopus.Release.Git.RefOctopus 2021.3
Octopus.Web.ServerUriOctopus 2019.4.0
Octopus.Deployment.Tenant.Id, Octopus.Deployment.Tenant.Name, Octopus.Deployment.Tenant.TagsOctopus 3.4
OctopusShouldFailDeploymentOnSubstitutionFailsOctopus 2025.1.0

Help us continuously improve

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

Send feedback

Page updated on Monday, August 3, 2026

Use Octopus docs with AI