Fathom Lite Analytics
Simple, privacy-first website analytics (open-source lite version).
Overview
Fathom Lite Analytics is a privacy-first, open-source web analytics platform developed as a lightweight alternative to Google Analytics. Originally created by Paul Jarvis and Jack Ellis, Fathom focuses on providing essential website metrics without compromising visitor privacy or requiring cookie consent banners. The platform collects anonymous traffic data while being fully GDPR, CCPA, and PECR compliant by design. This Docker stack deploys Fathom using SQLite as the database backend, creating a self-contained analytics solution that stores all data locally on your infrastructure. The configuration uses persistent volumes for data retention and exposes the web interface on port 8080, making it accessible for both small personal websites and larger organizational deployments. This setup is ideal for developers, small businesses, and privacy-conscious organizations who want complete control over their analytics data without relying on third-party services that track users across the web.
Key Features
- Privacy-first analytics with no personal data collection or IP address storage
- SQLite database backend requiring no external database dependencies
- Lightweight tracking script under 2KB that loads quickly on websites
- Real-time visitor tracking and pageview statistics
- GDPR compliant analytics without requiring cookie consent banners
- Clean, minimalist dashboard showing essential metrics only
- Self-hosted solution keeping all analytics data under your control
- Anonymous visitor counting with basic geographic insights
Common Use Cases
- 1Small business websites needing basic traffic insights without privacy concerns
- 2Personal blogs and portfolio sites requiring lightweight analytics
- 3EU-based organizations needing GDPR-compliant analytics solutions
- 4Development agencies managing multiple client websites with privacy requirements
- 5Educational institutions tracking course material and resource usage
- 6Non-profit organizations monitoring campaign effectiveness while respecting donor privacy
- 7Tech startups replacing Google Analytics for improved user trust
Prerequisites
- Docker and Docker Compose installed on the host system
- Minimum 512MB RAM available for the Fathom container
- Port 8080 available and not conflicting with other services
- Basic understanding of web analytics and tracking code implementation
- Access to website source code for adding Fathom tracking script
- Generated secret key for FATHOM_SECRET environment variable
For development & testing. Review security settings, change default credentials, and test thoroughly before production use. See Terms
docker-compose.yml
docker-compose.yml
1services: 2 fathom: 3 image: usefathom/fathom:latest4 container_name: fathom5 environment: 6 - FATHOM_SERVER_ADDR=:80807 - FATHOM_DATABASE_DRIVER=sqlite38 - FATHOM_DATABASE_NAME=/data/fathom.db9 - FATHOM_SECRET=${FATHOM_SECRET}10 volumes: 11 - fathom-data:/data12 ports: 13 - "8080:8080"14 networks: 15 - fathom-network16 restart: unless-stopped1718volumes: 19 fathom-data: 2021networks: 22 fathom-network: 23 driver: bridge.env Template
.env
1# Fathom Lite2# Generate with: openssl rand -hex 323FATHOM_SECRET=your_secret_key45# Create user: fathom user add --email=you@example.com --password=yourpasswordUsage Notes
- 1Dashboard at http://localhost:8080
- 2Create user via CLI first
- 3Simple tracking script
- 4Privacy-focused by design
- 5Note: Lite version is limited
Quick Start
terminal
1# 1. Create the compose file2cat > docker-compose.yml << 'EOF'3services:4 fathom:5 image: usefathom/fathom:latest6 container_name: fathom7 environment:8 - FATHOM_SERVER_ADDR=:80809 - FATHOM_DATABASE_DRIVER=sqlite310 - FATHOM_DATABASE_NAME=/data/fathom.db11 - FATHOM_SECRET=${FATHOM_SECRET}12 volumes:13 - fathom-data:/data14 ports:15 - "8080:8080"16 networks:17 - fathom-network18 restart: unless-stopped1920volumes:21 fathom-data:2223networks:24 fathom-network:25 driver: bridge26EOF2728# 2. Create the .env file29cat > .env << 'EOF'30# Fathom Lite31# Generate with: openssl rand -hex 3232FATHOM_SECRET=your_secret_key3334# Create user: fathom user add --email=you@example.com --password=yourpassword35EOF3637# 3. Start the services38docker compose up -d3940# 4. View logs41docker compose logs -fOne-Liner
Run this command to download and set up the recipe in one step:
terminal
1curl -fsSL https://docker.recipes/api/recipes/fathom-analytics/run | bashTroubleshooting
- Dashboard shows 'Database locked' error: Stop the container, check file permissions on the volume mount, and ensure only one Fathom instance accesses the SQLite database
- Cannot create admin user account: Use docker exec to run 'fathom user add' command inside the running container with appropriate email and password parameters
- Tracking script not recording pageviews: Verify the site ID matches between dashboard and tracking code, and check browser console for JavaScript errors
- Container fails to start with permission errors: Ensure the Docker daemon has write access to the volume mount point and the fathom user can access /data directory
- Dashboard accessible but shows no data: Confirm tracking script is properly installed on website pages and test with browser developer tools network tab
- High memory usage with large datasets: Consider migrating from SQLite to PostgreSQL for better performance with high-traffic websites
Community Notes
Loading...
Loading notes...
Download Recipe Kit
Get all files in a ready-to-deploy package
Includes docker-compose.yml, .env template, README, and license
Ad Space
Shortcuts: C CopyF FavoriteD Download