48 lines
2.7 KiB
Plaintext
48 lines
2.7 KiB
Plaintext
# ═══════════════════════════════════════════════════════════════
|
||
# SSH Console — 环境变量模板
|
||
# 复制此文件为 .env.local 用于本地开发,或在 Vercel 控制台逐项填入
|
||
# Vercel: Settings → Environment Variables → 按 Production / Preview 分别配置
|
||
# ═══════════════════════════════════════════════════════════════
|
||
|
||
# ── GitHub OAuth ─────────────────────────────────────────────
|
||
# 创建地址: https://github.com/settings/developers → New OAuth App
|
||
# Homepage URL: https://your-domain.vercel.app
|
||
# Callback URL: https://your-domain.vercel.app/api/auth/callback/github
|
||
# 预览环境额外回调: https://<project>-git-<branch>-<team>.vercel.app/api/auth/callback/github
|
||
GITHUB_CLIENT_ID=
|
||
GITHUB_CLIENT_SECRET=
|
||
|
||
# ── NextAuth ─────────────────────────────────────────────────
|
||
# 必填!生产环境缺少此项会导致 NO_SECRET 错误和登录失败。
|
||
# 生成命令: openssl rand -base64 32
|
||
NEXTAUTH_SECRET=
|
||
|
||
# 本地开发或自托管时需要填写;Vercel 部署通常不需要(会自动检测)
|
||
# NEXTAUTH_URL=https://your-domain.vercel.app
|
||
|
||
# ── Upstash Redis ─────────────────────────────────────────────
|
||
# 存储每个用户的 Cloudflare 凭证(多用户模式)
|
||
# 免费数据库: https://console.upstash.com
|
||
UPSTASH_REDIS_URL=
|
||
UPSTASH_REDIS_TOKEN=
|
||
|
||
# ── Cloudflare API(可选 — 也可以在 /settings 页面按用户配置)─
|
||
# 如果在此处填写,所有用户共享同一套凭证(单用户模式)
|
||
# Token 所需权限:
|
||
# Account → Cloudflare Tunnel: Edit
|
||
# Account → Access: Apps and Policies: Edit
|
||
# Zone → DNS: Edit
|
||
# Zone → Zone: Read
|
||
CLOUDFLARE_ACCOUNT_ID=
|
||
CLOUDFLARE_API_TOKEN=
|
||
|
||
# ── Cloudflare Access 服务令牌(可选)────────────────────────
|
||
# 用于通过 Access 保护的隧道拉取服务器指标
|
||
# 创建位置: Zero Trust → Access → Service Auth → Service Tokens
|
||
CF_SERVICE_CLIENT_ID=
|
||
CF_SERVICE_CLIENT_SECRET=
|
||
|
||
# ── 允许登录的邮箱白名单(可选)──────────────────────────────
|
||
# 逗号分隔;留空表示所有通过 GitHub 认证的用户均可登录
|
||
# ALLOWED_EMAILS=alice@example.com,bob@example.com
|