Feature request: Expose Machine's hostname as System variable Octopus.Machine.<something>

The “Environments” dashboard shows a hostname for each of the machines in each of my environments, however I cannot seem to get access to this in powershell scripts. For example, the attached image shows I have a machine on hostname “grid3” but I’ve named it “Grid3 - Internal”.

I have the following system variables available for it:

Octopus.Machine.Id = “machines-65”
Octopus.Machine.Name = “Grid3 - Internal”
Octopus.Machine.Roles =

but need the hostname “grid3” in my powershell script.

We’re running Octopus Deploy


Hi Luke,

Thanks for getting in touch! As you are in PowerShell would $env:COMPUTERNAME suffice?
Please let me know if this is viable solution or not.


Yup that’s grand. I got so caught up with the Octopus variables because
I was writing a reusable script template that I forgot that it’s just
running powershell on the tentacle so I’ve got that whole playground at
my fingertips.



Sorry, it’s me again. I’d actually now like to use the Machine’s hostname in a Variable set (instead of a powershell script) so in this instance it’d be really useful to have this feature.

Thanks, L.

Hi Luke,

We have added an issue in GitHub to expose hostname as a variable.
You can track it here: https://github.com/OctopusDeploy/Issues/issues/1228


This has now been implmented, the variable name is Octopus.Machine.Hostname. Could you guys please add it to the documentation (http://docs.octopusdeploy.com/display/OD/System+variables) because it is really useful.


Thanks for the heads up! I just made the changes.