A lightweight, privacy-focused, self-hosted live location tracking application that enables secure real-time location sharing without requiring user accounts, external dependencies, or third-party services.
- Self-Hosted Architecture: All location data remains on your server with zero reliance on external tracking services
- No User Accounts Required: Eliminates password vulnerabilities and personal data collection
- Anonymous Tracking Sessions: Each session generates unique anonymous IDs without storing personal information
- Automatic Data Expiration: Location data can be configured for automatic cleanup after journey completion
- No Cookies or Persistent Storage: Uses only session-based temporary identifiers
- Encrypted Transit: Supports HTTPS deployment for end-to-end encryption of location data
- Minimal Data Collection: Only stores essential location coordinates and timestamps
- No Analytics or Telemetry: Zero tracking scripts, analytics, or third-party monitoring
- Ephemeral URLs: Share links are randomized and can be invalidated at any time
- User-Controlled Tracking: Complete control over when tracking starts, stops, and who receives access
- Client-Side Processing: Map rendering and UI interactions happen locally in the browser
- π Real-Time Location Updates: Live GPS tracking with configurable update intervals (1-60 seconds)
- π Instant Share Links: Generate unique URLs for selective location sharing
- π± Mobile-First Design: Responsive GitHub-inspired interface optimized for all devices
- π¬ Journey Replay: Complete route playback with variable speed controls after tracking ends
- πΊοΈ Interactive Maps: OpenStreetMap integration with route visualization
- π Battery Optimization: Adjustable tracking intervals to balance accuracy and power consumption
- π Live Statistics: Real-time display of coordinates, duration, and last update timestamps
- βΆ Fullscreen Mode: Immersive map viewing experience
- π€ Screen Wake Lock: Prevents device sleep during active tracking sessions
- Single-File Deployment: Entire application in one PHP file for simple installation
- No Database Required: Uses lightweight file-based storage
- Zero npm/Composer Dependencies: No complex build processes or package management
- Automatic Heartbeat Monitoring: Detects disconnected sessions and auto-stops tracking
- Beacon API Integration: Ensures tracking stops even on abrupt browser closure
- Progressive Web App Ready: Can be saved to home screen on mobile devices
- PHP 7.4 or higher
- Web server (Apache/Nginx) with PHP support
- Write permissions for the application directory
- HTTPS recommended for production deployment
# Download and set permissions
wget https://raw.githubusercontent.com/xsukax/xsukax-Live-Location-Tracker/main/index.php
chmod 755 .-
Download the Application
git clone https://github.com/xsukax/xsukax-Live-Location-Tracker.git cd xsukax-Live-Location-Tracker -
Set Directory Permissions
chmod 755 /path/to/application/directory
-
Configure Web Server
Apache Configuration:
<Directory /path/to/application> Options -Indexes +FollowSymLinks AllowOverride All Require all granted </Directory>
Nginx Configuration:
location /tracker { alias /path/to/application; index index.php; try_files $uri $uri/ /index.php?$query_string; }
-
Enable HTTPS (Recommended)
# Using Let's Encrypt certbot --apache -d yourdomain.com # or certbot --nginx -d yourdomain.com
flowchart LR
A[Open Application] --> B[Set Update Interval]
B --> C[Click Track Location]
C --> D[Grant GPS Permission]
D --> E[Tracking Active]
E --> F[Share Generated URL]
-
Initialize Tracking
- Navigate to
https://yourdomain.com/index.php - Select update interval (3s for high accuracy, 30s for battery saving)
- Click "π Track My Location"
- Allow location permissions when prompted
- Navigate to
-
Share Your Location
- Copy the generated share URL from the interface
- Send link to trusted contacts
- Recipients can view live location without any login
-
Manage Active Session
- Adjust update interval dynamically during tracking
- Monitor journey statistics in real-time
- Stop tracking manually or let auto-stop handle disconnections
flowchart TD
A[Receive Share URL] --> B[Open in Browser]
B --> C{Tracking Active?}
C -->|Yes| D[View Live Location]
C -->|No| E[View Final Route]
D --> F[Auto-Refresh Every 5s]
E --> G[Replay Journey]
G --> H[Control Playback Speed]
After tracking ends, both tracker and viewers can:
- Play/pause route animation
- Adjust playback speed (0.5x, 1x, 2x, 5x)
- Seek to specific points via progress bar
- View complete route overlay on map
define('HEARTBEAT_TIMEOUT', 30); // Seconds before auto-stopdefine('MAX_POINTS', 5000); // Maximum route points stored<input type="number" id="initialUpdateInterval" value="5">- Deploy Over HTTPS: Essential for protecting location data in transit
- Restrict Directory Listing: Ensure web server configuration prevents file enumeration
- Regular Cleanup: Implement cron job to remove old tracking files
# Cleanup files older than 7 days 0 2 * * * find /path/to/app -name "*.json" -mtime +7 -delete
- Access Control: Consider implementing IP whitelisting or basic authentication for additional security
- Monitor Usage: Review server logs for suspicious activity patterns
graph TD
A[Browser Client] -->|GPS Data| B[PHP Backend]
B -->|Store| C[JSON Files]
B -->|Retrieve| C
A -->|Fetch Updates| B
D[OpenStreetMap] -->|Map Tiles| A
E[Viewer Client] -->|Poll Updates| B
B -->|Location Data| E
Contributions are welcome! Please feel free to submit pull requests, report bugs, or suggest features through the GitHub Issues page.
This project is licensed under the GNU General Public License v3.0.
Location Permission Denied
- Ensure browser has location access enabled
- Check HTTPS is properly configured
- Verify device GPS is activated
Write Permission Error
# Fix permissions
chmod 755 /path/to/application
chown www-data:www-data /path/to/applicationTracking Auto-Stops
- Check heartbeat timeout configuration
- Ensure stable internet connection
- Verify browser tab remains active
- OpenStreetMap contributors for map data
- Leaflet.js for mapping library
- GitHub Design System for UI inspiration
Made with β€οΈ by xsukax
View on GitHub β’ Report Bug β’ Request Feature