I have a webapp that I'm testing via SSH; it's available on localhost:webappport when I'm logged into the pi. However, if I try to view the webapp by going to the pi.ip:webappport from another machine on my local network, I don't get any response.

Now, I assume this is because the pi is only making the webapp available to local resources - so how do I make the localhost traffic accessible to an external connection? I'd be happy to do this with a simple web server, or with some sort of SSH-hosted connection. Ideally, I'd like it to be a simple / straight forward process that's not terribly insecure. (While I'm only using this to test locally right now, the option to reapply what I learn here to future testing, including that not limited to the LAN would be quite helpful.)

So, what's the best way to serve localhost traffic to a direct connection (via IP) on my local network?

  • 1
    Not Pi specific. There should be a better site for this question.
    – joan
    Jun 11, 2018 at 22:03
  • 1
    @joan Technically neither is raspberrypi.stackexchange.com/questions/78364/… or raspberrypi.stackexchange.com/questions/84783/…, but they are both pi-appropriate.... Jun 11, 2018 at 22:09
  • 2
    The point is that someone may answer but you are more likely to get a correct and timely answer if you ask the question on a more appropriate site.
    – joan
    Jun 11, 2018 at 22:23
  • It sounds like your webapp (which we know nothing about) refuses external connections. Perhaps you should configure it to accept them? Jun 25, 2018 at 10:53

1 Answer 1


Since Raspberry Pi is a general purpose Linux computer, many web servers such as NodeJS or Apache will serve HTML and REST services just fine over your local network. Choose the web server based on your programming language preference and then follow relevant installation instructions for that web server. Once you have chosen your web server, do search for Raspberry Pi specific instructions if any.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.