diff --git a/medusa/__main__.py b/medusa/__main__.py index ca28c8187a..009da87fad 100755 --- a/medusa/__main__.py +++ b/medusa/__main__.py @@ -559,6 +559,12 @@ def initialize(self, console_logging=True): except Exception: app.WEB_PORT = 8081 + # attempt override WEB_PORT if enviroment variable is set + try: + app.WEB_PORT = int(os.environ.get('MEDUSA_WEB_PORT')) + except Exception: + pass + if not 21 < app.WEB_PORT < 65535: app.WEB_PORT = 8081