Can you describe the arrangement of machines/networks that you are working with and what exactly you are trying to do? There are a few things that could be going on here.
First, in general, you will only use the "localhost" address, if you are connecting to "localhost" (i.e. the current machine, not a remote one) So if you have two machines, your local laptop, and an ssh/web server with the hostname "
sshserver1.something.net" , and you log into sshserver1 and start voila, then when you want to connect to it from your local machine, instead of putting "localhost:5000" in your browser, you would put "
sshserver1.something.net:5000". Additionally, for security reasons, by default voila only hosts on localhost, so that other random users cannot connect and see the data. If you want to host for any user to connect to, you would run voila view with the switch "--host 0.0.0.0" (0.0.0.0 for all hosts, or some specific address/cidr to limit to certain viewing clients)
Now, that's assuming you have access to this other machine and there isn't a firewall which might block certain ports, such as 5000, in between your local machine and the server. To bypass the firewalls, is where the "ssh tunnel" comes in. To do this, you can open a second SSH connection with something like $ ssh -N -L 5000:
sshserver1.something.net:5000 user...@sshserver1.something.net ; This will run but not show anything. Is is redirecting the remote:5000 data to localhost:5000 ; so now you can go to localhost:5000 in your browser to see the result.
I hope it makes sense as there are a few different concepts to understand here. Please let me know if you are able to make progress.