Configure Octopus Server to listen to a particular IP address


I working with a small team and we need to install Octopus Deploy and TeamCity on the same server. The server is provisioned with two IP addresses. I have configured TeamCity to one of the IP addresses(port 80). I could not find settings to restrict Octopus Deploy to other IP address, by default it listens to all IP addresses. I even tried adding a binding to specific IP and that too doesnt work.

Here is what the log shows.
2015-05-23 18:06:15.5541 INFO Waiting for service to start. Current status: StartPending
2015-05-23 18:06:16.7783 INFO Waiting for service to start. Current status: Running
2015-05-23 18:06:17.2593 ERROR The HTTP server failed to start because the port is in use. See:
System.Net.HttpListenerException (0x80004005): The process cannot access the file because it is being used by another process
at System.Net.HttpListener.AddAllPrefixes()
at System.Net.HttpListener.Start()
at Octopus.Server.Web.OctopusNancyHost.TryStartListener() in y:\work\refs\heads\release\source\Octopus.Server\Web\OctopusNancyHost.cs:line 189

Is there any way to make octopus deploy server listen to listen only to a particular IP address?



Hi Kamal,

Thanks for getting in touch! Octopus uses http.sys so there are two steps to changing the bindings.
The first is to open the Octopus Manager and change the bindings.
The second step is you need to update the http.sys file to include your IP address.
But here I have to give a big fat warning: This will also change the IP addresses for anything using http.sys.
The instructions for what command to run and why can be found on the following blog post:

Hope that helps!

Hi Vanessa,

The instructions help me fix the issue. What I did was to run the following
netsh http add iplisten ipaddress=x.x.x.x
and restrict http.sys to listen on primary IP address only. I updated Teamcity to listen on second IP address and all is good now.