This commit is contained in:
Anaïs Saraiva
2026-08-25 12:20:31 +02:00
parent ccc29212cd
commit abf8736fdd
59 changed files with 4228 additions and 3008 deletions
+36
View File
@@ -0,0 +1,36 @@
# Filehost configuration (Rust backend).
# Copy to .env (at the project root) and edit as needed.
# Bind address and port.
HOST=0.0.0.0
PORT=3000
# Directory where files + metadata are stored.
STORAGE_DIR=./storage
# Directory containing the built Svelte frontend (vite build output).
STATIC_DIR=./frontend/dist
# Max upload size. Units: B, KB, MB, GB, TB (or plain bytes).
MAX_FILE_SIZE=10GB
# Max fraction (0.0-1.0) of the storage disk that may be used; uploads are
# rejected with 503 above this.
MAX_STORAGE_USAGE=0.5
# Milliseconds before an upload expires and is deleted (48 hours hard maximum).
FILE_TTL_MS=172800000
# Length in characters of the upload/download key token (a-z0-9).
KEY_LENGTH=8
# Optional public base URL used to build absolute share links.
# PUBLIC_BASE_URL=https://files.example.com
# Enable per-IP rate limiting on download/delete/auth endpoints.
RATE_LIMIT_ENABLED=1
RATE_LIMIT_MAX=300
RATE_LIMIT_WINDOW_MS=60000
# Set 1 only behind a proxy that sets X-Forwarded-For.
TRUST_PROXY=0