Where TruCMS keeps its own configuration, and the .env keys you are likely to meet. Standard Laravel files (app.php, database.php, mail.php…) behave as usual and are not repeated here.
Who writes .env
The web installer writes the first .env (application key, URL, name, database, mail sender, APP_INSTALLED=true). After that, many settings screens store their fields in .env and run dotartisan:optimize, which caches config and routes. Prefer the settings screens; if you edit .env by hand, run php artisan optimize:clear afterwards. Read values with config() in code; env() belongs only in config/ files (static analysis enforces it).
| File | Holds |
|---|---|
config/dotartisan.php | Core switches: installed, demo, version, admin_prefix, super_admin_role, front_theme, locales, upload disks and paths, cookie-consent name and lifetime, date formats |
config/plugins.php | Plugin Manager limits (upload size, file counts, path length), staging and trash folders, lock time, and the list of protected plugins |
config/modules.php | Module generator paths and the file activator (modules_statuses.json) |
config/slugs.php | models: sluggable models handled by slugs:backfill; reserved: first URL segments a page can never use (admin, api, build, storage, themes, vendor, up) |
config/page_builder.php | AI assistant limits: approved image hosts, image size and types, allowed class patterns |
config/template_packages.php | .trucms.zip import limits: upload size, entries, compression ratio, per-asset size, staging time, remote download limits |
config/responsecache.php | Response cache store, lifetimes, ignored and uncached query parameters, cookies that vary the key, profile, hasher and replacers |
config/themes.php | Theme folder (resources/themes) and manifest caching |
config/tickets.php | Support tickets: attachments, open-ticket limit, auto-close days, priorities, categories |
config/setting.php | The database settings store (table settings) |
config/localized-routes.php, config/translatable.php | Supported locales (from APP_LOCALES), URL prefixes and translation model lookup |
config/cdn.php | Legacy CDN push settings. The CDN settings screen is disabled in this release |
A plugin's own config/config.php is merged under config('{alias}'). Gateway plugins merge theirs under config('trupayments.gateways.{key}').
| Key | Default in .env.example | Meaning |
|---|---|---|
APP_INSTALLED | false | Until it is true every request is redirected to the web installer (/install/pre-installation) |
APP_ADMIN_URL | admin | Admin URL prefix (config('dotartisan.admin_prefix')). Use it in your admin route groups |
APP_FRONT_THEME | echo | The public theme |
APP_SUPER_ADMIN_ROLE | 1 | Role id that bypasses every authorisation check |
APP_LOCALE, APP_LOCALES, APP_FALLBACK_LOCALE | en, en,ar, en | Default, enabled and fallback languages; maintained by the Languages screen |
APP_VERSION | 1.0.0 | Installed version; written by the updater |
APP_DEMO | false | Demo mode: blocks writes for the demo accounts and enables the public showcase |
APP_DEBUG, DEBUGBAR_ENABLED | false | Debugging. The installer sets production values; turn them on only on development copies |
COOKIE_CONSENT_ENABLED | 1 | Show the cookie-consent banner |
| Key | Default | Meaning |
|---|---|---|
PUBLIC_FILES_DISK, PUBLIC_FILES_PATH | public, uploads | Where public uploads go (local, public, s3 or wasabi, chosen in Settings → Uploading) |
MEDIA_DISK, MEDIA_PREFIX | the public disk, media | Media library storage |
UPLOADER_TEMP_DISK, UPLOADER_TEMP_PATH, UPLOADER_CHUNKS_PATH | local, temp, uploads/chunks | Temporary uploads |
AWS_*, WAS_* | empty | S3 and Wasabi credentials |
IMAGE_DRIVER | gd | Image processing driver |
TEMPLATE_PACKAGE_MAX_ASSET_BYTES | 10 MB | Largest single file a template package may carry |
| Key | Default | Meaning |
|---|---|---|
CACHE_DRIVER | file | Application cache store |
QUEUE_CONNECTION | sync | Jobs run inline unless changed (Settings → General → Queue) |
SESSION_DRIVER, SESSION_LIFETIME | file, 120 | Sessions |
BROADCAST_DRIVER | log | Broadcasting is not used |
RESPONSE_CACHE_ENABLED | false | Full-page cache switch (Settings → Cache) |
RESPONSE_CACHE_LIFETIME, RESPONSE_CACHE_AUTHENTICATED_LIFETIME, RESPONSE_CACHE_QUERY_LIFETIME | about 7 days, 15 min, 15 min | Lifetimes in seconds |
RESPONSE_CACHE_HEADER | true | Add X-Cache-Status and related debug headers |
| Key | Meaning |
|---|---|
MAIL_* | Mail transport; log until configured in Settings → Mail |
FACEBOOK_CLIENT_ID, FACEBOOK_CLIENT_SECRET, GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET | Social sign-in, set in Settings → General |
GOOGLE_FONTS_API_KEY | Optional; the font picker falls back to the public catalogue without it |
TRUPAYMENTS_{GATEWAY}_* | Gateway mode and credentials written by each gateway's settings screen |
config('dotartisan.admin_prefix'); // 'admin'
config('dotartisan.installed'); // bool
config('testimonials.default_limit', 6); // your module's config/config.php
setting('testimonials_default_limit', 6); // a value an administrator can changeUse config for values that are fixed per deployment, and settings for values a site owner changes from the admin.