WEB_PORT=8080 API_PORT=8000 # Default storage is SQLite inside the api-data volume. # To use Postgres: start with `docker compose --profile postgres up` and uncomment: # DATABASE_URL=postgresql+psycopg://tickerglass:${POSTGRES_PASSWORD}@postgres:5432/tickerglass POSTGRES_PASSWORD=change-me-for-shared-hosts # Market data source: yahoo (default, via yfinance), twelvedata, alpaca, tiingo, massive, stooq # (each needs a key), crypto (Kraken / Coinbase / Binance, no key) or demo (generated offline # prices, no network; for trying the app, screenshots and tests). # See docs/providers.md. Switching provider clears the cached market data (your data is kept). # MARKET_PROVIDER=yahoo # The app can switch the provider at runtime (Settings, Data source); the choice is kept across # restarts until MARKET_PROVIDER is changed. false locks the provider to MARKET_PROVIDER. # PROVIDER_SWITCHING=true # Minimum seconds between two switches to different providers. # PROVIDER_SWITCH_COOLDOWN_S=10 # Twelve Data (MARKET_PROVIDER=twelvedata). The key is only ever sent in a request header. # TWELVEDATA_API_KEY= # Your subscription: basic (default: 8 credits/min, 800/day, US stocks, forex, crypto), grow, pro, # ultra or enterprise. The app paces its requests to the plan's credits. # TWELVEDATA_PLAN=basic # Optional overrides of what the plan implies (leave unset to follow the plan): # TWELVEDATA_CREDITS_PER_MIN= # Daily credit cap; 0 removes it. # TWELVEDATA_DAILY_CREDITS= # TWELVEDATA_EXTENDED_HOURS= # TWELVEDATA_EVENTS= # TWELVEDATA_FUNDAMENTALS= # TWELVEDATA_INTERNATIONAL= # Seconds between quote polls of a symbol. # TWELVEDATA_POLL_INTERVAL_S= # Alpaca (MARKET_PROVIDER=alpaca): US stocks, ETFs, crypto; live trades. docs/providers.md. # Keys: alpaca.markets dashboard (a free paper account is enough). # ALPACA_KEY_ID= # ALPACA_SECRET_KEY= # basic (free: IEX feed only, 200 requests/min) or algo_trader_plus (SIP feed). # ALPACA_PLAN=basic # iex or sip; empty follows the plan (basic is always iex). # ALPACA_FEED= # Pre/post-market bars. # ALPACA_EXTENDED_HOURS=true # Crypto data location: us, us-1 or eu-1. # ALPACA_CRYPTO_LOCATION=us # ALPACA_DATA_BASE_URL=https://data.alpaca.markets # ALPACA_TRADING_BASE_URL=https://paper-api.alpaca.markets # Tiingo (MARKET_PROVIDER=tiingo): US stocks, ETFs, crypto. Free plan: 50 requests/hour. # TIINGO_API_KEY= # starter (free) or power. # TIINGO_PLAN=starter # true opts in to the live IEX WebSocket for stocks. # TIINGO_STREAM=false # TIINGO_BASE_URL=https://api.tiingo.com # Massive, formerly Polygon.io (MARKET_PROVIDER=massive): free plan is end-of-day only, 5 calls/min. # MASSIVE_API_KEY= # basic (free), starter, developer or advanced. # MASSIVE_PLAN=basic # https://api.polygon.io still works. # MASSIVE_BASE_URL=https://api.massive.com # Stooq (MARKET_PROVIDER=stooq): unofficial daily/weekly/monthly history. The key comes from a # captcha page: https://stooq.com/q/d/?s=aapl.us&get_apikey (copy apikey= from the CSV link). # STOOQ_API_KEY= # STOOQ_BASE_URL=https://stooq.com # Crypto exchange (MARKET_PROVIDER=crypto): public data, no key. # kraken (default), coinbase or binance. # CRYPTO_EXCHANGE=kraken # Optional REST / WebSocket endpoint overrides (a proxy or mirror); empty = the exchange's own. # CRYPTO_BASE_URL= # CRYPTO_STREAM_URL= # Alerts (docs/alerts.md section 4.1). All optional; secrets stay on the server. # Default webhook target (a per-alert webhook URL overrides it) and an HMAC-SHA256 signing secret # (sent as X-TickerGlass-Signature: sha256=). # ALERTS_WEBHOOK_URL= # ALERTS_WEBHOOK_SECRET= # Per-alert webhook URLs may not point at loopback/private/link-local addresses (SSRF guard) # unless this is true. ALERTS_WEBHOOK_URL is operator-set and exempt. # ALERTS_WEBHOOK_ALLOW_PRIVATE=false # Telegram needs both. # TELEGRAM_BOT_TOKEN= # TELEGRAM_CHAT_ID= # Email needs SMTP_HOST, SMTP_FROM and SMTP_TO (comma list allowed). SMTP_TLS: starttls | ssl | none. # SMTP_HOST= # SMTP_PORT=587 # SMTP_USER= # SMTP_PASSWORD= # SMTP_FROM= # SMTP_TO= # SMTP_TLS=starttls # ntfy: NTFY_URL is the full topic URL (https://ntfy.sh/my-alerts, http://ntfy:80/alerts). # NTFY_TOKEN (tk_...) is optional. NTFY_PRIORITY: 1-5 or min|low|default|high|max|urgent. # NTFY_URL= # NTFY_TOKEN= # NTFY_PRIORITY=default # NTFY_TAGS=chart_with_upwards_trend # Gotify needs GOTIFY_URL (server base URL) and GOTIFY_TOKEN (application token). Priority 0-10. # GOTIFY_URL= # GOTIFY_TOKEN= # GOTIFY_PRIORITY=5 # Apprise API (caronc/apprise-api): APPRISE_URL is http://apprise:8000/notify (stateless; list the # targets in APPRISE_URLS, comma or space separated) or .../notify/ (stateful; optional # APPRISE_TAG). APPRISE_URLS usually holds credentials: keep it private. # APPRISE_URL= # APPRISE_URLS= # APPRISE_TAG= # Password protection (docs/self-hosting.md). Empty: the app is open, fine on # localhost. Set a long password to require sign-in (LAN, Tailscale, reverse proxy). # When any auth method is set, also set ALERTS_INTERNAL_TOKEN below to a long random # string so the alerts service can reach the API. # AUTH_PASSWORD= # Session signing secret; on SQLite one is generated and stored next to the # database automatically. Set this for PostgreSQL so sessions survive restarts. # AUTH_SECRET= # Session cookie lifetime in days. # AUTH_SESSION_DAYS=30 # Single sign-on and proxy-header auth (docs/self-hosting.md). Auth turns on as soon as ANY # method is configured (AUTH_PASSWORD, OIDC_ISSUER + OIDC_CLIENT_ID, AUTH_TRUSTED_HEADER). # External base URL, e.g. https://charts.example.com. Required for OIDC (builds the redirect # URI PUBLIC_URL/api/auth/oidc/callback); https makes cookies Secure. # PUBLIC_URL= # IPs/CIDRs of plain forwarders (the bundled nginx): real client IP for the login lockout, and # X-Forwarded-Proto. Not the authenticating proxy, see AUTH_HEADER_PROXIES. # Needs every hop to the API (the nginx container and, with Docker's userland proxy, the # bridge gateway). Prefer PUBLIC_URL=https://... for Secure cookies. # TRUSTED_PROXIES= # OIDC (Authentik, Authelia, Keycloak, Pocket ID, ...). Secret optional (public client + PKCE). # OIDC_ISSUER= # OIDC_CLIENT_ID= # OIDC_CLIENT_SECRET= # client_secret_basic or client_secret_post # OIDC_TOKEN_AUTH=client_secret_basic # OIDC_SCOPES=openid profile email groups # OIDC_GROUPS_CLAIM=groups # Label of the "Sign in with ..." button. # OIDC_PROVIDER_NAME=SSO # Allow an http:// issuer / endpoints (identity provider on the LAN without TLS). # OIDC_ALLOW_HTTP=false # Who may sign in (OIDC and header mode), comma lists. OIDC / header mode will not start unless # one of these (or AUTH_ADMIN_*, which are implicitly allowed) is set, or AUTH_ALLOW_ANY_USER=true. # Users match sub, preferred_username or verified email; groups match exactly. # AUTH_ALLOWED_USERS= # AUTH_ALLOWED_GROUPS= # true: every account the identity provider / proxy accepts may sign in (no allow-list needed). # AUTH_ALLOW_ANY_USER=false # Multi-user (docs/self-hosting.md#users). OIDC / header users are created on first sign-in # as plain users; those matching these comma lists (same matching rules as AUTH_ALLOWED_*) are # admins. Promotion only: nobody is demoted by these lists. Also decides who claims the owner # account (and so the existing data) when upgrading a single-user install that uses SSO. # AUTH_ADMIN_USERS= # AUTH_ADMIN_GROUPS= # false: only accounts an admin created may sign in; unknown OIDC / header identities are refused. # AUTH_AUTO_PROVISION=true # Where Sign out sends the browser (header mode / proxy logout). # AUTH_LOGOUT_URL= # Trusted-header mode behind an auth proxy (Authelia/Authentik forward-auth). The header is # only believed when the request came through AUTH_HEADER_PROXIES: list the proxy's EXACT # address, never a whole Docker range. Only AUTH_TRUSTED_HEADER enables the mode. # AUTH_TRUSTED_HEADER=Remote-User # AUTH_HEADER_PROXIES= # Optional extra headers, empty = not read. EVERY header you set here MUST be set (overwritten) # by the proxy on every request, otherwise a client can spoof it past AUTH_ALLOWED_*. # Groups may be comma or | separated. # Authelia: Remote-Email / Remote-Name / Remote-Groups (user header Remote-User) # Authentik: X-authentik-email / X-authentik-name / X-authentik-groups (user header # X-authentik-username) # AUTH_TRUSTED_EMAIL_HEADER= # AUTH_TRUSTED_NAME_HEADER= # AUTH_TRUSTED_GROUPS_HEADER= # Newest N fired-alert log entries kept. # ALERTS_LOG_MAX=5000 # When set, the alerts service must send it as X-Alerts-Token on its write routes. # Required whenever auth is enabled (shared with the api container): without it no request # can be the alerts service (admins cannot stand in) and alerts will not fire. # At least 32 characters, e.g. `openssl rand -hex 32`; the api refuses to start with a shorter # value or one containing "CHANGE-ME" (the placeholder of the deploy templates). # ALERTS_INTERNAL_TOKEN= # Which published image tag to run (docs/self-hosting.md): latest, vX.Y, vX.Y.Z. # Used by `docker compose pull && docker compose up -d` (prebuilt images). # TICKERGLASS_TAG=latest # Server-side screener (docs/design/server-screener.md). Nightly snapshot of the tracked symbols. # Empty: on for the yahoo and demo providers, off for every other one. true / false forces it. # SCREENER_ENABLED= # Daily run time (HH:MM) and its timezone. # SCREENER_RUN_AT=17:15 # SCREENER_TZ=America/New_York # Upstream requests per minute the screener may use (daily bars) and for the weekly per-stock info pass. # SCREENER_RATE_PER_MIN=24 # SCREENER_INFO_RATE_PER_MIN=10 # Most symbols tracked (each stores its full daily history in the bars cache), in rank order. # SCREENER_MAX_SYMBOLS=800 # Also track every symbol on a watchlist. # SCREENER_INCLUDE_WATCHLISTS=true # Snapshots older than this many days before the latest session are left out of scans. # SCREENER_STALE_DAYS=7 # Scheduled backups (docs/self-hosting.md "Back up and restore"). SQLite only; Postgres: use pg_dump. # A daily backup of the whole database (every user) runs once a target is set below. # BACKUP_ENABLED=true # Local target: an absolute folder inside the container (mount a host folder, ideally on another disk, # at /backups and uncomment the volume in docker-compose.yml). # BACKUP_DIR=/backups # Daily run time (HH:MM) and its timezone (default: SCREENER_TZ when set, else UTC). # BACKUP_AT=03:30 # BACKUP_TZ= # Keep the market-data cache in the backup (default: dropped, it is refetched after a restore). # BACKUP_INCLUDE_CACHE=false # Encrypt every backup (AES-256-GCM), at least 12 characters. LOSE IT AND THE BACKUPS CANNOT BE READ. # BACKUP_PASSPHRASE= # Retention: the latest backup of each of the newest N days / ISO weeks / months is kept. # BACKUP_KEEP_DAILY=7 # BACKUP_KEEP_WEEKLY=4 # BACKUP_KEEP_MONTHLY=6 # Largest file the "Restore from file" upload accepts. # BACKUP_UPLOAD_MAX_MB=2048 # Largest backup restored (as fetched from a target, and once decompressed); staging needs about # that much free space in the data folder. # BACKUP_RESTORE_MAX_MB=8192 # S3-compatible target (AWS S3, MinIO, Backblaze B2, Wasabi, Garage, Cloudflare R2): set all four. # BACKUP_S3_ENDPOINT=http://minio:9000 # BACKUP_S3_BUCKET=tickerglass # BACKUP_S3_ACCESS_KEY_ID= # BACKUP_S3_SECRET_ACCESS_KEY= # BACKUP_S3_PREFIX=tickerglass/ # BACKUP_S3_REGION=us-east-1 # BACKUP_S3_PATH_STYLE=true # Prometheus metrics (docs/metrics.md). Off by default: /metrics answers 404. # METRICS_ENABLED=false # Bearer token Prometheus sends (Authorization: Bearer ), at least 16 characters, e.g. # `openssl rand -hex 32`. Required when METRICS_ENABLED=true and sign-in is on (unless # METRICS_PUBLIC=true): the api refuses to start otherwise. With no sign-in the app is open and # a token-less /metrics is allowed. # METRICS_TOKEN= # true: serve /metrics without a token even when sign-in is on. Only if the port is not reachable # by untrusted networks. # METRICS_PUBLIC=false # Ask AI about the chart (docs/design/local-ai.md). Off unless OLLAMA_URL is set. The api talks # to Ollama; browsers never do. From Docker, reach Ollama on the host with # http://host.docker.internal:11434 (Linux: add `extra_hosts: ["host.docker.internal:host-gateway"]` # and start Ollama with OLLAMA_HOST=0.0.0.0). # OLLAMA_URL=http://localhost:11434 # demo: canned offline replies to try the UI without a model (no OLLAMA_URL needed). # AI_PROVIDER= # Comma list of models users may pick (default: every installed chat model). # AI_MODELS=qwen2.5:7b,gemma3:12b # AI_DEFAULT_MODEL= # Context window sent to Ollama (its own default is small and silently cuts the chart data). # AI_NUM_CTX=8192 # Seconds to wait for a reply to start (includes loading the model) and between chunks. # AI_TIMEOUT_S=180 # How long Ollama keeps the model in memory after a question (5m, 1h, -1 = forever). # AI_KEEP_ALIVE= # AI_MAX_IMAGE_MB=4 # AI_MAX_CHARS=400000 # Extra one-off NYSE closures (rule-based holidays are built in), comma-separated ISO dates, e.g. 2025-01-09 # MARKET_EXTRA_HOLIDAYS=