Skip to content

Configuration

Trackarr is configured primarily through environment variables. This page covers all available options.

Environment Variables

Core Settings

VariableDescriptionDefault
NUXT_PUBLIC_SITE_NAMEYour tracker's display nameTrackarr
NUXT_PUBLIC_SITE_URLPublic URL of your tracker
NUXT_SESSION_PASSWORDSession encryption key (32+ chars)

Database

VariableDescriptionDefault
DATABASE_URLPostgreSQL connection string
POSTGRES_USERDatabase usernametracker
POSTGRES_PASSWORDDatabase password
POSTGRES_DBDatabase nametrackarr

Redis

VariableDescriptionDefault
REDIS_URLRedis connection stringredis://localhost:6379
REDIS_PASSWORDRedis password

Tracker

VariableDescriptionDefault
TRACKER_SECRETSecret for generating passkeys
IP_HASH_SECRETSecret for hashing peer IPs
TRACKER_HTTP_URLHTTP announce URL (shown in .torrent files)http://localhost:8080/announce
TRACKER_UDP_URLUDP announce URLudp://localhost:8081/announce
TRACKER_WS_URLWebSocket URLws://localhost:8082
TRACKER_DEBUGEnable verbose tracker loggingfalse

Configuring Tracker URLs

These URLs are embedded in .torrent files and displayed in the admin dashboard. Configure them with your actual domain:

bash
# In your .env file
TRACKER_HTTP_URL=https://tracker.your-domain.com/announce
TRACKER_UDP_URL=udp://tracker.your-domain.com:8081/announce
TRACKER_WS_URL=wss://tracker.your-domain.com/ws

Replace your-domain.com with your actual tracker domain.

Security

VariableDescriptionDefault
POW_DIFFICULTYProof of Work difficulty (1-10)5
RATE_LIMIT_WINDOWRate limit window in seconds60
RATE_LIMIT_MAXMax requests per window100

Docker Compose Configuration

Production (docker-compose.prod.yml)

The production compose file includes:

  • app — Main Trackarr application
  • db — PostgreSQL 16 database
  • redis — Redis 7 cache
  • caddy — Reverse proxy with automatic HTTPS
  • prometheus — Metrics collection
  • grafana — Dashboards and monitoring

Development (docker-compose.yml)

A simplified setup for local development:

yaml
services:
  app:
    build: .
    ports:
      - '3000:3000'
    environment:
      - DATABASE_URL=postgresql://tracker:tracker@db:5432/trackarr
      - REDIS_URL=redis://redis:6379
    depends_on:
      - db
      - redis

  db:
    image: postgres:16-alpine
    environment:
      - POSTGRES_USER=tracker
      - POSTGRES_PASSWORD=tracker
      - POSTGRES_DB=trackarr
    volumes:
      - postgres_data:/var/lib/postgresql/data

  redis:
    image: redis:7-alpine
    volumes:
      - redis_data:/data

Caddy Configuration

The production setup uses Caddy for automatic HTTPS. Configuration is in docker/Caddyfile:

{$DOMAIN} {
    reverse_proxy app:3000
}

announce.{$DOMAIN} {
    reverse_proxy app:3000
}

monitoring.{$DOMAIN} {
    handle_path /grafana* {
        reverse_proxy grafana:3000
    }
    handle_path /prometheus* {
        reverse_proxy prometheus:9090
    }
}

Security Recommendations

Production Checklist

Always use the install.sh script for production deployments. It handles:

  • Generating cryptographically secure secrets
  • Configuring TLS for all connections
  • Setting up firewall rules
  • Network isolation for databases

For manual deployments, ensure:

  1. All secrets are at least 32 characters
  2. Database ports are not exposed publicly
  3. Redis is password-protected
  4. HTTPS is enforced on all endpoints

Released under the MIT License.