Skip to content

Configuration reference ​

Every key of config/app.php. See Configuration for how settings and environment variables fit together.

KeyTypeDefault in config/app.phpDescription
secretstringAPP_SECRET (required)Signs Datastar template URLs
debugboolAPP_DEBUG === '1'Development mode: no caches, drafts visible, exception pages
urlstringAPP_URL (required, validated)Public base URL, no trailing slash. Used for every absolute URL
media_urlstringMEDIA_URL or ''Where post and page files and video posters are served from: '' (this site) or a CDN's https:// base URL
images.widths, images.sizeslist, string[480, 960, 1440], '(min-width: 48rem) 48rem, 100vw'Responsive image widths and how wide images are shown (Images); also images.presets, images.formats, images.quality
mailer.dsn, mailer.from?stringMAILER_DSN, MAILER_FROMSending email for forms
log.levelstringLOG_LEVEL, or debug in development and info in productionThe least important messages written to the log
log.daysint14Daily log files to keep
log.alert_to?string or listLOG_ALERT_TOWho gets an email when an error is logged (needs the mailer)
log.pathstringvar/log/app.logThe log file (dated per day), or a stream like php://stderr
cdn.enabledboolCDN_CACHE=1, else offCache pages at a CDN (CDN caching)
cdn.ttl?intan hour with purging, else 5 minutesHow long the CDN keeps a page (s-maxage)
cdn.stale_while_revalidate, cdn.stale_if_errorint60, 86400Seconds the CDN may serve an old copy while refreshing it, or while the site is down
cdn.excludelist[]Route names never cached at the CDN (the Datastar endpoint never is)
cdn.purge?stringCDN_PURGEcloudflare, bunny or command; with cdn.cloudflare (zone, token), cdn.bunny (pull_zone, key), cdn.command
trusted_proxieslistfrom APP_TRUSTED_PROXIESReverse proxies whose X-Forwarded-* headers are trusted
languagestring'en'The default language (no URL prefix)
languagesmapen, itcode => ['name' => …, 'locale' => …]; codes like en or pt-br
blog.per_pageintBLOG_PER_PAGE or 20Posts per page on /blog
publicmap[]Values page scripts may read through publicConfig(); an allowlist, refused if a value contains APP_SECRET
csp.enabledbooltrueSend the Content Security Policy header on pages
csp.report_onlyboolfalseReport violations in the browser console instead of blocking
csp.sourcesmap[]Extra sources per directive, e.g. ['frame-src' => ['https://player.vimeo.com']]
site.namestring or map'TinyTank'Site name: titles, Open Graph, feed
site.descriptionstring or mapDefault meta description and feed subtitle
site.image?string or mapnullDefault share image (/path or URL)
site.author?string or mapnullAuthor for posts and the feed; defaults to the site name

Each site value can be a map language => value instead, see Languages.

config/collections.php ​

Data collections and their fields: name => ['fields' => […], 'sort' => …, 'fallback' => …, 'json' => …]. See Data collections.

config/forms.php ​

Forms and their fields, recipients and spam checks: name => ['fields' => […], 'to' => …, 'subject' => …, 'reply_to' => …, 'spam' => […]]. See Forms.

Overrides ​

Kernel::boot($root, $debug, $overrides) merges $overrides over the file. These extra keys are only meant for overrides (mostly in tests):

KeyDefault
content_dir<root>/contentwhere blog/ and the collection folders live
cache_dir<root>/var/cachewhere compiled caches are written
collectionsconfig/collections.phpcollection definitions, instead of the file
formsconfig/forms.phpform definitions, instead of the file
images_dir<root>/var/imageswhere encoded images are kept (tests use a temporary folder)

TinyTank documentation