fileshare/.env.example

52 lines
1.8 KiB
Bash
Raw Normal View History

2026-06-16 14:16:02 +03:00
# ---- Server ----
PORT=8077
# Base path the app is mounted at behind nginx (used for links/redirects).
BASE_PATH=/fileShare
# Absolute public URL of the app, used to build copyable links. No trailing slash.
PUBLIC_BASE_URL=https://your.domain/fileShare
# Long random string. Generate with: node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"
SESSION_SECRET=
# Optional signup code required to register. Leave blank for open registration.
SIGNUP_CODE=
# 1 if running behind a reverse proxy (nginx). Enables secure cookies + correct client IPs.
TRUST_PROXY=1
# Where uploads, tmp staging and the app log live.
DATA_DIR=./data
# ---- MySQL (no auto-migration: run schema.sql yourself) ----
DB_HOST=127.0.0.1
DB_PORT=3306
DB_USER=fileshare
DB_PASSWORD=
DB_NAME=fileshare
# ---- Admin ----
# The user with this email is promoted to admin on startup.
ADMIN_EMAIL=
# ---- Limits / links ----
# Reject uploads when free disk space drops below this many bytes (default 2 GiB).
MIN_FREE_BYTES=2147483648
# Per-file upload cap in bytes (default 4 GiB).
MAX_UPLOAD_BYTES=4294967296
# How long a freshly minted link stays valid, in hours.
LINK_TTL_HOURS=24
# Extensions skipped by background compression (already-compressed formats).
COMPRESS_SKIP_EXTS=jpg,jpeg,png,gif,webp,mp4,mov,mkv,avi,mp3,zip,gz,7z,rar,pdf,docx,xlsx,pptx
# ---- SMTP (email verification) ----
SMTP_HOST=
SMTP_PORT=587
SMTP_USER=
SMTP_PASS=
MAIL_FROM=File Share <no-reply@your.domain>
# Set to 1 to skip sending email and auto-verify accounts (handy for local dev).
DISABLE_EMAIL_VERIFICATION=0
# ---- Antivirus (ClamAV / clamd) ----
CLAMD_HOST=127.0.0.1
CLAMD_PORT=3310
# block = reject uploads when clamd is unreachable; skip = accept and mark av_status=skipped
AV_FAIL_MODE=block
# Set to 1 to disable AV scanning entirely (local dev without clamd).
DISABLE_AV=0