Local Network Setup: Windows - Android Hotspot & Python Web Server by t.me/Nexiuo
A guide focusing on connecting a Windows device to an Android hotspot without internet access and setting up a local web server using Python's built-in HTTP server. By following these steps, you'll be able to find your Android device's IP address and set up a local web server that can be accessed from your Windows device connected to the same hotspot.
Getting the IP Address using Termux
- Install Termux: If you haven't already, download and install Termux from the Google Play Store.
- Open Termux: Launch the Termux app on your Android device.
- Update Termux Packages: Ensure all packages are up to date by running:
- Install
net-tools: This package includesifconfig, which helps in finding the IP address.
- Find the IP Address: Use
ifconfigto find the IP address of your Android device.
Look for thewlan0interface (or similar) and note theinetaddress, which is your device's IP address on the local network.
example:
Setting Up a Local Web Server Using Python's http.server
- Install Python: If Python isn't already installed on your Android device, you can install it via Termux.
- Navigate to Your Desired Directory: Use the
cdcommand to navigate to the directory where you want to serve files.
- Start the HTTP Server: Run the following command to start a simple HTTP server on port 8000 (or any other port you prefer).
This will start the server, and you can access it from your Windows device by navigating tohttp://<Android_IP>:8000in a web browser.
Example Commands
- Get IP Address:
- Start HTTP Server:
Steps to Connect Windows to Android Hotspot Without Internet
1. Verify Hotspot IP Address
- Check Android Hotspot IP:
- On your Android device, go to Settings > Network & Internet > Hotspot & tethering > Wi-Fi hotspot.
- Note the IP address of the hotspot. Typically, it is
192.168.43.1.
2. Connect Windows Device to Android Hotspot
- Connect to Hotspot:
- On your Windows device, go to Settings > Network & Internet > Wi-Fi.
- Find and connect to the SSID of your Android hotspot.
3. Disable Metered Connection
- Disable Metered Connection:
- Go to Settings > Network & Internet > Wi-Fi.
- Click on Manage known networks.
- Select your Android hotspot SSID and click Properties.
- Toggle Set as metered connection to Off.
4. Configure Static IP Address on Windows
- Set Static IP:
- Go to Settings > Network & Internet > Wi-Fi.
- Click on your connected network (Android hotspot).

- Scroll down to IP settings and click Edit.
- Change from Automatic (DHCP) to Manual.
- Toggle IPv4 to On and enter the following details:
- IP address: An IP address in the same subnet as your Android device, e.g.,
192.168.43.20. - Subnet prefix length:
24. - Gateway: The IP address of your Android device, e.g.,
192.168.43.1. - Preferred DNS:
8.8.8.8(or any other DNS server). - Click Save.

5. Disable Network Health Check
- Disable Active Probing:
- Press
Win + R, typeregedit, and pressEnter. - Navigate to
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\NlaSvc\Parameters\Internet. - Double-click EnableActiveProbing and change the value from
1to0. - Click OK and restart your computer.
- Press
Setting Up a Local Web Server Using Python
1. Install Python
- Download and Install Python:
- Download the latest version of Python from python.org.
- Follow the installation instructions, ensuring you add Python to your system PATH.
2. Start the Python HTTP Server
- Open Command Prompt:
- Press
Win + R, typecmd, and pressEnter.
- Press
- Navigate to the Directory:
- Use the
cdcommand to navigate to the directory you want to serve. For example:
- Use the
- Start the Server:
- Run the following command to start the Python HTTP server:
- This will start a simple HTTP server on port 8000.
- Run the following command to start the Python HTTP server:
3. Access the Local Web Server
- Access from Windows Device:
- Open a web browser on your Windows device and navigate to
http://localhost:8000orhttp://<your-static-ip>:8000(e.g.,http://192.168.43.20:8000).
- Open a web browser on your Windows device and navigate to
- Access from Other Devices:
- Ensure other devices are connected to the same Android hotspot.
- Open a web browser on any connected device and navigate to
http://<your-static-ip>:8000(e.g.,http://192.168.43.20:8000).
By following these steps, you can establish a stable connection between your Windows device and the Android hotspot, and set up a local web server using Python's built-in HTTP server. This setup allows you to host and access web content on your local network without the need for an internet connection.