Settings reference
Every setting can be set in the YAML settings file, as an environment variable (shown under each name) or, for many, with a command-line option. Precedence is defaults < YAML < environment < command line; see runtime configuration. Secret settings are redacted wherever configuration is printed.
Caching
| Setting | Default | Description |
|---|---|---|
cache_dirNEWSWORKER_CACHE_DIR | ~/.newsworker/cache | Directory for cached specs, page content and the watch store. |
content_ttlNEWSWORKER_CONTENT_TTL | 3600 | Seconds a cached page stays fresh; after that it is revalidated. |
spec_ttlNEWSWORKER_SPEC_TTL | 0 | Seconds a cached spec stays valid (0 = never expires). |
content_cache_max_entriesNEWSWORKER_CONTENT_CACHE_MAX_ENTRIES | 0 | Maximum cached pages on disk (0 = unbounded). |
content_cache_max_bytesNEWSWORKER_CONTENT_CACHE_MAX_BYTES | 0 | Maximum total size of cached pages in bytes (0 = unbounded). |
spec_cache_max_entriesNEWSWORKER_SPEC_CACHE_MAX_ENTRIES | 0 | Maximum cached specs on disk (0 = unbounded). |
Fetching
| Setting | Default | Description |
|---|---|---|
user_agentNEWSWORKER_USER_AGENT | newsworker/<version> (+https://github.com/ivbeg/newsworker) | User-Agent sent with every request. |
request_timeoutNEWSWORKER_REQUEST_TIMEOUT | 30 | Timeout of one HTTP request, in seconds. |
max_content_bytesNEWSWORKER_MAX_CONTENT_BYTES | 10485760 | Largest response body accepted, in bytes. |
verify_tlsNEWSWORKER_VERIFY_TLS | true | Verify TLS certificates. |
legacy_tls_ciphersNEWSWORKER_LEGACY_TLS_CIPHERS | false | Also offer TLS 1.2 ciphers without forward secrecy (static RSA key exchange) for servers that accept nothing else; certificates are still verified. |
respect_robotsNEWSWORKER_RESPECT_ROBOTS | true | Honour robots.txt, including Crawl-delay and Request-rate. |
proxyNEWSWORKER_PROXY | — | Proxy URL for outgoing requests (empty = direct). Secret: redacted in output. |
trust_env_proxyNEWSWORKER_TRUST_ENV_PROXY | false | Honour HTTP(S)_PROXY, NO_PROXY and .netrc from the environment. |
extra_headersNEWSWORKER_EXTRA_HEADERS | {} | Extra headers for source pages; never sent to delivery endpoints and dropped on cross-origin redirects. |
cookies_fileNEWSWORKER_COOKIES_FILE | — | Netscape/Mozilla cookie jar used for source pages. Secret: redacted in output. |
use_asyncNEWSWORKER_USE_ASYNC | false | Use the aiohttp transport for batch (needs the async extra). |
Network policy
| Setting | Default | Description |
|---|---|---|
block_private_hostsNEWSWORKER_BLOCK_PRIVATE_HOSTS | true | Refuse loopback, private, link-local, multicast and reserved addresses, checked again when the connection opens. |
allowed_hostsNEWSWORKER_ALLOWED_HOSTS | [] | Only these hosts may be fetched (empty = any public host). |
allow_private_hostsNEWSWORKER_ALLOW_PRIVATE_HOSTS | false | Allow private addresses for hosts listed in allowed_hosts. |
redirect_limitNEWSWORKER_REDIRECT_LIMIT | 5 | Maximum redirects followed per request. |
trusted_proxyNEWSWORKER_TRUSTED_PROXY | false | The configured proxy resolves host names itself, so local address checks are skipped. |
delivery_max_response_bytesNEWSWORKER_DELIVERY_MAX_RESPONSE_BYTES | 1048576 | Largest response read from a delivery endpoint. |
Politeness
| Setting | Default | Description |
|---|---|---|
per_host_concurrencyNEWSWORKER_PER_HOST_CONCURRENCY | 2 | Requests in flight per site across all workers of the process (0 = unlimited). |
per_host_delayNEWSWORKER_PER_HOST_DELAY | 0.0 | Minimum seconds between requests to one site; robots.txt Crawl-delay raises it. |
max_host_waitNEWSWORKER_MAX_HOST_WAIT | 30.0 | Longest wait, in seconds, for a slot or a Retry-After window before the request fails as rate limited. |
Extraction
| Setting | Default | Description |
|---|---|---|
filtered_text_lengthNEWSWORKER_FILTERED_TEXT_LENGTH | 150 | Longest text node considered as a date candidate. |
default_languageNEWSWORKER_DEFAULT_LANGUAGE | — | Feed language to report instead of detecting it; dates are matched in it first. |
default_timezoneNEWSWORKER_DEFAULT_TIMEZONE | UTC | IANA time zone for times printed without an offset; dates without a time keep their calendar day. |
structured_dataNEWSWORKER_STRUCTURED_DATA | true | Use JSON-LD and microdata article lists when the page has them. |
native_feedsNEWSWORKER_NATIVE_FEEDS | true | Read RSS, Atom and JSON Feed responses as feeds. |
full_textNEWSWORKER_FULL_TEXT | false | Fetch every item link and store the article body (fulltext extra). |
full_text_workersNEWSWORKER_FULL_TEXT_WORKERS | 4 | Concurrent fetches for full text. |
bridges_dirNEWSWORKER_BRIDGES_DIR | — | Directory of user site bridges (empty = ~/.newsworker/bridges). |
undated_fallbackNEWSWORKER_UNDATED_FALLBACK | false | Try the conservative undated-listing fallback when no dates are found. |
undated_min_itemsNEWSWORKER_UNDATED_MIN_ITEMS | 3 | Fewest repeated cards the undated fallback accepts. |
undated_min_confidenceNEWSWORKER_UNDATED_MIN_CONFIDENCE | 0.75 | Lowest confidence (0–1) the undated fallback accepts. |
Browser rendering
| Setting | Default | Description |
|---|---|---|
renderNEWSWORKER_RENDER | false | Render every page in a headless browser (browser extra). |
render_fallbackNEWSWORKER_RENDER_FALLBACK | false | Render only when nothing was found and the page looks client-rendered. |
render_timeoutNEWSWORKER_RENDER_TIMEOUT | 15 | Seconds allowed for one page render. |
render_concurrencyNEWSWORKER_RENDER_CONCURRENCY | 1 | Pages rendered at the same time. |
render_max_bytesNEWSWORKER_RENDER_MAX_BYTES | 10485760 | Largest rendered document accepted, in bytes. |
Feed server
| Setting | Default | Description |
|---|---|---|
hostNEWSWORKER_HOST | 127.0.0.1 | Interface serve binds to. |
portNEWSWORKER_PORT | 8787 | Port serve listens on. |
api_tokensNEWSWORKER_API_TOKENS | [] | Tokens accepted on /feed and /metrics (empty = no token required). Secret: redacted in output. |
feed_signing_keyNEWSWORKER_FEED_SIGNING_KEY | — | Key for signed /feed links (newsworker feed-url); at least 16 characters. Setting it makes /feed require a token or a signature. Secret: redacted in output. |
public_base_urlNEWSWORKER_PUBLIC_BASE_URL | — | Base URL readers use to reach the server, for self links and feed-url. |
rate_limit_per_minuteNEWSWORKER_RATE_LIMIT_PER_MINUTE | 0 | Requests per minute per client (0 = no limit). |
rate_limit_burstNEWSWORKER_RATE_LIMIT_BURST | 20 | Requests a client may make at once before the rate limit applies. |
max_concurrent_buildsNEWSWORKER_MAX_CONCURRENT_BUILDS | 8 | Feeds built at the same time; more requests get 503. |
cors_allowed_originsNEWSWORKER_CORS_ALLOWED_ORIGINS | [] | Origins allowed to call the server from a browser. |
trust_proxy_client_ipNEWSWORKER_TRUST_PROXY_CLIENT_IP | false | Identify clients by X-Forwarded-For (only behind a trusted reverse proxy). |
metrics_enabledNEWSWORKER_METRICS_ENABLED | false | Serve Prometheus metrics at /metrics (metrics extra). |
Watch and delivery
| Setting | Default | Description |
|---|---|---|
watch_intervalNEWSWORKER_WATCH_INTERVAL | 300.0 | Seconds between polls of watch. |
watch_max_pagesNEWSWORKER_WATCH_MAX_PAGES | 1 | Pages followed per poll. |
delivery_retriesNEWSWORKER_DELIVERY_RETRIES | 3 | Attempts before a delivery is marked terminal. |
delivery_backoffNEWSWORKER_DELIVERY_BACKOFF | 1.0 | Base seconds of the exponential retry backoff. |
delivered_retention_daysNEWSWORKER_DELIVERED_RETENTION_DAYS | 30 | Days delivered outbox records are kept. |
history_retention_daysNEWSWORKER_HISTORY_RETENTION_DAYS | 365 | Days item history is kept after an item was last seen (0 = forever). |
smtp_hostNEWSWORKER_SMTP_HOST | — | SMTP server for the smtp channel. |
smtp_portNEWSWORKER_SMTP_PORT | 587 | SMTP port. |
smtp_usernameNEWSWORKER_SMTP_USERNAME | — | SMTP login. |
smtp_passwordNEWSWORKER_SMTP_PASSWORD | — | SMTP password. Secret: redacted in output. |
smtp_fromNEWSWORKER_SMTP_FROM | — | Sender address of smtp messages. |
telegram_tokenNEWSWORKER_TELEGRAM_TOKEN | — | Bot token for the telegram channel. Secret: redacted in output. |
slack_webhook_urlNEWSWORKER_SLACK_WEBHOOK_URL | — | Incoming-webhook URL for the slack channel. Secret: redacted in output. |
discord_webhook_urlNEWSWORKER_DISCORD_WEBHOOK_URL | — | Webhook URL for the discord channel. Secret: redacted in output. |
matrix_homeserverNEWSWORKER_MATRIX_HOMESERVER | — | Homeserver URL for the matrix channel. |
matrix_tokenNEWSWORKER_MATRIX_TOKEN | — | Access token for the matrix channel. Secret: redacted in output. |
matrix_roomNEWSWORKER_MATRIX_ROOM | — | Room id for the matrix channel, e.g. !abc:example.org. |
mastodon_instanceNEWSWORKER_MASTODON_INSTANCE | — | Instance URL for the mastodon channel. |
mastodon_tokenNEWSWORKER_MASTODON_TOKEN | — | Access token with write:statuses for the mastodon channel. Secret: redacted in output. |
mastodon_visibilityNEWSWORKER_MASTODON_VISIBILITY | unlisted | Post visibility: public, unlisted, private or direct. |