DEV Community

Emille G.
Emille G.

Posted on

Serve your Django application over wifi (the local network)

In case you were wondering how to do this, here’s how.

To serve your Django application over the local network, run this command



python manage.py runserver 0.0.0.0:8000


Enter fullscreen mode Exit fullscreen mode

Alternatively, you can use the IP address of the host machine on the local network.

Your IP address on the local network

Open up a terminal on Linux and use the ifconfig command. Read the description here.



ifconfig


Enter fullscreen mode Exit fullscreen mode

Then look for the inet field in the status output under the current interface. In my case the current interface is wifi0.

ifconfig command output

then do



python manage.py runserver 192.168.88.14:8000


Enter fullscreen mode Exit fullscreen mode

Enjoy!

Top comments (0)