diff --git a/docker-compose.yml b/docker-compose.yml
index f69b79f3be2f89f9a84162269af79ce86d0038a2..f41012e20e219ae6418abc7b8d486f351501e084 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -45,6 +45,7 @@ services:
       - SAFEMODE=False
       - DJANGO_LOG_LEVEL=CRITICAL
       - ROSETTA_LOG_LEVEL=DEBUG
+      #- ROSETTA_TUNNEL_HOST=
       #- ROSETTA_WEBAPP_HOST=
       #- ROSETTA_WEBAPP_PORT=8080
       #- LOCAL_DOCKER_REGISTRY_HOST=
diff --git a/services/webapp/code/rosetta/base_app/utils.py b/services/webapp/code/rosetta/base_app/utils.py
index fa369d68c70b83653aec6dab0846511aaa237b4d..5d675e3436603d47a9e367ab72445447a1cce1b2 100644
--- a/services/webapp/code/rosetta/base_app/utils.py
+++ b/services/webapp/code/rosetta/base_app/utils.py
@@ -452,7 +452,9 @@ def get_local_docker_registry_conn_string():
     local_docker_registry_conn_string = '{}:{}'.format(local_docker_registry_host, local_docker_registry_port)
     return local_docker_registry_conn_string
     
-
+def get_tunnel_host():
+    tunnel_host = os.environ.get('ROSETTA_TUNNEL_HOST', 'localhost')
+    return tunnel_host
 
 
 
diff --git a/services/webapp/code/rosetta/base_app/views.py b/services/webapp/code/rosetta/base_app/views.py
index dd6eeabbfe78ab2d7a1d866d1a16b84cd64331a3..8b322b84d35c0528c487a7082b467254eef726af 100644
--- a/services/webapp/code/rosetta/base_app/views.py
+++ b/services/webapp/code/rosetta/base_app/views.py
@@ -339,7 +339,9 @@ def tasks(request):
                     subprocess.Popen(background_tunnel_command, shell=True)
 
                 # Ok, now redirect to the task through the tunnel
-                return redirect('http://localhost:{}'.format(task.tunnel_port))
+                from utils import get_tunnel_host
+                tunnel_host = get_tunnel_host()
+                return redirect('http://{}:{}'.format(tunnel_host,task.tunnel_port))
 
         except Exception as e:
             data['error'] = 'Error in getting the task or performing the required action'