Django January 20, 2026 1 min read

Run Django on a Local Network Using 0.0.0.0 – Complete Beginner Guide

Learn how to run a Django project on a local network using 0.0.0.0, configure ALLOWED_HOSTS correctly, and access your site from any device.

ixict
Mohammed Alturki
74 views
Run Django on a Local Network Using 0.0.0.0 – Complete Beginner Guide

Table of Contents

  • Loading table of contents...

How to Run a Django Project on a Local Network (0.0.0.0 Explained)

Step 1: Activate the Virtual Environment

. core/Scripts/activate

 

Step 2: Run Django on the Network

python manage.py runserver 0.0.0.0:8000

This allows any device on the same local network to access your Django project

 

Access from another device:

http://YOUR-IP:8000

 

Step 3: Configure ALLOWED_HOSTS

Open settings.py and update:

ALLOWED_HOSTS = ['192.168.8.126', 'localhost', '127.0.0.1']

 

For testing only:

ALLOWED_HOSTS = ['*']

 

🔐 Security Note

  • 0.0.0.0 allows access only within the same network

  • Do not use ALLOWED_HOSTS = ['*'] in production

Related Articles

Discussion 1

M
Mark
1 day, 8 hours ago

Thank you. i was expecting this tricky but usually sample and really helps

Leave a Comment