Files
teapawt/config/teapot.example.toml
4cuckandCursor d00136558a Refuse cross-site preference changes and redirects off Twitter, YouTube, and Reddit.
Show an account's country as a flag, and escape raw tags in posts and bios.

Co-authored-by: Cursor <[email protected]>
2026-10-25 03:31:12 +00:00

133 lines
4.2 KiB
TOML

# teapawt Configuration
[server]
# Domain for generating links - change this to your own domain/ip
address = "0.0.0.0"
hostname = "localhost"
httpMaxConnections = 100
https = false # Set to true when using HTTPS
port = 8080
# Port used in generated links (prefs bookmark, RSS, og:image, …).
# Leave unset to use `port`. Set to 443 (HTTPS) or 80 (HTTP) when teapot
# sits behind a reverse proxy so URLs omit the listen port.
# publicPort = 443
staticDir = "./public"
title = "teapawt"
[cache]
# Cache TTL settings (in-process cache, no external dependencies)
listMinutes = 240 # How long to cache list info
maxEntries = 50000 # Evict the soonest-expiring entries when this limit is exceeded
rssMinutes = 10 # How long to cache RSS queries
[config]
# Secret key for cryptographic signing of media URLs.
# Generate a unique value for every instance, e.g. with openssl rand -hex 32
hmacKey = ""
# Use base64 encoding for proxied media URLs
base64Media = false
# Enable RSS feeds
enableRSS = true
# Cap how fast one client can spend X API quota. Cache hits, media proxying and
# static assets are never charged, since they cost no upstream call.
clientBudget = true
# Peers whose X-Forwarded-For names the real client. Anything not
# listed is billed by its socket address, so behind a reverse proxy this MUST
# list that proxy or every visitor shares one budget. The header is read right
# to left past trusted hops, since proxies append rather than replace.
trustedProxies = [ ]
# Shown when a caller outruns its own budget, when the instance is out of
# upstream quota, and when a request fails outright.
# clientBudgetMessage = "..."
# rateLimitedMessage = "..."
# internalErrorMessage = "..."
# Enable debug endpoints (/.health, /.sessions)
enableDebug = false
# Bearer token required for debug endpoints when enableDebug = true.
# Generate a unique value with at least 32 characters.
debugToken = ""
# HTTP/HTTPS proxy for media fetches. X API calls use socksProxiesFile when set.
proxy = ""
proxyAuth = ""
# Residential HTTP proxy tried only after a direct request gets an HTML 429.
# Account quota (a JSON 429) stays on the direct path. proxyAuth is the
# user:pass for this URL.
apiProxy = ""
# SOCKS5 list (`host:port:user:pass`, one per line). Each cookie session is
# pinned to one port so its exit IP stays stable. Pins are stored in
# sessionProxiesFile.
socksProxiesFile = ""
sessionProxiesFile = "session-proxies.json"
# Enable this if cookie-based auth is failing
disableTid = false
# Read about-account data from X-Posed's public cache before asking X, saving a
# call on the scarcest rate-limit tier. Discloses the usernames being viewed to
# a third party. teapawt never contributes to it.
xPosedCommunityCache = false
# Max requests per session to avoid race conditions
maxConcurrentReqs = 2
# Configure server-side Kagi translation for non-English tweets
# Set either kagiToken (inline) or kagiTokenFile (path to file)
# Get your token from kagi.com/settings → Session Link
kagiToken = ""
kagiTokenFile = ""
[gifTranscoding]
# Transcode Twitter GIF MP4s to actual GIF format for Discord inline playback
# Modes: "local" (default, ffmpeg on server), "off", "external" (URL rewrite)
mode = "local"
# Cache directory for transcoded GIFs (local mode only)
cacheDir = "./cache/gif"
# Maximum cache size in MB (local mode only)
cacheMaxMb = 512
# External transcoding domain (external mode only, e.g. "gif.example.com")
externalDomain = ""
# Donation checkouts. Leave these empty in git. Set them here on the server, or
# with STRIPE_SECRET_KEY, STRIPE_WEBHOOK_SECRET, NOWPAYMENTS_API_KEY,
# NOWPAYMENTS_IPN_SECRET, LZT_ACCESS_TOKEN, LZT_MERCHANT_ID, and LZT_SECRET_KEY.
# Never commit live keys.
[donations]
ledgerFile = "donations.json"
# Shown on the homepage and /donate. The counter resets at 00:00 UTC on the 23rd.
goalCents = 12900
[donations.stripe]
secretKey = ""
webhookSecret = ""
[donations.nowpayments]
apiKey = ""
ipnSecret = ""
[donations.lzt]
accessToken = ""
merchantId = 0
secretKey = ""
currency = "usd"
[preferences]
# Default theme
theme = "black"
# URL replacements for privacy
replaceReddit = ""
replaceTwitter = ""
replaceYouTube = ""
infiniteScroll = false