Search code examples
pythonwebserverweb-deploymentcherrypy

How to deploy a CherryPy app locally


How do I deploy a CherryPy app to my company intranet?

Right now I can access it from my computer with http://localhost:8080/.

I found this (and many others) with half answer: cherrypy.server.socket_host = '0.0.0.0'.

Then what?

What is the URI that allows any computer in the private network to access the app?

Is there any system configuration outside of CherryPy that I need to do? I'm working on Windows 7.


Solution

  • Use the IP of the pc or server you want to serve locally from...

    cherrypy.server.socket_host = '192.168.0.147'
    cherrypy.server.socket_port = 8080
    

    Then go into your firewall and allow both inbound and outbound traffic on port 8080 or whatever port you've chosen.

    Hope this helps!