Configuration
JournalPHP uses two levels of configuration:
.env— environment variables (DB connections, API keys, service addresses)- Admin Panel — platform settings stored in the
configdatabase table
The .env File
The template is .env.example. In dev environments it is copied automatically on first start.
Application
| Variable | Purpose |
|---|---|
APP_KEY | Encryption key |
APP_ENV | local or production |
APP_DEBUG | Debug mode |
APP_URL | Application base URL |
FORCE_HTTPS | Force HTTPS |
VITE_APP_NAME | Application name for frontend build |
Database
| Variable | Purpose |
|---|---|
DB_CONNECTION | Driver (mysql) |
DB_HOST | Host |
DB_PORT | Port |
DB_DATABASE | Database name |
DB_USERNAME | User |
DB_PASSWORD | Password |
Redis
| Variable | Purpose |
|---|---|
REDIS_HOST | Host |
REDIS_PORT | Port |
REDIS_PASSWORD | Password |
CACHE_DRIVER | Cache driver |
QUEUE_CONNECTION | Queue driver |
SESSION_DRIVER | Session driver |
WebSocket (Reverb)
| Variable | Purpose |
|---|---|
BROADCAST_DRIVER | reverb |
REVERB_APP_ID | App ID |
REVERB_APP_KEY | Key |
REVERB_APP_SECRET | Secret |
REVERB_HOST | Host |
REVERB_PORT | Port |
REVERB_SCHEME | http or https |
VITE_REVERB_APP_KEY | Key for frontend build |
VITE_REVERB_HOST | Host for frontend build |
VITE_REVERB_PORT | Port for frontend build |
VITE_REVERB_SCHEME | Scheme for frontend build |
Media
| Variable | Purpose |
|---|---|
CLOUDINARY_URL | Cloudinary 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.
Search
| Variable | Purpose |
|---|---|
SCOUT_DRIVER | Search 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):
| Variable | Purpose |
|---|---|
VITE_TENOR_API_KEY | Tenor API key |
VITE_TENOR_CLIENT_KEY | Tenor client key |
Without these keys, GIF search in the editor is disabled.
Frontend
| Variable | Purpose |
|---|---|
VITE_APP_LOCALE | Language for initial seed and production build (ru or en) |
VITE_DEV_SERVER_URL | Vite dev server URL (dev only) |
Admin Panel Settings
The following parameters are stored in the database and are not duplicated in .env:
| Section | Path | What it configures |
|---|---|---|
| General | /admin-panel/settings/general | Site name, logo, language |
| Site Appearance | /admin-panel/settings/appearance | Public theme CSS variables |
| SEO | /admin-panel/settings/seo | Meta tags, Open Graph |
| Cookie Banner | /admin-panel/settings/cookie-consent | Cookie consent banner |
/admin-panel/settings/mail | SMTP (applied via MailServiceProvider) | |
| Authentication | /admin-panel/settings/auth | OAuth, one-tap login, verification |
| Content | /admin-panel/settings/content | Publishing restrictions |
| Media | /admin-panel/settings/media | Storage, limits, MIME types |
| Sidebar | /admin-panel/settings/sidebar | Sidebar widgets |
| Sidebar Footer | /admin-panel/settings/footer | Links and social icons |
| Topics in Sidebar | /admin-panel/settings/topic-display | Featured topics |
| Additional Scripts | /admin-panel/settings/additional-scripts | Custom HTML/JS/CSS |
| Rating | /admin-panel/settings/rating | Rating system |
| AI | /admin-panel/ai-settings | OpenAI API keys and model |
| Moderation | /admin-panel/moderation-settings | AI text moderation |
| Image Moderation | /admin-panel/image-moderation-settings | Yandex Vision |
| Bot | /admin-panel/chat-gpt-bot | AI comment bot |
| Payment Provider | /admin-panel/subscription-payment-provider | YooKassa / T-Bank |
| Access (Horizon / Log Viewer) | /admin-panel/system/access | horizonAdmins, logViewerAdmins |
Settings take effect without restarting the container. On first run, ConfigSeeder populates initial values.
Applying Changes
| Change | Restart |
|---|---|
.env | docker compose restart app |
| Admin Panel | not needed |
VITE_* (production) | rebuild frontend image |