-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
71 lines (60 loc) Β· 4.04 KB
/
Copy path.env.example
File metadata and controls
71 lines (60 loc) Β· 4.04 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
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# TrackFlow β environment configuration
# Copy this file to `.env` and fill in the values. Only BOT_TOKEN is required.
# βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# [REQUIRED] Telegram bot token from @BotFather.
BOT_TOKEN=123456:ABC-DEF...
# ββ Spotify API (optional) βββββββββββββββββββββββββββββββββββββββββββββββββββ
# Enables full Spotify link resolution and Liked Songs. Without these the bot
# runs in "embed mode" (public metadata + YouTube search; Liked Songs disabled).
# Create an app at https://developer.spotify.com/dashboard
SPOTIFY_CLIENT_ID=
SPOTIFY_CLIENT_SECRET=
# OAuth redirect URI. Leave blank to auto-derive:
# Railway β https://<domain>/callback Local β http://127.0.0.1:<PORT>/callback
# The value here must exactly match a Redirect URI in your Spotify app settings.
SPOTIFY_REDIRECT_URI=
# ββ Admin & security (optional) ββββββββββββββββββββββββββββββββββββββββββββββ
# Telegram user ID granted owner/admin access (enables /admin).
ADMIN_ID=0
# Fernet key used to encrypt stored user tokens. Derived from BOT_TOKEN if blank.
ENCRYPTION_KEY=
# ββ Storage (optional) βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# SQLite database path. Leave blank to auto-select:
# Railway β /data/bot.db (requires a mounted volume!) Local β data/bot.db
# On Railway, ALWAYS attach a volume at /data or every redeploy wipes user data.
DB_PATH=
# ββ Runtime (optional) βββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Port for the OAuth web server / health check.
PORT=8080
# Maximum number of concurrent downloads.
MAX_DOWNLOADS=4
# ββ YouTube egress IP (optional, but the only cookieless fix) ββββββββββββββββ
# YouTube rejects requests from datacenter IPs (Railway) with "Sign in to
# confirm you're not a bot". The block is on the IP's reputation, NOT on the
# absence of cookies: yt-dlp's own docs note a cookieless "guest session" is
# good for ~300 videos/hour β but only from a clean IP. Changing player_client
# does not help (yt-dlp #15865: android_vr also returns LOGIN_REQUIRED there).
#
# Fix = move the egress IP off the datacenter. Two ways:
#
# (a) FREE β Tailscale exit node on a home machine that stays powered on:
# 1. At home: tailscale up --advertise-exit-node
# then approve the exit node in the Tailscale admin console.
# 2. Set both vars below. Only YouTube bytes are relayed (~4MB/track);
# ffmpeg/DB/Telegram stay on Railway.
# Leave both blank to disable β the bot then uses Railway's IP directly.
TS_AUTHKEY=
TS_EXIT_NODE=
# Device name in the tailnet, and the local SOCKS5 port tailscaled listens on.
TS_HOSTNAME=trackflow-bot
TS_SOCKS_PORT=1055
#
# (b) PAID β a residential proxy (~$1/GB β 250 tracks/GB). Set YTDLP_PROXY
# and Tailscale is skipped. Example: socks5h://user:pass@host:port
YTDLP_PROXY=
# ββ Recommendations (optional) βββββββββββββββββββββββββββββββββββββββββββββββ
# Last.fm API key: https://www.last.fm/api/account/create
# The "similar songs" engine works fully without it (ListenBrainz + Deezer +
# local audio analysis); a key adds tag and getSimilar signals.
LASTFM_API_KEY=