Octopus Server Moving backend database in multiple instance installation

Hi, we have a requirement to move the backend Octopus database to a new SQL server instance.

Our Octopus Windows server is running 2 instances of Octopus…both have different SQL backend databases…

PS C:\Program Files\Octopus Deploy\Octopus> .\Octopus.Server.exe list-instances
Instance ‘OctopusGWOP’ uses configuration ‘D:\OctopusGW\OctopusServer-OctopusGW.config’.
Instance ‘OctopusServer’ uses configuration ‘D:\Octopus\OctopusServer.config’.

Using the instructions link below, how do I adapt the octopus.server.exe command line parms to address the Octopus instance I want to change (in our case its the “OctopusServer” instance) ?

Out of the available parameters in octopus.server.exe, I couldn’t find one that would select an instance for the connection string change


Hi @mcalnd

Thanks for getting in touch!

Sorry that this one is more difficult than it should be, it seems we don’t have a way to specify an instance here. What I would recommend in this case would be to do do a manual update of the config files.

To do that you will need to stop the appropriate Octopus server service, update the database connection string Octopus.Storage.ExternalDatabaseConnectionString in your OctopusServer.config (or OctopusServer-OctopusGQ.config) file. I’ve included an extract from an example file below:

<?xml version="1.0" encoding="utf-8"?>
<octopus-settings xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <set key="Octopus.Communications.ServicesPort">10943</set>
  <set key="Octopus.Home">C:\Octopus</set>
  <set key="Octopus.Server.NodeName">OctoNode1</set>
  <set key="Octopus.Storage.ExternalDatabaseConnectionString">Data Source=(local)\SQLEXPRESS;Initial Catalog=Octopus;Integrated Security=True</set>
  <set key="Octopus.Storage.MasterKey">EncodedMasterKey</set>
  <set key="Octopus.Upgrades.AllowChecking">true</set>
  <set key="Octopus.Upgrades.IncludeStatistics">false</set>
  <set key="Octopus.WebPortal.ForceSsl">false</set>
  <set key="Octopus.WebPortal.ListenPrefixes">http://localhost:80/</set>

Once that line has been updated restart your Octopus Server service and it will attempt to connect to the new database.

Let me know if you run into any issues or if there is anything else that I can help you with,


Thanks for the reply Alex - seems fairly straightforward if you ask me.

Best Regards


Hi @mcalnd,

No problems, it is fairly straightforward :slight_smile:

Any issues let me know,


1 Like