Skip to content

Latest commit

 

History

History
164 lines (123 loc) · 4.78 KB

File metadata and controls

164 lines (123 loc) · 4.78 KB

Local Network Setup Guide

This guide explains how to run Pulsefeed on your local network so other devices (phones, tablets, other computers) can access it.

Quick Start

Full Features (Recommended)

python start_network.py

Includes: Chat, WebSocket support, all features

Basic (No Chat)

python run_local_network.py

Includes: All features except real-time chat

Development (This Computer Only)

python app.py

Note: Only accessible from the computer running the server

Accessing from Other Devices

After starting the server, you'll see output like:

Access from other devices on your network:
  http://192.168.1.100:5000

Use that URL on your phone, tablet, or other computers connected to the same WiFi network.

Firewall Configuration

If other devices can't connect, you may need to allow Python through Windows Firewall:

Option 1: When Prompted

  1. Start the server with python start_network.py
  2. Windows will show a security alert
  3. Check "Private networks" (your home WiFi)
  4. Click "Allow access"

Option 2: Manual Configuration

  1. Open Windows Security (search in Start menu)
  2. Go to Firewall & network protection
  3. Click Allow an app through firewall
  4. Click Change settings (requires admin)
  5. Find Python in the list
  6. Check both Private and Public boxes
  7. Click OK

Option 3: Create Firewall Rule

# Run PowerShell as Administrator
New-NetFirewallRule -DisplayName "Pulsefeed" -Direction Inbound -Protocol TCP -LocalPort 5000 -Action Allow

Finding Your Local IP Address

Windows Command Prompt

ipconfig

Look for "IPv4 Address" under your active network adapter (usually starts with 192.168.x.x or 10.0.x.x)

PowerShell

Get-NetIPAddress -AddressFamily IPv4 | Where-Object {$_.IPAddress -like "192.168.*"}

Security Considerations

Important Security Notes

  • Local Network Only: This setup only works on your local network (home WiFi). It's not accessible from the internet.
  • User Accounts: Each person needs their own account. Use the invite code system to control who can register.
  • Trusted Networks Only: Don't use this on public WiFi or untrusted networks.
  • HTTPS: This setup uses HTTP (not HTTPS). Data is not encrypted in transit on your local network.

Best Practices

  1. Change Secret Key: Set a strong SECRET_KEY in your environment variables
  2. Limit Invites: Only generate invite codes for people you trust
  3. Monitor Users: Regularly check user accounts in Settings
  4. Backup Database: Regularly backup instance/data.db

Troubleshooting

Can't Connect from Other Devices

Check 1: Same Network

  • Ensure both devices are on the same WiFi network
  • Guest networks often isolate devices from each other

Check 2: Firewall

  • Allow Python through Windows Firewall (see above)
  • Temporarily disable firewall to test (remember to re-enable)

Check 3: IP Address

  • Verify you're using the correct IP address
  • IPs can change - run ipconfig to get current IP

Check 4: Server Running

  • Make sure the server is actually running
  • Check for error messages in the terminal

Check 5: Port Conflicts

  • Make sure port 5000 isn't used by another application
  • Try a different port: set PORT=8080 && python start_network.py

Chat Not Working

Solution: Use python start_network.py (not run_local_network.py)

  • Waitress doesn't support WebSockets
  • Chat requires the SocketIO server

Slow Performance

Possible Causes:

  • WiFi signal strength
  • Too many concurrent users (SQLite has limits)
  • Running on slow/old computer

Solutions:

  • Use 5GHz WiFi instead of 2.4GHz
  • Limit concurrent users to 3-5
  • Consider upgrading to PostgreSQL for heavy use

Advanced Configuration

Custom Port

set PORT=8080
python start_network.py

Production Deployment

For production use (always on, better performance), consider:

  • Using a proper WSGI server (Gunicorn on Linux, Waitress on Windows)
  • Setting up HTTPS with nginx reverse proxy
  • Using PostgreSQL instead of SQLite
  • Running as a Windows service

See docs/deployment/ for production deployment guides (coming soon).

Server Options Comparison

Feature app.py run_local_network.py start_network.py
Network Access No Yes Yes
Chat Support No No Yes
Auto-Reload Yes No Yes
Production Ready No Yes No
Best For Development Basic hosting Full features

Getting Help

If you encounter issues:

  1. Check the terminal for error messages
  2. Review this guide's troubleshooting section
  3. Check docs/systems/ for system-specific documentation
  4. File an issue on GitHub (if applicable)