55e14805de
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
45 lines
1.3 KiB
Bash
45 lines
1.3 KiB
Bash
# MultiSync Central Server Environment Configuration
|
|
# Copy this file to .env and modify
|
|
|
|
# Server binding
|
|
MULTISYNC_HOST=0.0.0.0
|
|
MULTISYNC_PORT=8600
|
|
MULTISYNC_DEBUG=false
|
|
|
|
# Sync mode: ssh_direct | agent | hybrid
|
|
# ssh_direct = 无需子服务器部署Agent,中央SSH直连(默认)
|
|
# agent = 子服务器部署Agent,主动上报心跳
|
|
# hybrid = 两种模式同时支持
|
|
MULTISYNC_MODE=ssh_direct
|
|
|
|
# Security - CHANGE THESE IN PRODUCTION!
|
|
MULTISYNC_SECRET_KEY=change-me-use-openssl-rand-hex-32
|
|
# API key for PHP frontend → Python backend communication (generate: openssl rand -hex 32)
|
|
MULTISYNC_API_KEY=
|
|
MULTISYNC_ADMIN_USERNAME=admin
|
|
MULTISYNC_ADMIN_PASSWORD=
|
|
# CORS origins — comma-separated. Leave empty for "*" (any origin)
|
|
MULTISYNC_CORS_ORIGINS=
|
|
|
|
# SSH security
|
|
MULTISYNC_SSH_STRICT_HOST_CHECKING=true
|
|
|
|
# Database (MySQL)
|
|
MULTISYNC_DATABASE_URL=mysql+pymysql://root:password@127.0.0.1:3306/multisync
|
|
|
|
# Health check
|
|
MULTISYNC_HEALTH_CHECK_INTERVAL=30
|
|
MULTISYNC_HEALTH_CHECK_TIMEOUT=10
|
|
|
|
# Push concurrency (max simultaneous rsync)
|
|
MULTISYNC_MAX_CONCURRENT_PUSHES=5
|
|
|
|
# Telegram Bot alerts (optional)
|
|
# Get token from @BotFather, chat_id from @userinfobot
|
|
MULTISYNC_TELEGRAM_BOT_TOKEN=
|
|
MULTISYNC_TELEGRAM_CHAT_ID=
|
|
|
|
# Paths (宝塔面板默认)
|
|
MULTISYNC_LOG_DIR=/www/wwwlogs
|
|
MULTISYNC_BACKUP_DIR=/www/backup/multisync
|