-
Notifications
You must be signed in to change notification settings - Fork 10
Expand file tree
/
Copy path.env.example
More file actions
143 lines (123 loc) · 5.75 KB
/
.env.example
File metadata and controls
143 lines (123 loc) · 5.75 KB
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
# Supabase Configuration (Server-side only)
SUPABASE_URL=https://your-project.supabase.co
# Secret key from Supabase Dashboard > Settings > API > Secret key (sb_secret_...)
# This is the server-side key - NEVER expose to client
SUPABASE_SERVICE_ROLE_KEY=sb_secret_your-secret-key
# Publishable key from Supabase Dashboard > Settings > API > Publishable key (sb_publishable_...)
SUPABASE_ANON_KEY=sb_publishable_your-publishable-key
SUPABASE_DB_PASSWORD=your-db-password
# Public Supabase keys (safe for client)
NEXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
# Same as SUPABASE_ANON_KEY - publishable key is safe for client
NEXT_PUBLIC_SUPABASE_ANON_KEY=sb_publishable_your-publishable-key
# Application Configuration
NEXT_PUBLIC_APP_URL=https://bittorrented.com
NEXT_PUBLIC_APP_NAME=BitTorrented
# Torrent Configuration
# Timeout for fetching torrent metadata in milliseconds (default: 60000 = 60 seconds)
# Increase this if torrents with few seeders are timing out
TORRENT_METADATA_TIMEOUT_MS=60000
MAX_CONCURRENT_STREAMS=100
# Rate Limiting
RATE_LIMIT_ENABLED=true
RATE_LIMIT_MAGNET_PER_MINUTE=10
RATE_LIMIT_SEARCH_PER_MINUTE=60
RATE_LIMIT_STREAM_CONCURRENT=5
# FFmpeg Transcoding (Optional)
# Set to true to enable server-side transcoding for unsupported formats
FFMPEG_ENABLED=false
FFMPEG_PATH=/usr/bin/ffmpeg
# Metadata APIs
# OMDb API key for movies and TV shows (get free key at https://www.omdbapi.com/apikey.aspx)
OMDB_API_KEY=your-omdb-api-key
# TheTVDB API key for trending TV shows and movies (get free key at https://thetvdb.com/api-information)
THETVDB_API_KEY=your-thetvdb-api-key
# Fanart.tv API key for high-quality posters and artist images (get free key at https://fanart.tv/get-an-api-key/)
FANART_TV_API_KEY=your-fanart-api-key
# TMDB API key for movie/TV metadata in DHT crawler (get free key at https://www.themoviedb.org/settings/api)
TMDB_API_KEY=your-tmdb-api-key
MUSICBRAINZ_USER_AGENT=BitTorrented/1.0.0 (https://bittorrented.com)
# CoinPayPortal (Crypto Payments)
# Get these from your CoinPayPortal dashboard: https://coinpayportal.com/dashboard
COINPAYPORTAL_API_KEY=cp_live_your_api_key
NEXT_PUBLIC_COINPAYPORTAL_MERCHANT_ID=your-merchant-uuid
COINPAYPORTAL_WEBHOOK_SECRET=your-webhook-secret
# Optional: Override API URL for testing
# COINPAYPORTAL_API_URL=https://coinpayportal.com/api
# Subscription Plans (in cents)
PREMIUM_PLAN_PRICE_CENTS=499
FAMILY_PLAN_PRICE_CENTS=999
FAMILY_ADDITIONAL_SEAT_PRICE_CENTS=200
# Resend Email Configuration
# Get your API key from: https://resend.com/api-keys
RESEND_API_KEY=re_your_resend_api_key
# Email sender address (must be verified in Resend)
EMAIL_FROM=noreply@yourdomain.com
# Display name for email sender
EMAIL_FROM_NAME=BitTorrented
# Supabase Management API (for email template updates)
# Get project ref from your Supabase URL: https://supabase.com/dashboard/project/<PROJECT_REF>
SUPABASE_PROJECT_REF=your-project-ref
# Generate access token at: https://supabase.com/dashboard/account/tokens
SUPABASE_ACCESS_TOKEN=your-supabase-access-token
# Server Setup (used by scripts/setup-server.sh)
# System user for the service (default: ubuntu)
# Common values: ubuntu (DigitalOcean, AWS), admin (Linode), root (some providers)
VPS_USER=ubuntu
# Email for Let's Encrypt SSL certificate notifications
CERTBOT_EMAIL=admin@bittorrented.com
# SSH port for firewall configuration (default: 22)
# Change this if you've configured a non-standard SSH port for security
SSH_PORT=22
# Set to 1 to force SSL setup even if DNS check fails
# FORCE_SSL=1
# Redis Configuration (for IPTV playlist caching)
# Required for Live TV feature - caches M3U playlists for 5 minutes
# Local development: docker run -d -p 6379:6379 redis:alpine
REDIS_URL=redis://localhost:6379
# ArgonTV IPTV Reseller API
# Get these from your ArgonTV distributor dashboard: https://distributors.argontv.nl
IPTV_ARGON_API_KEY=your-argontv-api-key
IPTV_ARGON_API_BASE_URL=https://distributors.argontv.nl
# Template ID for "everything" package (get from ArgonTV dashboard)
IPTV_ARGON_TEMPLATE_ID=12345
# Web Push Notifications (VAPID Keys)
# Required for podcast new episode notifications
# Generate keys with: pnpm tsx scripts/generate-vapid-keys.ts
# VAPID keys identify your server to push services (Google FCM, Mozilla, Apple)
VAPID_PUBLIC_KEY=your-vapid-public-key
VAPID_PRIVATE_KEY=your-vapid-private-key
VAPID_SUBJECT=mailto:admin@bittorrented.com
# TURN/STUN Server Configuration (Coturn)
# Required for WebTorrent P2P streaming through firewalls/NAT
# The TURN server relays traffic when direct P2P connections fail
# Generate a secure secret: openssl rand -hex 32
TURN_SECRET=change-this-secret-in-production
# Your server's public domain for TURN
TURN_REALM=bittorrented.com
# Your server's public IP address (required for TURN to work)
# Get this from your VPS provider or run: curl -s ifconfig.me
TURN_EXTERNAL_IP=
# Public URL for clients to connect to TURN server
# This should match your server's domain or IP
NEXT_PUBLIC_TURN_SERVER_URL=turn:bittorrented.com:3478
# Credential TTL in seconds (default: 24 hours)
TURN_CREDENTIAL_TTL=86400
# Server Port (set automatically in production)
# PORT=3000
THENEWSAPI_API_KEY=your-thenewsapi-api-key
OPENAI_API_KEY=your-openai-api-key
# TuneIn Radio API
# Auth token for premium stream access (sports, news, etc.)
# Get token from: https://opml.radiotime.com/account/transfer/token?serial=abc123&partnerId=Sonos
TUNEIN_TOKEN=your-tunein-token
# DHT Crawler (Bitmagnet + DHT Search API)
# Uses existing SUPABASE_URL, SUPABASE_SERVICE_ROLE_KEY, SUPABASE_DB_PASSWORD
# Set to false to skip DHT services installation during setup
DHT_ENABLED=true
DHT_CRAWLER_SCALING_FACTOR=10
DHT_QUEUE_CONCURRENCY=10
DHT_API_PORT=8081
# Salt for hashing API keys (generate with: openssl rand -hex 16)
DHT_API_KEY_SALT=your-random-32-char-string
ELEVENLABS_API_KEY=your-elevenlabs-api-key