Skip to main content

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​

SettingDefaultDescription
cache_dir
NEWSWORKER_CACHE_DIR
~/.newsworker/cacheDirectory for cached specs, page content and the watch store.
content_ttl
NEWSWORKER_CONTENT_TTL
3600Seconds a cached page stays fresh; after that it is revalidated.
spec_ttl
NEWSWORKER_SPEC_TTL
0Seconds a cached spec stays valid (0 = never expires).
content_cache_max_entries
NEWSWORKER_CONTENT_CACHE_MAX_ENTRIES
0Maximum cached pages on disk (0 = unbounded).
content_cache_max_bytes
NEWSWORKER_CONTENT_CACHE_MAX_BYTES
0Maximum total size of cached pages in bytes (0 = unbounded).
spec_cache_max_entries
NEWSWORKER_SPEC_CACHE_MAX_ENTRIES
0Maximum cached specs on disk (0 = unbounded).

Fetching​

SettingDefaultDescription
user_agent
NEWSWORKER_USER_AGENT
newsworker/<version> (+https://github.com/ivbeg/newsworker)User-Agent sent with every request.
request_timeout
NEWSWORKER_REQUEST_TIMEOUT
30Timeout of one HTTP request, in seconds.
max_content_bytes
NEWSWORKER_MAX_CONTENT_BYTES
10485760Largest response body accepted, in bytes.
verify_tls
NEWSWORKER_VERIFY_TLS
trueVerify TLS certificates.
legacy_tls_ciphers
NEWSWORKER_LEGACY_TLS_CIPHERS
falseAlso offer TLS 1.2 ciphers without forward secrecy (static RSA key exchange) for servers that accept nothing else; certificates are still verified.
respect_robots
NEWSWORKER_RESPECT_ROBOTS
trueHonour robots.txt, including Crawl-delay and Request-rate.
proxy
NEWSWORKER_PROXY
—Proxy URL for outgoing requests (empty = direct). Secret: redacted in output.
trust_env_proxy
NEWSWORKER_TRUST_ENV_PROXY
falseHonour HTTP(S)_PROXY, NO_PROXY and .netrc from the environment.
extra_headers
NEWSWORKER_EXTRA_HEADERS
{}Extra headers for source pages; never sent to delivery endpoints and dropped on cross-origin redirects.
cookies_file
NEWSWORKER_COOKIES_FILE
—Netscape/Mozilla cookie jar used for source pages. Secret: redacted in output.
use_async
NEWSWORKER_USE_ASYNC
falseUse the aiohttp transport for batch (needs the async extra).

Network policy​

SettingDefaultDescription
block_private_hosts
NEWSWORKER_BLOCK_PRIVATE_HOSTS
trueRefuse loopback, private, link-local, multicast and reserved addresses, checked again when the connection opens.
allowed_hosts
NEWSWORKER_ALLOWED_HOSTS
[]Only these hosts may be fetched (empty = any public host).
allow_private_hosts
NEWSWORKER_ALLOW_PRIVATE_HOSTS
falseAllow private addresses for hosts listed in allowed_hosts.
redirect_limit
NEWSWORKER_REDIRECT_LIMIT
5Maximum redirects followed per request.
trusted_proxy
NEWSWORKER_TRUSTED_PROXY
falseThe configured proxy resolves host names itself, so local address checks are skipped.
delivery_max_response_bytes
NEWSWORKER_DELIVERY_MAX_RESPONSE_BYTES
1048576Largest response read from a delivery endpoint.

Politeness​

SettingDefaultDescription
per_host_concurrency
NEWSWORKER_PER_HOST_CONCURRENCY
2Requests in flight per site across all workers of the process (0 = unlimited).
per_host_delay
NEWSWORKER_PER_HOST_DELAY
0.0Minimum seconds between requests to one site; robots.txt Crawl-delay raises it.
max_host_wait
NEWSWORKER_MAX_HOST_WAIT
30.0Longest wait, in seconds, for a slot or a Retry-After window before the request fails as rate limited.

Extraction​

SettingDefaultDescription
filtered_text_length
NEWSWORKER_FILTERED_TEXT_LENGTH
150Longest text node considered as a date candidate.
default_language
NEWSWORKER_DEFAULT_LANGUAGE
—Feed language to report instead of detecting it; dates are matched in it first.
default_timezone
NEWSWORKER_DEFAULT_TIMEZONE
UTCIANA time zone for times printed without an offset; dates without a time keep their calendar day.
structured_data
NEWSWORKER_STRUCTURED_DATA
trueUse JSON-LD and microdata article lists when the page has them.
native_feeds
NEWSWORKER_NATIVE_FEEDS
trueRead RSS, Atom and JSON Feed responses as feeds.
full_text
NEWSWORKER_FULL_TEXT
falseFetch every item link and store the article body (fulltext extra).
full_text_workers
NEWSWORKER_FULL_TEXT_WORKERS
4Concurrent fetches for full text.
bridges_dir
NEWSWORKER_BRIDGES_DIR
—Directory of user site bridges (empty = ~/.newsworker/bridges).
undated_fallback
NEWSWORKER_UNDATED_FALLBACK
falseTry the conservative undated-listing fallback when no dates are found.
undated_min_items
NEWSWORKER_UNDATED_MIN_ITEMS
3Fewest repeated cards the undated fallback accepts.
undated_min_confidence
NEWSWORKER_UNDATED_MIN_CONFIDENCE
0.75Lowest confidence (0–1) the undated fallback accepts.

Browser rendering​

SettingDefaultDescription
render
NEWSWORKER_RENDER
falseRender every page in a headless browser (browser extra).
render_fallback
NEWSWORKER_RENDER_FALLBACK
falseRender only when nothing was found and the page looks client-rendered.
render_timeout
NEWSWORKER_RENDER_TIMEOUT
15Seconds allowed for one page render.
render_concurrency
NEWSWORKER_RENDER_CONCURRENCY
1Pages rendered at the same time.
render_max_bytes
NEWSWORKER_RENDER_MAX_BYTES
10485760Largest rendered document accepted, in bytes.

Feed server​

SettingDefaultDescription
host
NEWSWORKER_HOST
127.0.0.1Interface serve binds to.
port
NEWSWORKER_PORT
8787Port serve listens on.
api_tokens
NEWSWORKER_API_TOKENS
[]Tokens accepted on /feed and /metrics (empty = no token required). Secret: redacted in output.
feed_signing_key
NEWSWORKER_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_url
NEWSWORKER_PUBLIC_BASE_URL
—Base URL readers use to reach the server, for self links and feed-url.
rate_limit_per_minute
NEWSWORKER_RATE_LIMIT_PER_MINUTE
0Requests per minute per client (0 = no limit).
rate_limit_burst
NEWSWORKER_RATE_LIMIT_BURST
20Requests a client may make at once before the rate limit applies.
max_concurrent_builds
NEWSWORKER_MAX_CONCURRENT_BUILDS
8Feeds built at the same time; more requests get 503.
cors_allowed_origins
NEWSWORKER_CORS_ALLOWED_ORIGINS
[]Origins allowed to call the server from a browser.
trust_proxy_client_ip
NEWSWORKER_TRUST_PROXY_CLIENT_IP
falseIdentify clients by X-Forwarded-For (only behind a trusted reverse proxy).
metrics_enabled
NEWSWORKER_METRICS_ENABLED
falseServe Prometheus metrics at /metrics (metrics extra).

Watch and delivery​

SettingDefaultDescription
watch_interval
NEWSWORKER_WATCH_INTERVAL
300.0Seconds between polls of watch.
watch_max_pages
NEWSWORKER_WATCH_MAX_PAGES
1Pages followed per poll.
delivery_retries
NEWSWORKER_DELIVERY_RETRIES
3Attempts before a delivery is marked terminal.
delivery_backoff
NEWSWORKER_DELIVERY_BACKOFF
1.0Base seconds of the exponential retry backoff.
delivered_retention_days
NEWSWORKER_DELIVERED_RETENTION_DAYS
30Days delivered outbox records are kept.
history_retention_days
NEWSWORKER_HISTORY_RETENTION_DAYS
365Days item history is kept after an item was last seen (0 = forever).
smtp_host
NEWSWORKER_SMTP_HOST
—SMTP server for the smtp channel.
smtp_port
NEWSWORKER_SMTP_PORT
587SMTP port.
smtp_username
NEWSWORKER_SMTP_USERNAME
—SMTP login.
smtp_password
NEWSWORKER_SMTP_PASSWORD
—SMTP password. Secret: redacted in output.
smtp_from
NEWSWORKER_SMTP_FROM
—Sender address of smtp messages.
telegram_token
NEWSWORKER_TELEGRAM_TOKEN
—Bot token for the telegram channel. Secret: redacted in output.
slack_webhook_url
NEWSWORKER_SLACK_WEBHOOK_URL
—Incoming-webhook URL for the slack channel. Secret: redacted in output.
discord_webhook_url
NEWSWORKER_DISCORD_WEBHOOK_URL
—Webhook URL for the discord channel. Secret: redacted in output.
matrix_homeserver
NEWSWORKER_MATRIX_HOMESERVER
—Homeserver URL for the matrix channel.
matrix_token
NEWSWORKER_MATRIX_TOKEN
—Access token for the matrix channel. Secret: redacted in output.
matrix_room
NEWSWORKER_MATRIX_ROOM
—Room id for the matrix channel, e.g. !abc:example.org.
mastodon_instance
NEWSWORKER_MASTODON_INSTANCE
—Instance URL for the mastodon channel.
mastodon_token
NEWSWORKER_MASTODON_TOKEN
—Access token with write:statuses for the mastodon channel. Secret: redacted in output.
mastodon_visibility
NEWSWORKER_MASTODON_VISIBILITY
unlistedPost visibility: public, unlisted, private or direct.