-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
143 lines (123 loc) · 6.89 KB
/
Copy path.env.example
File metadata and controls
143 lines (123 loc) · 6.89 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
# VideoSphere Environment Variables
# Copy this file to .env.local and fill in your values.
# See docs/local-setup.md (https://videosphere.sarahpoulin.ca/local-setup) for details on obtaining each value.
#
# Variables prefixed with NEXT_PUBLIC_ are exposed to the browser.
# All other variables are server-side only.
# -----------------------------------------------------------------------------
# Application
# -----------------------------------------------------------------------------
NEXT_PUBLIC_APP_URL=http://localhost:9624
NEXT_PUBLIC_APP_NAME=VideoSphere
# For portainer-stack.yml: VIDEOSPHERE_IMAGE=ghcr.io/your-github-org/videosphere:latest
# -----------------------------------------------------------------------------
# MongoDB
# -----------------------------------------------------------------------------
# Example local URI:
# mongodb://admin:password@localhost:27017/videosphere?authSource=admin
# Required for docker-compose Mongo startup (`MONGO_INITDB_ROOT_PASSWORD`).
# Compose interpolation does not read .env.local automatically.
# Use `docker compose --env-file .env.local up` (or export this var / put it in project `.env`).
MONGO_ROOT_PASSWORD=change_me
MONGODB_URI=mongodb://admin:change_me@localhost:27017/videosphere?authSource=admin
# -----------------------------------------------------------------------------
# JWT Session Auth
# -----------------------------------------------------------------------------
# Generate with:
# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
JWT_SECRET=replace_with_strong_secret
JWT_SESSION_COOKIE_NAME=videosphere_session
# Session JWT + cookie Max-Age in seconds. Default in code is 10 years for the
# JWT; browsers may still drop the cookie earlier (e.g. Chromium ~400 days).
# Set a shorter value if you want periodic re-login.
# JWT_SESSION_MAX_AGE_SECONDS=315360000
# Optional: force Secure cookies (true/false). Usually omitted — derived from
# NEXT_PUBLIC_APP_URL (https → Secure; http → not Secure for homelab LAN).
# JWT_SESSION_COOKIE_SECURE=false
# TOTP "remember this device" trust cookie (httpOnly, signed JWT).
TOTP_TRUST_COOKIE_NAME=videosphere_totp_trust
# -----------------------------------------------------------------------------
# OAuth Token Encryption (at-rest encryption for connected account tokens)
# -----------------------------------------------------------------------------
# Base64-encoded 32-byte key.
# Generate with:
# node -e "console.log(require('crypto').randomBytes(32).toString('base64'))"
TOKEN_ENCRYPTION_KEY=replace_with_base64_32_byte_key
# -----------------------------------------------------------------------------
# Google OAuth (Authentication)
# -----------------------------------------------------------------------------
# Configure callback URL(s):
# http://localhost:9624/api/auth/oauth/callback
# https://your-domain.com/api/auth/oauth/callback
GOOGLE_CLIENT_ID=your_google_client_id_here
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
# -----------------------------------------------------------------------------
# Cloudflare R2 (video upload staging storage)
# -----------------------------------------------------------------------------
R2_ACCOUNT_ID=your_account_id_here
R2_ACCESS_KEY_ID=your_r2_access_key_here
R2_SECRET_ACCESS_KEY=your_r2_secret_key_here
R2_BUCKET_NAME=videosphere-uploads
# Optional public URL for CDN/custom domain
# NEXT_PUBLIC_R2_PUBLIC_URL=https://videos.yourdomain.com
# Optional: restrict allowed browser origin for R2 CORS behavior in your app logic
# R2_ALLOWED_ORIGIN=https://your-domain.com
# -----------------------------------------------------------------------------
# YouTube import (download + trim from connected YouTube account)
# -----------------------------------------------------------------------------
# Scratch directory for in-progress downloads and trims (default: /tmp/yt-import)
# YT_IMPORT_WORKDIR=/tmp/yt-import
# Hard cap on source video length in seconds (default: 14400 / 4h)
# YT_IMPORT_MAX_DURATION_SECONDS=14400
# -----------------------------------------------------------------------------
# OpenRouter (AI metadata generation)
# -----------------------------------------------------------------------------
# OPENROUTER_API_KEY=sk-or-v1-your_key_here
# OPENROUTER_MODEL=qwen/qwen3.6-plus:free
# OPENROUTER_FETCH_TIMEOUT_MS=30000
# Per-platform upload deadline in ms (default 3h; use a generous value on self-hosted deployments with limited upload bandwidth)
# PLATFORM_UPLOAD_TIMEOUT_MS=10800000
# Staleness threshold in ms for startup reconciliation of interrupted upload/distribution rows (default 30m)
# UPLOAD_STALE_RECONCILE_MS=1800000
# Staleness threshold in ms for SermonAudio unpublished auto-publish rows lost on restart (default 90m)
# UPLOAD_SERMONAUDIO_UNPUBLISHED_STALE_RECONCILE_MS=5400000
# -----------------------------------------------------------------------------
# Platform OAuth (distribution targets)
# -----------------------------------------------------------------------------
# Callback URLs use NEXT_PUBLIC_APP_URL (same as Google login OAuth), e.g.:
# https://your-domain.com/api/platforms/callback/youtube
# YouTube callback:
# http://localhost:9624/api/platforms/callback/youtube
YOUTUBE_CLIENT_ID=your_youtube_client_id_here
YOUTUBE_CLIENT_SECRET=your_youtube_client_secret_here
# Vimeo callback:
# http://localhost:9624/api/platforms/callback/vimeo
VIMEO_CLIENT_ID=your_vimeo_client_id_here
VIMEO_CLIENT_SECRET=your_vimeo_client_secret_here
# SermonAudio (API key - no OAuth required)
# SERMONAUDIO_API_KEY is stored per-user in the database, not here
# Facebook callback:
# http://localhost:9624/api/platforms/callback/facebook
FACEBOOK_APP_ID=
FACEBOOK_APP_SECRET=
# Google Drive callback:
# http://localhost:9624/api/platforms/callback/drive
GOOGLE_DRIVE_CLIENT_ID=your_google_drive_client_id_here
GOOGLE_DRIVE_CLIENT_SECRET=your_google_drive_client_secret_here
# SFTP (no OAuth — credentials are entered per user in Connected Accounts)
# POST /api/platforms/connect/sftp
# -----------------------------------------------------------------------------
# YouTube import (yt-dlp / ffprobe)
# -----------------------------------------------------------------------------
# Max wait for yt-dlp metadata and ffprobe keyframe probes (milliseconds). Default: 60000.
# YOUTUBE_IMPORT_PROCESS_TIMEOUT_MS=60000
# Remote extractor scripts for pip yt-dlp without bundled yt-dlp-ejs. Docker sets none (bundled).
# YT_DLP_REMOTE_COMPONENTS=ejs:github
# Override JS runtimes (comma-separated), e.g. deno:/usr/local/bin/deno,node:/usr/bin/node
# YT_DLP_JS_RUNTIMES=deno:/usr/local/bin/deno,node:/usr/local/bin/node
# YouTube player clients for import/metadata extraction (PO-token-friendly defaults).
# YT_DLP_PLAYER_CLIENTS=android_vr,tv,web_safari
# -----------------------------------------------------------------------------
# Optional dev tools
# -----------------------------------------------------------------------------
# FIGMA_API_TOKEN=your-key-here