# ---- PeakCut settings. Copy this file to .env and fill it in. Never commit .env. ---- # # On your own computer you need nothing here: start PeakCut, open it, and add your AI key under Settings, AI. # This file is for servers, and for anyone who prefers to keep settings in a file. # ================================================================ AI: bring your own key # The easy way is the dashboard: Settings, AI. Whatever is saved there is used instead of these lines. # PeakCut uses an AI model to pick the moments worth clipping and to write hooks, titles and captions. # You choose the service and pay that service directly; PeakCut adds nothing on top. # Without a key PeakCut still works: clips are then picked by loudness only, with no titles. # # provider where to get a key example model ids (check the provider's current list) # gemini https://aistudio.google.com/apikey gemini-2.5-flash # openai https://platform.openai.com/api-keys gpt-4o-mini # xai https://console.x.ai grok-4 (Grok) # groq https://console.groq.com/keys llama-3.3-70b-versatile # openrouter https://openrouter.ai/keys any model id listed there # anthropic https://console.anthropic.com a current Claude model id # ollama no key: a model running on this machine llama3.1 (ollama pull llama3.1) # custom any service that speaks the OpenAI chat format: also set PEAKCUT_AI_BASE_URL PEAKCUT_AI_PROVIDER=gemini PEAKCUT_AI_MODELS= PEAKCUT_AI_KEY= # PEAKCUT_AI_KEY_FILE=/secrets/ai.txt # instead of PEAKCUT_AI_KEY: a file that holds the key # PEAKCUT_AI_BASE_URL= # only for "custom", e.g. http://127.0.0.1:1234/v1 # PEAKCUT_AI_MODELS takes several ids separated by commas. They are tried in order, so the second is a fallback. # ================================================================ on a server (Docker): see DEPLOY.md # Your domain (DNS must already point at this server) and a database password you make up. # PEAKCUT_DOMAIN=peakcut.example.com # POSTGRES_PASSWORD=change-me-to-a-long-random-string # A server PeakCut has to itself: keep this line, and PeakCut fetches its own HTTPS certificate. # A server that already runs a web server for other sites: leave it out and see deploy/nginx-peakcut.conf. # COMPOSE_PROFILES=own-https # Behind Cloudflare's CDN: put the Cloudflare origin certificate in ./secrets as cloudflare-origin.crt and # cloudflare-origin.key, and use the Caddyfile that serves it. # PEAKCUT_CADDYFILE=Caddyfile.origin # PEAKCUT_BIND_PORT=8765 # the port PeakCut listens on inside the server, if 8765 is taken # Behind a Traefik that is already on the server, use this instead of the own-https line: # COMPOSE_FILE=docker-compose.yml:deploy/docker-compose.traefik.yml # If the domain goes through Cloudflare's CDN (orange cloud), the visitor's real address comes in this header. # It is only believed for connections that really come from Cloudflare. # PEAKCUT_CLIENT_IP_HEADER=CF-Connecting-IP # On a server shared with other apps: keep PeakCut inside its own share. # PEAKCUT_MEM_LIMIT=2g # most memory it may use (it is stopped, not the other apps, if it goes over) # PEAKCUT_CPUS=1.5 # most processor cores it may use # PEAKCUT_CPU_SHARES=256 # its turn at the processor when the server is busy (1024 is normal) # PEAKCUT_OOM_SCORE_ADJ=900 # if the whole server runs out of memory, PeakCut is stopped first # PEAKCUT_DB_MEM_LIMIT=256m # ================================================================ where things are kept (own computer) # PEAKCUT_DATA=./data # videos, clips, the database file and the speech model # PEAKCUT_PORT=8765 # PEAKCUT_PUBLIC_URL=http://127.0.0.1:8765 # the address people open; set it to https://your-domain on a server # DATABASE_URL= # empty: a SQLite file in the data folder. Or postgresql+psycopg://user:pass@host/db # ================================================================ sign-in # Off by default: PeakCut opens straight into the dashboard, which is right for your own computer. # On a server other people can reach, turn accounts on, or anyone who finds the address can use it and your AI key. # (docker-compose.yml turns them on by itself.) # PEAKCUT_ACCOUNTS=1 # ================================================================ admins (only with accounts on) # Admins are not set here. Every new account is a normal user. After you sign up, make yourself an admin: # python -m studio.admin grant you@example.com (also: revoke, list) # docker compose exec app python -m studio.admin grant you@example.com (with Docker) # The admin dashboard is then at /admin, and does not exist for anyone else. # ================================================================ Google (optional) # One "Web application" OAuth client, used for Sign in with Google and for connecting YouTube to post Shorts. # Authorised redirect URIs: https://YOUR-DOMAIN/auth/google/callback and https://YOUR-DOMAIN/oauth/youtube/callback # GOOGLE_CLIENT_ID= # GOOGLE_CLIENT_SECRET= # GOOGLE_CLIENT_FILE=/secrets/google_client.json # Instagram and TikTok: the apps people's accounts connect through (Connect buttons in Settings, Connected apps). # These can also be pasted in the dashboard by an admin: Settings, Connected apps, Set up. Redirect addresses to # register: https://YOUR-DOMAIN/oauth/instagram/callback and https://YOUR-DOMAIN/oauth/tiktok/callback # PEAKCUT_IG_APP_ID= # PEAKCUT_IG_APP_SECRET= # PEAKCUT_TIKTOK_CLIENT_KEY= # PEAKCUT_TIKTOK_CLIENT_SECRET= # ================================================================ email (optional) # Any SMTP service. Without it, password-reset and confirmation links are printed in the server's output instead, # which is enough on your own computer. # PEAKCUT_SMTP_HOST= # PEAKCUT_SMTP_PORT=587 # PEAKCUT_SMTP_USER= # PEAKCUT_SMTP_PASSWORD= # PEAKCUT_SMTP_PASSWORD_FILE=/secrets/smtp.txt # PEAKCUT_MAIL_FROM=PeakCut # PEAKCUT_VERIFY_EMAIL=1 # on a public site: people must confirm their email before clipping # Shown on the privacy, terms and acceptable-use pages of a public site. # PEAKCUT_CONTACT_EMAIL= # PEAKCUT_LEGAL_NAME= # PEAKCUT_LEGAL_COUNTRY= # ================================================================ limits (all optional) # How many videos run at once is decided by how busy the machine really is, every second. These only set the edges: # PEAKCUT_JOB_WORKERS=8 # the most videos that may ever run at once (default: one per CPU core) # PEAKCUT_BUSY_CPU=82 # no extra video or recording starts while the processor is above this percent # PEAKCUT_MIN_FREE_RAM_GB=1.5 # ...or while less memory than this is free # There are no limits unless you set one here: 0 (the default) means none. A server other people use may want some. # PEAKCUT_MAX_LIVE=8 # live recordings at once, whole server (default: twice the CPU cores; load decides below it) # PEAKCUT_MAX_LIVE_PER_USER=0 # streams one person records at once # PEAKCUT_MAX_JOBS_PER_USER=5 # videos one person sends and has worked on at once # PEAKCUT_MAX_UPLOAD_MB=0 # the largest video file someone may upload # PEAKCUT_UPLOAD_PART_MB=40 # big files are sent in pieces of this size (Cloudflare refuses requests over 100 MB) # PEAKCUT_MAX_VIDEO_HOURS=0 # longest video, or chosen part of one, that is processed # PEAKCUT_MAX_LIVE_HOURS=0 # a live recording stops by itself after this long # PEAKCUT_MAX_USER_GB=0 # disk space one account may use # PEAKCUT_MAX_CREATORS=0 # creators one account may add # PEAKCUT_FFMPEG_DIR= # the folder that holds ffmpeg, if PeakCut cannot find it by itself # PEAKCUT_CLIP_MINUTES=15 # a clip that takes longer than this to make is stopped, so it cannot hold the video up # PEAKCUT_ALLOWED_SITES=youtube.com,youtu.be,twitch.tv,kick.com # PEAKCUT_YT_TRANSCRIPT=1 # use YouTube's own transcript to find clips faster (0: always transcribe here) # ================================================================ speech models (optional) # English is downloaded by itself on first start (about 480 MB). Other spoken languages (Arabic so far, about # 107 MB) are downloaded only when someone adds them in Settings -> Speech models, or chooses that language # when adding a video. They live in the data folder, under models/. # PEAKCUT_FETCH_MODEL=1 # 0: don't download the English model when PeakCut starts (it is then fetched when first needed) # PEAKCUT_MODELS= # keep the speech models in another folder # PEAKCUT_ASR_MODEL=sherpa-onnx-nemo-parakeet-tdt-0.6b-v2-int8 # the English model # PEAKCUT_ASR_MODEL_AR=sherpa-onnx-nemo-fastconformer-ar-int8 # the Arabic model's folder name # PEAKCUT_ASR_MODEL_AR_URL= # where to download the Arabic model from, if not the usual place (a mirror of the same file) # PEAKCUT_ASR_MODEL_AR_SHA256= # the Arabic archive's SHA-256, checked before unpacking; set it only for a different model # PEAKCUT_ASR_IDLE_MINUTES=15 # a language other than English that nobody has used this long is unloaded from memory # PEAKCUT_UPDATE_CHECK=1 # look on GitHub once a minute for a newer PeakCut (0: never) # ================================================================ speech to text on a graphics card (optional) # Speech is transcribed on this machine's processor by default. A second machine with an NVIDIA card can take # over most of it: see deploy/gpu/docker-compose.yml, then set these on the main server. # PEAKCUT_ASR_URL=http://10.0.0.2:9000 # PEAKCUT_ASR_TOKEN=a-long-random-string-shared-by-both-machines # On the graphics-card machine: the spoken languages it has models for. Pieces in any other language are # transcribed on the main server instead, so the wrong language's model is never used. # PEAKCUT_ASR_LANGS=en,ar