Quick Start
This guide gets you from zero to a running BigBrotr instance using Docker Compose. You will have all six services, PostgreSQL with PgBouncer, and Prometheus monitoring operational within minutes.
Prerequisites
Section titled “Prerequisites”- Docker Engine 24+ and Docker Compose v2
- 4 GB RAM minimum (8 GB recommended)
- 20 GB disk space for initial data collection
1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/BigBrotr/bigbrotr.gitcd bigbrotr/deployments/bigbrotr2. Configure Environment
Section titled “2. Configure Environment”Copy the example environment file and review the defaults:
cp .env.example .envThe key environment variables:
| Variable | Default | Description |
|---|---|---|
POSTGRES_USER | admin | PostgreSQL superuser |
POSTGRES_PASSWORD | — | Set a strong password |
POSTGRES_DB | bigbrotr | Database name |
WRITER_USER | writer | Writer services (all six services) |
READER_USER | reader | Read-only services (API, DVM, monitoring) |
3. Start the Stack
Section titled “3. Start the Stack”docker compose up -dThis starts:
- PostgreSQL — database with schema initialization
- PgBouncer — connection pooling in transaction mode
- Prometheus — metrics collection and alerting
4. Run Services
Section titled “4. Run Services”Services run individually. Start with the one-shot Seeder to bootstrap the relay list:
# Bootstrap relay discovery (one-shot, exits when done)python -m bigbrotr seeder --once
# Start continuous relay discoverypython -m bigbrotr finder
# Validate discovered relay candidatespython -m bigbrotr validator
# Health monitoring with NIP-11 and NIP-66python -m bigbrotr monitor
# Materialized view refreshpython -m bigbrotr refresher
# Event collectionpython -m bigbrotr synchronizer5. Verify
Section titled “5. Verify”Check that services are writing data:
# Connect to the databasedocker compose exec postgres psql -U admin -d bigbrotr
# Count discovered relaysSELECT count(*) FROM relay;
# Check service statesSELECT service_name, state_type, state_key, state_value, updated_atFROM service_state ORDER BY updated_at DESC;
# View materialized view statsSELECT * FROM relay_stats LIMIT 5;6. Monitor
Section titled “6. Monitor”Prometheus is available at http://localhost:9090. Each service can expose Prometheus metrics when enabled in its configuration:
# In any service configmetrics: enabled: true port: 8000 # default port host: 127.0.0.1 path: /metricsMetrics are disabled by default. When enabled, each service exposes a /metrics endpoint on the configured port (default 8000). Assign different ports if running multiple services on the same host.
Next Steps
Section titled “Next Steps”- Architecture Overview — understand how the system is designed.
- Configuration Guide — customize timeouts, batch sizes, and network settings.
- Deployments — learn about BigBrotr vs LilBrotr configurations.