Post

Rybbit V200 Google Analytics Alternative - Now With Cool Maps

Rybbit V200 Google Analytics Alternative - Now With Cool Maps

Introduction

In the era of increasing data privacy regulations and growing skepticism around third-party analytics services, DevOps teams face mounting pressure to balance user privacy with actionable insights. Enter Rybbit V200 - the open-source, self-hosted analytics platform that just revolutionized geospatial data visualization while maintaining GDPR compliance.

For system administrators managing homelabs or enterprise infrastructure, analytics tools present a unique challenge: how to monitor user behavior without compromising privacy, incurring licensing costs, or losing control of sensitive data. Traditional solutions like Google Analytics force organizations into trade-offs between functionality and compliance - until now.

This comprehensive guide examines Rybbit V200’s groundbreaking features through the lens of infrastructure management. We’ll explore:

  1. The architectural implications of self-hosted analytics
  2. Technical implementation of Rybbit’s new geospatial capabilities
  3. Security considerations for GDPR-compliant data handling
  4. Performance optimization for resource-constrained environments

By the end, you’ll understand how to deploy an enterprise-grade analytics platform that respects user privacy while delivering unprecedented visibility into traffic patterns - complete with its stunning new map visualizations.

Understanding Rybbit Analytics

What is Rybbit?

Rybbit is an AGPL-3.0 licensed analytics platform designed for self-hosting, offering:

  • Real-time user behavior tracking
  • GDPR-compliant data processing
  • No external dependencies
  • Full data ownership
  • Customizable dashboards

Unlike traditional analytics tools that centralize data in third-party clouds, Rybbit runs entirely within your infrastructure. This architectural approach aligns perfectly with DevOps principles of infrastructure-as-code and observable systems.

Historical Context

First released in 2021, Rybbit emerged as part of the growing self-hosted analytics movement. Version 200 represents a major milestone focused on:

  1. Enhanced geospatial visualization
  2. Improved user journey analysis
  3. Granular privacy controls
  4. Performance optimizations

Key Features of V200

FeatureTechnical ImpactPrivacy Benefit
Replayable timeline mapsVector tile renderingNo IP storage required
User journey redesignSession-based Redis cachingPseudonymization by default
Optional IP collectionPostgreSQL CIDR field supportGDPR Article 6(1)(f) compliant
Enhanced filtersGraphQL API endpointsField-level data control

Comparison to Alternatives

ToolLicenseSelf-HostedGDPR DefaultMap Features
Google AnalyticsProprietaryBasic
MatomoGPLv3Medium
PlausibleMITBasic
Rybbit V200AGPLv3Advanced

The new map engine differentiates Rybbit through:

  1. WebGL-powered rendering: Handles 10,000+ concurrent points
  2. Time-warp replay: Animates traffic patterns over custom intervals
  3. Vector tile caching: Reduces bandwidth by 78% compared to raster maps

Prerequisites

Hardware Requirements

Traffic VolumevCPUsRAMStorage
< 1K visits/day24GB20GB
1K-10K visits/day48GB100GB
> 10K visits/day8+16GB+500GB+ SSD

Software Dependencies

1
2
3
4
5
6
7
8
9
# Core Requirements
Docker 20.10.8+
Docker Compose 2.6.0+
PostgreSQL 14.5
Redis 6.2.6

# Optional Components
NGINX 1.21.0+ (for reverse proxy)
Certbot 1.32.0+ (for TLS)

Security Checklist

  1. Network Isolation: Deploy in private VLAN with controlled ingress
  2. Firewall Rules: Limit access to ports 3000 (HTTP), 5432 (PG), 6379 (Redis)
  3. Disk Encryption: LUKS or equivalent for data at rest
  4. Audit Logging: Enable PostgreSQL log_statement = ‘all’

Installation & Setup

Docker Deployment

1
2
3
4
5
6
7
8
9
10
11
# Create persistent volumes
docker volume create rybbit-pgdata
docker volume create rybbit-redis

# Clone the repository
git clone https://github.com/rybbit/rybbit.git --branch v2.0.0
cd rybbit

# Configure environment
cp .env.example .env
nano .env

Critical Environment Variables:

1
2
3
4
5
POSTGRES_USER=rybbitadmin
POSTGRES_PASSWORD=$(openssl rand -base64 32)
REDIS_PASSWORD=$(openssl rand -base64 32)
ENABLE_IP_COLLECTION=false # Enable only if legally required
MAP_TILE_CACHE=/data/tiles # Persistent storage path

Docker Compose Configuration

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
version: '3.8'

services:
  web:
    image: rybbit/rybbit:v2.0.0
    ports:
      - "3000:3000"
    environment:
      - DATABASE_URL=postgres://$POSTGRES_USER:$POSTGRES_PASSWORD@db:5432/rybbit
      - REDIS_URL=redis://:${REDIS_PASSWORD}@redis:6379
    volumes:
      - ./config:/app/config
      - rybbit-tiles:/data/tiles
    depends_on:
      - db
      - redis

  db:
    image: postgres:14.5-alpine
    volumes:
      - rybbit-pgdata:/var/lib/postgresql/data
    environment:
      POSTGRES_USER: $POSTGRES_USER
      POSTGRES_PASSWORD: $POSTGRES_PASSWORD

  redis:
    image: redis:6.2.6-alpine
    command: redis-server --requirepass $REDIS_PASSWORD
    volumes:
      - rybbit-redis:/data

Initialization and Verification

1
2
3
4
5
6
7
8
9
10
docker compose up -d

# Check container status
docker ps --format "table $CONTAINER_ID\t$CONTAINER_IMAGE\t$CONTAINER_STATUS\t$CONTAINER_PORTS"

# Inspect logs
docker logs $CONTAINER_ID --tail 100 --follow

# Verify database migration
docker exec -it rybbit-web-1 rake db:migrate:status

Configuration & Optimization

Map-Specific Settings

config/map.yml:

1
2
3
4
5
6
7
8
9
10
11
12
13
vector_tiles:
  enabled: true
  cache_ttl: 86400 # 24h caching
  max_points: 25000 # Render threshold

ip_geolocation:
  provider: local # MaxMind DB path
  # provider: ipapi # API-based
  cache_size: 10000 # LRU cache entries

privacy:
  anonymize_ip: true
  mask_octets: 2 # Show only 192.168.x.x

Performance Tuning

PostgreSQL Configuration (postgresql.conf):

1
2
3
4
shared_buffers = 2GB
work_mem = 32MB
maintenance_work_mem = 1GB
max_parallel_workers_per_gather = 4

Redis Optimization:

1
2
3
# Configure max memory policy
docker exec -it rybbit-redis-1 redis-cli CONFIG SET maxmemory 1GB
docker exec -it rybbit-redis-1 redis-cli CONFIG SET maxmemory-policy allkeys-lru

Security Hardening

  1. IP Collection Safeguards:
1
2
3
4
5
# Runtime disable (if enabled)
docker exec -it rybbit-web-1 rails runner "Setting.ip_collection_enabled = false"

# Automatic purge (cron job)
0 3 * * * docker exec rybbit-web-1 rake data:purge:ips
  1. Network Isolation:
1
2
3
4
5
6
7
8
# Create Docker network
docker network create --internal rybbit-internal

# Update compose.yaml
networks:
  default:
    name: rybbit-internal
    internal: true

Usage & Operations

Map Feature Utilization

Accessing Timeline Replay:

  1. Navigate to Geo > Timeline
  2. Set date range using ISO 8601 format (YYYY-MM-DD/YYYY-MM-DD)
  3. Adjust playback speed (1x to 60x)
  4. Export vector data as GeoJSON

Filtering Techniques:

1
2
3
4
5
6
7
8
9
10
11
12
# GraphQL Query Example
query {
  sessions(
    filters: {
      date: { gte: "2024-03-01", lte: "2024-03-31" }
      geo: { radius: { lat: 51.5074, lon: -0.1278, km: 50 } }
    }
  ) {
    duration
    path
  }
}

Maintenance Procedures

Backup Strategy:

1
2
3
4
5
6
# PostgreSQL dump
docker exec rybbit-db-1 pg_dump -U $POSTGRES_USER rybbit > rybbit-$(date +%F).sql

# Redis snapshot
docker exec rybbit-redis-1 redis-cli SAVE
cp /var/lib/docker/volumes/rybbit-redis/_data/dump.rdb ./redis-$(date +%F).rdb

Update Process:

1
2
3
4
5
# Graceful update
docker compose down
git pull origin v2.0.0
docker compose pull
docker compose up -d --force-recreate

Troubleshooting

Common Issues

Symptom: Maps fail to load
Diagnosis:

1
2
3
4
5
# Check vector tile generation
docker exec -it rybbit-web-1 tail -n 100 /app/log/tilegen.log

# Verify WebGL support
curl -H "Accept: application/json" http://localhost:3000/api/webgl-status

Symptom: IP collection not working
Resolution:

1
2
3
4
5
6
# Check environment variables
docker exec -it rybbit-web-1 printenv ENABLE_IP_COLLECTION

# Validate database schema
docker exec -it rybbit-web-1 rails dbconsole -p
\d+ sessions # Should contain 'ip_prefix cidr'

Performance Diagnosis

1
2
3
4
5
6
7
8
# PostgreSQL slow queries
docker exec -it rybbit-db-1 pg_stat_activity -x

# Redis cache hit rate
docker exec -it rybbit-redis-1 redis-cli info stats | grep keyspace_hits

# Memory profiling
docker exec -it rybbit-web-1 bundle exec rbtrace -p 3000 -m 'MapController#show'

Conclusion

Rybbit V200 represents a paradigm shift in self-hosted analytics by combining:

  1. Privacy-preserving architecture through GDPR-compliant defaults
  2. Advanced geospatial capabilities with vector-based visualization
  3. DevOps-friendly deployment via containerized components

The new map features aren’t just cosmetic - they enable infrastructure teams to:

  • Identify DDoS patterns through spatial-temporal analysis
  • Optimize CDN configurations based on user geography
  • Validate GDPR anonymization effectiveness

For those looking to dive deeper:

  1. Rybbit Official Documentation
  2. MaxMind GeoLite2 Database Setup
  3. GDPR Technical Compliance Guide

In an era where data sovereignty matters as much as insights, Rybbit V200 provides the technical foundation for ethical analytics - all while delivering stunning visualizations that rival commercial offerings. As infrastructure professionals, we now have no excuses for compromising on privacy or functionality.

This post is licensed under CC BY 4.0 by the author.