Set Tentacle Uri address during installation


I’m using the following script to install a Tentacle on a new server using Chocolatey. This works very well with one problem: at the octopus server the tentacle url is set to :. This doens’t work for me, it should be :. Can this be done? Is there a switch statement that I can use?

$arguments = @{}

Let’s assume that the input string is something like this, and we will use a Regular Expression to parse the values

/Port:81 /Edition:LicenseKey /AdditionalTools

Now we can use the $env:chocolateyPackageParameters inside the Chocolatey package

$packageParameters = $env:chocolateyPackageParameters

Write-Host $packageParameters

Default the values

$port = “10933”

Now parse the packageParameters using good old regular expression

if ($packageParameters) {
$match_pattern = “/(?([a-zA-Z]+)):(?(["'])?([a-zA-Z0-9- _\\:\.]+)([”’])?)|/(?([a-zA-Z]+))"
$option_name = ‘option’
$value_name = ‘value’

  if ($packageParameters -match $match_pattern ){
      $results = $packageParameters | Select-String $match_pattern -AllMatches
      $results.matches | % {
      Throw "Package Parameters were found but were invalid (REGEX Failure)"

  if ($arguments.ContainsKey("Port")) {
      Write-Host "Port Argument Found"
      $port = $arguments["Port"]

} else {
Write-Debug “No Package Parameters Passed in”

$silentArgs = “/S /Port:” + $port

Write-Debug “This would be the Chocolatey Silent Arguments: $silentArgs”

Install-ChocolateyPackage -PackageName 'octopustentacle'
-FileType ‘msi’ -SilentArgs '/quiet'
-Url ‘ ''
-Checksum ‘ED95CB194A124C7BD5D67978EDCE722C139A4F80A0B46D6531923B112D032F77’ -ChecksumType 'SHA256'
-Checksum64 ‘7A468F71B18E099BB3CCC81D603CC3225114D67F516D397F8A61EB03DBCEEE55’ `
-ChecksumType64 ‘SHA256’

cd “C:\Program Files\Octopus Deploy\Tentacle”

& .\Tentacle.exe create-instance --instance “Tentacle” --config “C:\Octopus\Tentacle.config” --console
& .\Tentacle.exe new-certificate --instance “Tentacle” --if-blank --console
& .\Tentacle.exe configure --instance “Tentacle” --reset-trust --console
& .\Tentacle.exe configure --instance “Tentacle” --home “C:\Octopus” --app “C:\Octopus\Applications” --port “10933” --console
& .\Tentacle.exe configure --instance “Tentacle” --trust “” --console
netsh advfirewall firewall add rule “name=Octopus Deploy Tentacle” dir=in action=allow protocol=TCP localport=10933
& .\Tentacle.exe register-with --instance “Tentacle” --server “” --apiKey="" --role “web-server” --environment “Test” --comms-style TentaclePassive --console
& .\Tentacle.exe service --instance “Tentacle” --install --start --console

Kind regards,

Hi Erwin,

Thanks for reaching out. If I understand correctly, the publicHostName parameter for the Tentacle’s register-with command will let you specify the IP address that the server uses.

Hope that helps and if I can assist further please let me know.


I cannot acces that url since I need to log in.

I think I’m looking for a switch parameter to register-with. Something like --TentacleIp “”

& .\Tentacle.exe register-with --instance “Tentacle” --TentacleIp “” --server “” --apiKey="" --role “web-server” --environment “Test” --comms-style TentaclePassive --console

In this documentation I read about: $tentacle.Endpoint.Uri = “https://YOUR_TENTACLE:10933”. So I’m looking for that equivalent for Tentacle.exe. Something like --TentacleEndpointUri. Does that exist?

Kind regards,

I should have read before I posted an answer… Adding --publicHostName to register-with does the trick!

Hi Erwin,

Glad that got it working for you.