How can I configure the Discovery service to use a different port when running? By default it is port 8082 but it appears to be actively refused from my server.

Is it set in the cd_storage conf of the Discovery service? Is that value used by the Windows Service when starting?

<ConfigRepository ServiceUri=""


The cleanest way to do this is by passing parameters to the InstallService.ps1 script. The parameter passing convention deviates from the standard Powershell approach, so you need to be careful with it. What I do is to have a separate script called Invoke-InstallService.ps1 which lives in the bin directory alongside SDL's InstallService.ps1. Here's what it looks like for my staging discovery service.

$scriptPath = Split-Path $script:MyInvocation.MyCommand.Path
& $scriptPath\installService.ps1 --Name=SDLWebStagingDiscoveryService --Description="SDL Web Staging Discovery Service" `
--DisplayName="SDL Web Staging Discovery Service" --server.port=9082 
  • 2
    And note that if your run the Discovery Service on a non-standard port, you will have to change the ConfigRepository references in the cd_storage_conf.xml of some of the microservices (Discovery and Content for sure) too. Apr 15 '16 at 8:35
  • I've changed the port, but still get this on the local machine from PowerShell, "WARNING: TCP connect to localhost:80 failed". There was a default website running with no problem there. This is shown after the Starting service and SERVICE_NAME info....
    – robrtc
    Apr 15 '16 at 11:04
  • If you run the invoke- script under the Powershell ISE and break on the line that invokes the install script, you should be able to F11 into the install script and check that the parameters got passed through as you intended.
    – Dominic Cronin
    Apr 17 '16 at 19:42

It is in discovery\bin\installService.ps1 script:


You can firstly uninstall your service, change this setting and install it again.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.