Browser-based remote desktop tool for your local network β live screen streaming, full mouse & keyboard control, and system power management, protected by password authentication.
| Feature | Details |
|---|---|
| π Password Login | Secure session-based authentication |
| πΊ Live Streaming | Up to 60 FPS screen streaming |
| π±οΈ Mouse Control | Left click, right click, double click |
| β¨οΈ Keyboard Input | Send text to the remote PC |
| β‘ Power Controls | Sleep, Restart, Shutdown (with confirmation) |
| π Cross-Device | Works from any browser β PC, phone, tablet |
| π Auto-Start | Runs silently on Windows boot |
web_control/
βββ main.py # Entry point β run this to start
βββ server.py # Flask routes & SocketIO events
βββ auth.py # Login, logout, session management
βββ screen.py # Screen capture & streaming logic
βββ control.py # Mouse & keyboard control
βββ system.py # Shutdown / restart / sleep
βββ config.py # All settings in one place
βββ templates/
β βββ login.html # Login page
β βββ index.html # Main control UI
βββ static/
β βββ app.js # Frontend JavaScript
βββ requirements.txt # Python dependencies
βββ start_remote.bat # Windows auto-start script
- OS: Windows 10 / 11 (also works on Linux and macOS)
- Python: 3.10 or higher
- Network: Both devices must be on the same Wi-Fi
Open Command Prompt and run:
pip install flask flask-socketio pyautogui mss pillow python-socketio werkzeugOr use the requirements file:
pip install -r requirements.txtOpen config.py and update the credentials:
USERNAME = "admin" # Change this
PASSWORD_HASH = generate_password_hash("admin123") # Change thisTo generate a secure password hash, run this in Python:
from werkzeug.security import generate_password_hash
print(generate_password_hash("your_new_password"))Then paste the output as the value of PASSWORD_HASH.
Also update the secret key:
SECRET_KEY = 'a1b2c3d4e5f6-change-this-to-any-long-random-string'cd D:\codeing\web_control
python main.pyThe terminal will show:
Local: http://localhost:5000
Network: http://192.168.0.117:5000
Open the Network URL on any device connected to the same Wi-Fi.
To make the server start automatically and silently every time Windows starts:
Make sure these paths match your system:
@echo off
cd /d "D:\codeing\web_control"
start "" "C:\Users\YourUsername\AppData\Local\Programs\Python\Python310\pythonw.exe" "D:\codeing\web_control\main.py"
exit
pythonw.exeruns the server silently in the background β no terminal window.
Press Win + R, type the following, and press Enter:
shell:startup
Copy start_remote.bat into the Startup folder. Done β the server will now start automatically on every boot.
| Device | URL |
|---|---|
| Same PC | http://localhost:5000 |
| Phone / Tablet / Other PC | http://<PC-LOCAL-IP>:5000 |
To find your PC's local IP, open Command Prompt and type
ipconfig. Look for IPv4 Address under your active network adapter.
When you open the URL on any device, you'll see the login page. Enter your username and password. After a successful login, you'll be taken to the control panel.
All login attempts (successful and failed) are printed in the server terminal.
| Action | How |
|---|---|
| Left Click | Single click on the screen canvas |
| Right Click | Right-click on the screen canvas |
| Double Click | Double-click on the screen canvas |
| Type Text | Enter text in the input box β click Send Text or press Enter |
| Start Streaming | Click Start Streaming to begin live view |
| Stop Streaming | Click Stop Streaming to pause |
| Screenshot | Click Single Screenshot for a one-time capture |
| Sleep | System Controls β π€ Sleep (confirmation required) |
| Restart | System Controls β π Restart (confirmation required) |
| Shutdown | System Controls β β‘ Shutdown (confirmation required) |
| Logout | Click the Logout button in the top-right corner |
All settings are in config.py:
| Setting | Default | Description |
|---|---|---|
PORT |
5000 |
Server port |
SECRET_KEY |
(change this) | Flask session encryption key |
USERNAME |
admin |
Login username |
PASSWORD_HASH |
admin123 hashed |
Login password |
FPS |
60 |
Streaming frame rate |
CAPTURE_WIDTH |
1280 |
Stream resolution width |
CAPTURE_HEIGHT |
720 |
Stream resolution height |
JPEG_QUALITY |
60 |
Image compression (1β95) |
DEBUG |
False |
Flask debug mode |
If running in terminal: Press Ctrl + C
If running silently via .bat (auto-start):
- Press
Ctrl + Shift + Escto open Task Manager - Find
pythonw.exeunder Background Processes - Right-click β End Task
Showing "Disconnected" on mobile?
- Make sure both devices are on the same Wi-Fi network
- Verify
manage_session=Falseis set inserver.py - Verify
withCredentials: trueis set instatic/app.js - Try opening the URL in a different browser
TemplateNotFound: login.html error?
- Make sure
login.htmlandindex.htmlare inside atemplates/folder - Make sure
app.jsis inside astatic/folder
Screen not capturing?
- Run the server as Administrator on Windows
- Make sure
mssandpilloware installed
Low FPS?
- Lower
CAPTURE_WIDTHandCAPTURE_HEIGHTinconfig.py - Lower
JPEG_QUALITYfor faster encoding
- This tool gives full control of your PC to anyone who accesses it
- Always change the default username and password before use
- Only use on trusted private networks β never expose port
5000to the internet - Power actions (Restart/Shutdown) require confirmation but execute quickly β use with care
- All login attempts and system actions are logged in the server terminal
This project is open source and free to use for personal and educational purposes.