.env.example (2268B)
1 # Copy to .env and fill in. Never commit .env (it is git-ignored). 2 # Load it with: set -a; . ./.env; set +a (or `docker run --env-file .env ...`) 3 4 # --- Storage (required) ----------------------------------------------------- 5 # Hugging Face Storage Bucket that holds every file, as "owner/name". 6 HF_BUCKET_ID=your-username/your-cdn-bucket 7 # Hugging Face access token with WRITE permission to that bucket. 8 HF_TOKEN= 9 # Set to 1 to create the bucket as private if it doesn't exist yet. 10 HF_BUCKET_PRIVATE=0 11 12 # --- Public URLs ------------------------------------------------------------ 13 # Where the web UI is served, and the host that serves raw files. 14 CDN_BASE_URL=http://localhost:8000 15 RAW_DOMAIN=raw.localhost 16 RAW_BASE_URL=http://raw.localhost:8000 17 18 # --- GitHub Actions sync (/api/gh-sync) ------------------------------------- 19 # Must equal the audience your workflows pass to core.getIDToken(...). 20 # Use your own CDN hostname when self-hosting. 21 OIDC_AUDIENCE=cdn.example.com 22 # Comma-separated GitHub owners that may sync without manual approval. 23 GH_ALWAYS_ALLOW=your-github-username 24 25 # --- Admin dashboard (/admin) ----------------------------------------------- 26 # Leave ADMIN_TOKEN unset to switch the dashboard, IP bans and the GitHub 27 # allowlist off entirely. 28 ADMIN_TOKEN= 29 # Encrypts the saved admin state in the bucket. Set it separately so rotating 30 # ADMIN_TOKEN doesn't lock you out of that state. Falls back to ADMIN_TOKEN. 31 ADMIN_DATA_KEY= 32 33 # --- Upload guard ----------------------------------------------------------- 34 # Refuse uploads from VPN/proxy IPs (1 = on). 35 VPN_BLOCK=1 36 # Allow the upload anyway if the VPN lookup itself fails (1 = allow). 37 VPN_FAIL_OPEN=1 38 # Optional proxycheck.io key for the VPN lookup. 39 PROXYCHECK_KEY= 40 # Comma-separated IPs that are never VPN-blocked. 41 VPN_ALLOWLIST= 42 43 # --- Client IP detection (rate limits and bans depend on this) -------------- 44 # Behind Cloudflare, set to 1 to trust the CF-Connecting-IP header. 45 TRUST_CF_CONNECTING_IP=0 46 # Number of trusted reverse proxies in front of the app (X-Forwarded-For hops). 47 TRUSTED_PROXY_HOPS=1 48 49 # --- Instant folder navigation ---------------------------------------------- 50 # Above this many files /api/tree is not shipped and the feature turns itself off. 51 FAST_TREE_MAX_FILES=20000