-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy path.env.example
More file actions
74 lines (66 loc) · 4.51 KB
/
Copy path.env.example
File metadata and controls
74 lines (66 loc) · 4.51 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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
# Copy to .env and fill in real values. .env is gitignored — never commit it.
# --- Public access ---
# This ISP connection is behind CGNAT (router WAN is a 100.64.0.0/10 address), so router
# port-forwarding can never reach the box. Public access is provided by Tailscale Funnel,
# which dials OUT from the Pi and reverse-proxies https://<host>.<tailnet>.ts.net to the
# nginx HTTP port below. TLS is terminated by Tailscale — nginx serves plain HTTP, holds
# no cert, and DuckDNS/Let's Encrypt are no longer used. Set up with:
# sudo tailscale funnel --bg http://localhost:${PASTEBIN_HTTP_PORT:-80}
# --- Host port for the Pastebin nginx (plain HTTP; Tailscale Funnel target) ---
# OMV's web UI was moved off port 80 (System -> Workbench -> Port, now 9000), so :80 is
# free on the host. No HTTPS port — Tailscale handles TLS.
PASTEBIN_HTTP_PORT=80
# Tailscale auth key for `task funnel` (non-interactive `tailscale up` + Funnel).
# Generate at https://login.tailscale.com/admin/settings/keys . Keep it in .env only.
TS_AUTHKEY=tskey-auth-REPLACE-ME
# --- Registry the Pi pulls images from ---
# `task` runs a Docker registry ON THIS PI (container pastebin-registry, storage on the
# btrfs data disk). The Pi pulls from its own loopback; 127.0.0.1 is auto-trusted as
# insecure (127.0.0.0/8). Leave as-is unless you move the registry elsewhere.
REGISTRY=127.0.0.1:5000
# --- Storage: SQLite metadata + blobs on the Pi ---
# Host paths where the SQLite db and blob bytes live. The dir MUST be a POSIX filesystem
# (ext4/xfs/btrfs) — SQLite WAL does NOT work on FAT32/exFAT.
# `task deploy` derives + creates + chowns these automatically from PI_DATA_DIR/DATA_UUID
# in .taskenv; they live here too so a bare `docker compose up` (e.g. after a reboot) resolves.
DB_HOST_PATH=/srv/pastebin/db
BLOB_HOST_PATH=/srv/pastebin/blobs
# Access log (one line per request: timestamp ip method path). Rotates by size with ever-increasing
# numbers (access.log -> access.log.1, .2, ...); prune old ones with the retention cron in CLAUDE.md.
LOG_HOST_PATH=/srv/pastebin/logs
# OMV / by-UUID alternative (disk mounted at /srv/dev-disk-by-uuid-<uuid>):
# DB_HOST_PATH=/srv/dev-disk-by-uuid-<uuid>/pastebin/db
# BLOB_HOST_PATH=/srv/dev-disk-by-uuid-<uuid>/pastebin/blobs
# LOG_HOST_PATH=/srv/dev-disk-by-uuid-<uuid>/pastebin/logs
# Container user that owns the data dirs (must match the dir owner). 1654 = the app image's
# default non-root user.
PASTEBIN_UID=1654
PASTEBIN_GID=1654
# --- ntfy push notifications + public URL (all optional) ---
# ntfy.sh push on each new paste/upload. Leave NTFY_TOPIC unset ⇒ notifier is a silent no-op.
NTFY_TOPIC=
NTFY_SERVER_URL=https://ntfy.sh
# Absolute base URL used to build clickable links in ntfy notifications. Set to your public
# Funnel URL, e.g. https://<host>.<tailnet>.ts.net . Unset ⇒ links are relative/incomplete.
PUBLIC_BASE_URL=
# HTTP worker-thread pool. Also the app's real concurrency ceiling: each worker handles one
# connection at a time, so max in-flight requests == WORKER_THREADS. Keep low on the Pi 3B
# (250 MB cap); default 8. Concurrency shedding is nginx's job (limit_conn), not the app's.
WORKER_THREADS=8
# --- Admin API ---
# Shared secret for admin endpoints (sent as the X-Admin-Token header). Leave UNSET and the
# admin API is disabled (fail-closed). A short token (e.g. 5 uppercase letters/digits like
# A3K9Z) is fine here: adminguard makes guessing expensive with an escalating per-IP lockout
# (2s→4s→…→5min) plus a fixed delay + constant-time compare on every failed attempt.
ADMIN_TOKEN=
# --- Capacity / abuse limits (all optional; sensible defaults baked in) ---
MAX_REQUEST_BYTES=53477376 # ~51 MB raw request-body cap; rejected early (413) before the
# body is streamed/spilled. = 50 MB file limit + multipart
# envelope headroom. MUST stay in sync with nginx client_max_body_size.
# Also the effective per-paste ceiling (no separate paste limit).
MAX_FILE_UPLOAD_BYTES=52428800 # 50 MB hard cap on a single file/folder upload (413 if exceeded)
MAX_STORAGE_BYTES_PER_IP=104857600 # 100 MB total stored bytes per client IP across all
# their pastes AND files combined (413 if exceeded)
REQUEST_TIMEOUT_MS=30000 # recv/send idle timeout on a connection. A client that stalls
# for this long (slowloris) is dropped with 408, freeing its
# worker. 0 disables.