* feat(clientip): expose trusted proxy CIDRs in the admin UI and via env var Trusted reverse-proxy CIDRs (clientip.trusted_proxies) previously required hand-editing server_settings via SQL and a restart. Now: - Admin UI: a Network > Trusted Proxies field on the General settings page, with server-side CIDR validation and normalization on save. - Env var: SILO_TRUSTED_PROXIES is validated at startup and persisted to server_settings (re-applied on every boot while set), so Docker operators never touch the database and the UI shows the effective value. - Hot reload: the setting now rides the nodeconfig watcher snapshot, so changes apply without restart on Redis-less deployments too (previously reload only worked via the Redis event bus, and only when rate limiting was enabled). Closes #300 Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(clientip): keep key-scoped event-bus reload alongside the config watcher A malformed unrelated setting fails the whole-config watcher reload; the direct subscription re-reads only clientip.trusted_proxies so the trust boundary still updates on Redis-backed multi-instance deployments. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(clientip): key-scoped same-process reload in OnServerSettingUpdated Covers the Redis-less path: an unrelated malformed setting that fails the whole-config watcher reload can no longer leave stale trusted-proxy CIDRs after a successful admin save. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * fix(clientip): reload with a fresh context in OnServerSettingUpdated The setting is already persisted when the hook runs; a canceled admin request must not skip the trust-boundary reload. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * style(web): wrap long trusted-proxies hint to the 100-char width Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> * feat(web): add guidance tip for trusted proxy ranges Explains that the setting replaces the private-network defaults, the recommended /32 pattern, CDN multi-range caveats (Cloudflare), and why 0.0.0.0/0 is unsafe. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> --------- Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
87 lines
3.5 KiB
Bash
87 lines
3.5 KiB
Bash
# Silo Docker deployment
|
|
# For the default docker compose setup, MEDIA_ROOT is the main value you need to set.
|
|
|
|
# Optional: layer compose files through env. Leave unset for CPU-only defaults.
|
|
# Linux/macOS example for enabling NVIDIA override:
|
|
# COMPOSE_FILE=docker-compose.yml:docker-compose.nvidia.yml
|
|
# Windows example:
|
|
# COMPOSE_FILE=docker-compose.yml;docker-compose.nvidia.yml
|
|
|
|
# Required for docker compose: host path to your media library.
|
|
# Example: MEDIA_ROOT=/srv/media
|
|
MEDIA_ROOT=/srv/media
|
|
|
|
# Container path where Silo sees MEDIA_ROOT. New installs can keep /mnt/media.
|
|
# Continuum migrations should set this to the old in-container library path if
|
|
# existing library records use that path.
|
|
MEDIA_CONTAINER_ROOT=/mnt/media
|
|
|
|
# Recommended server data root for bind mounts.
|
|
SILO_DATA_ROOT=/opt/silo
|
|
|
|
# Published application image. Override to pin a specific tag if needed.
|
|
SILO_IMAGE=ghcr.io/silo-server/silo-server:latest
|
|
|
|
# Quick-start bundled PostgreSQL settings used by docker-compose.yml.
|
|
POSTGRES_USER=silo
|
|
POSTGRES_PASSWORD=silo
|
|
POSTGRES_DB=silo
|
|
POSTGRES_SHM_SIZE=8gb
|
|
|
|
# PostgreSQL auto-tuning is enabled by default in docker-compose.yml. Silo
|
|
# applies pgtune-style OLTP recommendations through ALTER SYSTEM at startup.
|
|
# Set POSTGRES_TUNE=off if you manage PostgreSQL tuning yourself.
|
|
# POSTGRES_TUNE=off
|
|
# POSTGRES_TUNE_PROFILE=oltp
|
|
# POSTGRES_TUNE_MEMORY=auto
|
|
# POSTGRES_TUNE_MEMORY_BUDGET_PERCENT=75
|
|
# POSTGRES_TUNE_CPUS=auto
|
|
# POSTGRES_TUNE_STORAGE=ssd
|
|
# POSTGRES_TUNE_DB_SIZE=auto
|
|
# POSTGRES_TUNE_CONNECTIONS=100
|
|
|
|
# Optional host port overrides for docker-compose.yml.
|
|
# PORT=8090
|
|
# Used only after Jellyfin-compatible app support is enabled by an admin.
|
|
# JF_PORT=8096
|
|
# PROXY_PORT=8083
|
|
# TRANSCODE_PORT=8082
|
|
|
|
# Optional NVIDIA override controls (used by docker-compose.nvidia.yml).
|
|
# NVIDIA_GPU_COUNT=1
|
|
|
|
# REQUIRED: master key for at-rest credential encryption. Silo refuses to start
|
|
# without it. Integration API keys, S3 keys, and other server-owned secrets are
|
|
# encrypted under a key derived from this value, so it must be at least 32
|
|
# characters and kept secret. Generate one with:
|
|
# openssl rand -base64 48
|
|
# Back it up SEPARATELY from your database dumps (treat it like a CA private
|
|
# key): losing it makes every encrypted secret unrecoverable. See
|
|
# docs/architecture/secret-encryption.md.
|
|
# SECRET_KEY=replace-with-output-of-openssl-rand-base64-48
|
|
|
|
# Optional public URL for Silo. If not set, the server will use the IP address of the container.
|
|
# SILO_PUBLIC_URL=https://silo.example.com
|
|
|
|
# Optional trusted reverse-proxy CIDRs for client IP resolution. When set, this
|
|
# overrides the "Trusted Proxies" admin setting on every startup (the value is
|
|
# validated and written to server_settings, so the Admin UI shows it). Leave
|
|
# unset to manage it from Admin > Settings > General instead. Defaults trust
|
|
# RFC 1918 private ranges + loopback.
|
|
# SILO_TRUSTED_PROXIES=10.0.0.0/8,172.16.0.0/12,192.168.0.0/16,127.0.0.0/8,::1/128,203.0.113.7/32
|
|
|
|
# Run from source / advanced overrides
|
|
# Only DATABASE_URL is required when running Silo outside the default docker compose stack.
|
|
# DATABASE_URL=postgres://silo:password@localhost:5432/silo
|
|
|
|
# Optional Redis override when running from source or pointing workers at an external Redis.
|
|
# REDIS_URL=redis://localhost:6379
|
|
|
|
# Optional standalone worker identity settings for docker-compose.remote-transcode.yml.
|
|
# NODE_NAME=transcode-01
|
|
# NODE_URL=http://transcode-01.example.com:8082
|
|
|
|
# Optional server mode override for source runs or standalone worker nodes.
|
|
# MODE=integrated
|
|
#SILO_MIGRATE_TIMEOUT=60m
|