Skip to content

Configuration

JournalPHP uses two levels of configuration:

  1. .env — environment variables (DB connections, API keys, service addresses)
  2. Admin Panel — platform settings stored in the config database table

The .env File

The template is .env.example. In dev environments it is copied automatically on first start.

Application

VariablePurpose
APP_KEYEncryption key
APP_ENVlocal or production
APP_DEBUGDebug mode
APP_URLApplication base URL
FORCE_HTTPSForce HTTPS
VITE_APP_NAMEApplication name for frontend build

Database

VariablePurpose
DB_CONNECTIONDriver (mysql)
DB_HOSTHost
DB_PORTPort
DB_DATABASEDatabase name
DB_USERNAMEUser
DB_PASSWORDPassword

Redis

VariablePurpose
REDIS_HOSTHost
REDIS_PORTPort
REDIS_PASSWORDPassword
CACHE_DRIVERCache driver
QUEUE_CONNECTIONQueue driver
SESSION_DRIVERSession driver

WebSocket (Reverb)

VariablePurpose
BROADCAST_DRIVERreverb
REVERB_APP_IDApp ID
REVERB_APP_KEYKey
REVERB_APP_SECRETSecret
REVERB_HOSTHost
REVERB_PORTPort
REVERB_SCHEMEhttp or https
VITE_REVERB_APP_KEYKey for frontend build
VITE_REVERB_HOSTHost for frontend build
VITE_REVERB_PORTPort for frontend build
VITE_REVERB_SCHEMEScheme for frontend build

Media

VariablePurpose
CLOUDINARY_URLCloudinary URL (optional; primary config is in the admin panel)

Upload limits, allowed file types, storage driver, and credentials are configured in Admin Panel → Media (/admin-panel/settings/media). Supported drivers: Local, Cloudinary, Yandex Cloud Object Storage.

VariablePurpose
SCOUT_DRIVERSearch driver (default: null — search disabled)

With null, Scout does not index models. To enable search, set database, algolia, meilisearch, or another supported driver.

GIF (Tenor)

These keys are not in .env.example but are used during production builds (docker-compose.prod.yml, Dockerfile.prod):

VariablePurpose
VITE_TENOR_API_KEYTenor API key
VITE_TENOR_CLIENT_KEYTenor client key

Without these keys, GIF search in the editor is disabled.

Frontend

VariablePurpose
VITE_APP_LOCALELanguage for initial seed and production build (ru or en)
VITE_DEV_SERVER_URLVite dev server URL (dev only)

Admin Panel Settings

The following parameters are stored in the database and are not duplicated in .env:

SectionPathWhat it configures
General/admin-panel/settings/generalSite name, logo, language
Site Appearance/admin-panel/settings/appearancePublic theme CSS variables
SEO/admin-panel/settings/seoMeta tags, Open Graph
Cookie Banner/admin-panel/settings/cookie-consentCookie consent banner
Mail/admin-panel/settings/mailSMTP (applied via MailServiceProvider)
Authentication/admin-panel/settings/authOAuth, one-tap login, verification
Content/admin-panel/settings/contentPublishing restrictions
Media/admin-panel/settings/mediaStorage, limits, MIME types
Sidebar/admin-panel/settings/sidebarSidebar widgets
Sidebar Footer/admin-panel/settings/footerLinks and social icons
Topics in Sidebar/admin-panel/settings/topic-displayFeatured topics
Additional Scripts/admin-panel/settings/additional-scriptsCustom HTML/JS/CSS
Rating/admin-panel/settings/ratingRating system
AI/admin-panel/ai-settingsOpenAI API keys and model
Moderation/admin-panel/moderation-settingsAI text moderation
Image Moderation/admin-panel/image-moderation-settingsYandex Vision
Bot/admin-panel/chat-gpt-botAI comment bot
Payment Provider/admin-panel/subscription-payment-providerYooKassa / T-Bank
Access (Horizon / Log Viewer)/admin-panel/system/accesshorizonAdmins, logViewerAdmins

Settings take effect without restarting the container. On first run, ConfigSeeder populates initial values.


Applying Changes

ChangeRestart
.envdocker compose restart app
Admin Panelnot needed
VITE_* (production)rebuild frontend image

Released under the MIT License.