Octopus Offline Deploy - Could Read-Host be replaced with a param?


We have a solution which we deploy to two different networks (say, NetworkA and NetworkB).

We run our dev and test environment in NetworkA, where Octopus Server and Tentacles are installed, and everything works exactly as it should. However, our stage and production environment run in NetworkB; a network which cannot talk to NetworkA (and vice versa). We have started the (long) process of being allowed to have a Tentacle in NetworkB which can talk to the Octopus Server in NetworkA, but this probably won’t happen this year.

We have considered installing a second Octopus Server in Network B. However, since moving any sort of file from NetworkA to NetworkB is a huge hassle, this, combined with manually having to keep the two instances in sync, makes us want to try Offline Deploy until we get access through the firewall. (Also, licensing of two Octopus Servers isn’t really clear from what I’ve found.)

We therefore tried Offline Deploy today, and this seems to be great. We have some sensitive variables which need to be encrypted, which in turn requires us to provide a password when executing the deployment. In the generated PowerShell script to run the deployment, this is by using Read-Host:

$Password = ConvertTo-PlainText (Read-Host "Enter your password to decrypt sensitive-variables:" -AsSecureString)

Is there any reason this isn’t a param, E.G.:


We are allowed to automate things in NetworkB, so being able to just drop the file somewhere in NetworkB and have a scheduled task just run these would automate everything which we can (as of today) automate. However, when getting the password using Read-Host, this isn’t possible.

Is it somehow possible to change this?

As mentioned, we could run a separate Octopus Server, but as of now, Offline Deploy does seem like the better fit for our organization, but being able to automate this last step would be great.

PS: We run Octopus Server 3.3.8, but according to the version comparison nothing has changed regarding this up to 3.3.11.


Hi Njål,

Thanks for getting in touch and great question! I think you’re right that offline deployments is a much better solution in your environment.

In regards to your question about support to change the offline Powershell script, unfortunately, we don’t have a way to customise the built-in script. If the default script doesn’t suit your environment, I’d recommend updating it manually or adding a environment specific script step to customize or replace the existing one.

Let me know how you go.



We have tried this out now, and using an evironment specific step worked out as you suggested.

Thanks for the suggestion and the quick reply!

PS: The template we are using for this has not been generalized at all, but if anyone is interested, please let me know and I’ll look into it :slight_smile: