Repository navigation
Expand file tree
/
Copy pathsecurefile.env.example
More file actions
45 lines (34 loc) · 1.8 KB
/
Copy pathsecurefile.env.example
File metadata and controls
45 lines (34 loc) · 1.8 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
# securefile configuration. Copy to /etc/securefile/securefile.env.
# Read by systemd as an EnvironmentFile: KEY=value, no shell quoting.
# The service listens on localhost only; a reverse proxy is the public face.
SECUREFILE_ADDR=127.0.0.1:8080
# Public origin. Share links are built from this, so it must match what the
# recipient's browser actually sees, including the scheme.
SECUREFILE_BASE_URL=https://example.com
SECUREFILE_DATA_DIR=/var/lib/securefile
# Only these hops may set X-Forwarded-For (or the real-IP header below).
# Anything else claiming a client address is ignored, so the rate limiter
# cannot be bypassed by a spoofed header. Set this to your proxy's address.
SECUREFILE_TRUSTED_PROXIES=127.0.0.1/32,::1/128
# If your proxy passes the true client IP in a single-value header, name it
# here (read only from a trusted peer). Behind Cloudflare, use CF-Connecting-IP.
# SECUREFILE_REAL_IP_HEADER=X-Real-IP
# Send Strict-Transport-Security. Turn on once the public name is HTTPS-only.
SECUREFILE_HSTS=true
# Limits. Upload size scales down as retention and download count grow.
SECUREFILE_MAX_TOTAL_BYTES=10737418240
SECUREFILE_MAX_FILES=100
SECUREFILE_MAX_DAYS=100
SECUREFILE_MAX_DOWNLOADS=500
# Storage budget. New uploads are refused once live shares reach this, which
# keeps the disk from filling and taking the service down with it. 0 disables.
SECUREFILE_DISK_QUOTA_BYTES=214748364800
SECUREFILE_SWEEP_INTERVAL=5m
SECUREFILE_LOG_LEVEL=info
# Optional: a directory of public documents served read-only at /report/.
# Empty disables the route.
# SECUREFILE_REPORT_DIR=
# Optional advertising / analytics on non-secret pages only (never on a page
# whose URL or fragment can carry a share key or password). Empty disables them.
# SECUREFILE_ADSENSE_CLIENT=ca-pub-XXXXXXXXXXXXXXXX
# SECUREFILE_GA_ID=G-XXXXXXXXXX