Is there any way to access GAE dev app server in the local network?

Solution 1:

First check whether your server listens on loopback or on all interfaces - in command line type in netstat -an find a line with port 8080 and state LISTENING, something like this:

  TCP    0.0.0.0:8080           0.0.0.0:0              LISTENING

If IP is 0.0.0.0 it means it listens on all IP addresses and the problem is with something else blocking it.

If IP is 127.0.0.1 then you need to bind to 0.0.0.0 address. And now the fun beings - according to documentation, you should add --address=0.0.0.0 or --host=0.0.0.0 to arguments in run configuration (depends on GAE version - thank you @momijigari). But in my case I have also GWT and parameters go to GWT and it does not accept this argument. But on the other hand listens on all interfaces, which I personally was trying to change to localhost. The GWT has -bindAddress parameter though, but it sets only address for code server (one with 9997 port by default), not HTTP.

Solution 2:

Command line

Pass this program argument:

--address=0.0.0.0

Eclipse

Start your dev server with this extra program argument (you can find this under “debug configurations” in eclipse):

--address=0.0.0.0

Gradle

If you’re using appengine-gradle-plugin +2.0.0, then you need to set it like this:

appengine {
    host = "0.0.0.0"
    port = 8888
    ...

If you're using appengine gradle plugin before version 2.0.0, then you need to set it like this:

appengine {
    httpAddress = "0.0.0.0"
    httpPort = 8888
    ...

Maven

<configuration> 
    <address>0.0.0.0</address>
    ...

Solution 3:

Little update. Since version 1.8.7 you have to set a param "--host" instead of "--address"

So just add --host=0.0.0.0

Solution 4:

I got it working using the suggestions above for --host=0.0.0.0. Here are the steps.

  1. While on the project go to Edit > Application Settings
  2. Add to Extra Command Line Flags

Google App Engine Settings

Added Extra Command Line Flags