Octopus Server Database Relocation

current server is AUCOLO-TFS
the new server is AUCOLO-ADMSQL01

Issue 1:
Octopus Server Config File
Our Octopus server instance is launched as a service and is defined in services as follows…
“C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe” run --instance=“OctopusServer”
Right clicking on the service in task manager and services shows that path as well.
There are no Octopus.Server.config files in that path that have any DB connection strings defined that match our current configuration

There is a Octopus.Server.config file in D:\Octopus that has a setting of …
Data Source=AUCOLO-TFS;Initial Catalog=DeployServer_OctopusDeploy;Integrated Security=True

Which matches the output of
C:\Program Files\Octopus Deploy\Octopus> Octopus.Server.exe show-configuration --format=json-hierarchical --file=c:\temp\octopus_settings.txt

“Octopus”: {
… other parameters hidden as irrelevant …
“Storage”: {
“ExternalDatabaseConnectionString”: “Data Source=AUCOLO-TFS;Initial Catalog=DeployServer_OctopusDeploy;Integrated Security=True”
… other parameters hidden as irrelevant …

The only mapping to this file that I can find that octopus.server could possibly use is in the registry
HKEY_LOCAL_MACHINE\SOFTWARE\Octopus\OctopusServer\OctopusServer\ConfigurationFilePath : D:\Octopus\OctopusServer.config

I think that this is perfectly valid, can you please advise that this is correct?

Issue 2:
According to the documentation, to change the database connection string, issue the following command…
Octopus.Server.exe database --connectionString=“Data Source=AUCOLO-ADMSQL01;Initial Catalog=DeployServer_OctopusDeploy;Integrated Security=True”

But, from the above I can see the current DB server connection setting is …
“ExternalDatabaseConnectionString”: “Data Source=AUCOLO-TFS;Initial Catalog=DeployServer_OctopusDeploy;Integrated Security=True”

My concern is the config setting is “ExternalDatabaseConnectionString” yet the Octopus.Server command is “–connectionString”

  1. Can you please validate that this is the correct procedure and
  2. if not, what the correct procedure will be?

Issue 3:
Rather than following the steps in Issue 2:, can we merely update D:\Octopus\OctopusServer.config file with the new servername and simply restart the service?

Kind Regards

Hi Bill,

Thanks for getting in touch!

For issue 1, you are correct in that the executable runs from C:\Program Files\Octopus Deploy\Octopus\Octopus.Server.exe, however the config file is located (for your instance) at D:\Octopus, and that is by design :slight_smile:.

Regarding issue 2, that command is correct. It will then update the correct section of your OctopusServer.config path, and is the recommended method of ensuring the update is successful. Option 3 should also get you the same result.

Please let me know if there is anything else that we can assist with!


Thanks Alex,
We have scheduled the change for Monday 02/07
I’m looking at option 3, thanks the for the validation. I prefer editing config files rather than pulling the trigger on a command and hope it works. Harder to validate and roll back.
I’ll let u know how we go