A robust, real-time local network chat application built with Python and Flask. Designed for seamless communication within a local environment, featuring persistent sessions and instant messaging capabilities.
- Real-Time Messaging: Instant message delivery using WebSocket (Flask-SocketIO).
- Persistent Sessions: Users stay logged in across page refreshes and browser restarts (up to 30 days).
- Auto-Login: Intelligent session management automatically restores your username.
- Private Messaging: Support for direct 1-on-1 conversations.
- Typing Indicators: See when other users are typing.
- Live User List: Real-time updates of who is currently online.
- Docker Ready: Fully containerized for easy deployment.
To chat with others or connect from your phone, devices must be on the same Wi-Fi or Local Area Network (LAN).
- Find the Local IP Address of the computer running the server (e.g.,
192.168.1.11). - On your other device (Phone/Laptop), open a browser and enter that IP with the port
.5000.- Example:
http://192.168.1.11:5000
- Example:
Reference for finding your server URLs to share with other devices.
You can run LAN Chat using Docker (recommended) or directly with Python.
Ensure you have Docker installed on your machine.
For Windows:
Simply double-click run.bat or run it from the command line:
.\run.batFor Linux/macOS: Make the script executable and run it:
chmod +x run.sh
./run.shThese scripts will load the docker image (if present as lan-chat.tar) and start the container on port 5000.
-
Install Application Dependencies:
pip install -r requirements.txt
-
Run the Application:
python main.py
-
Access the Chat: Open your browser and navigate to
http://localhost:5000(or your machine's IP address on the LAN).
- Backend: Python 3.9+, Flask
- Real-time Engine: Flask-SocketIO
- Frontend: HTML5, CSS3, JavaScript
- Containerization: Docker





