Skip to content

Exposed Settings

VariableDefault
FRANKENPHP_MODEclassic (also supports worker)
FRANKENPHP_WORKER/opt/project/public/frankenphp-worker.php
FRANKENPHP_WORKERSunset (defaults to 2 x CPU cores)
FRANKENPHP_MAX_REQUESTSunset (no limit)
FRANKENPHP_WORKER_WATCHempty (PHP_ENV=development sets defaults)
REQUEST_TIMEOUT60 (seconds)
NODE_VERSION24 (also supports 22)

REQUEST_TIMEOUT sets PHP’s max_execution_time and Caddy’s read_body (+5s) and write (+10s) timeouts. The added buffer prevents Caddy from closing connections before PHP can return errors.

FRANKENPHP_WORKER_WATCH configures file patterns that trigger worker restarts (one pattern per line).

environment:
# Default development value for FRANKENPHP_WORKER_WATCH
FRANKENPHP_WORKER_WATCH: |
/opt/project/**/*.php
/opt/project/**/*.{yaml,yml}
/opt/project/.env*

Set PHP_ENV environment variable to development to switch to dev-friendly defaults. PHP_ENV defaults to production.

PHP_ENV applies these defaults (unless specific setting is explicitly overridden):

Environment Defaults (PHP_ENV)productiondevelopment
PHP_DISPLAY_ERRORSoffon
PHP_DISPLAY_STARTUP_ERRORSoffon
PHP_ERROR_REPORTINGE_ALL & ~E_DEPRECATEDE_ALL
PHP_XDEBUG_MODEoffdebug,develop
PHP_OPCACHE_VALIDATE_TIMESTAMPS01

Xdebug is available automatically in “classic” mode and with trigger in “worker” mode in development environment.

Other PHP settings:

VariableDefault
PHP_MEMORY_LIMIT256M
PHP_POST_MAX_SIZE8M
PHP_UPLOAD_MAX_SIZE2M
PHP_OPCACHE_MEMORY_CONSUMPTION256
PHP_OPCACHE_MAX_ACCELERATED_FILES20000
PHP_OPCACHE_INTERNED_STRINGS_BUFFER16
PHP_XDEBUG_START_WITH_REQUESTclassic: yes / worker: trigger
PHP_XDEBUG_START_UPON_ERRORclassic: yes / worker: default
PHP_XDEBUG_CLIENT_HOSThost.docker.internal
PHP_XDEBUG_CLIENT_PORT9003

Xdebug defaults are different in worker mode because it can cause workers to hang during boot unless explicitly triggered. For Herd-like “always on” debugging, use classic mode.

Some heavy or specialized PHP extensions are disabled by default to reduce memory footprint. To enable an opt-in extension, set its environment variable to on (for example, PHP_EXT_INTL=on enables the intl extension).

PHP_EXT_ALL=on enables all opt-in extensions. Individial overrides below can disable specific extensions even if PHP_EXT_ALL=on.

VariableDefault
PHP_EXT_BZ2off
PHP_EXT_FFIoff
PHP_EXT_FTPoff
PHP_EXT_GDoff
PHP_EXT_IMAGICKoff
PHP_EXT_INTLoff
PHP_EXT_LDAPoff
PHP_EXT_MEMCACHEDoff
PHP_EXT_MONGODBoff
PHP_EXT_SOCKETSoff
PHP_EXT_UVoff
PHP_EXT_XDEBUGoff

Boolean values accept multiple formats (case-insensitive): 1, on, true, yes to enable; 0, off, false, no to disable. This matches PHP’s native ini parsing behavior.

VariableDefault
SSH_KNOWN_HOSTSgithub.com,gitlab.com,bitbucket.org
SSH_KEY_PASSPHRASE-

The base FrankenPHP image can generate local HTTPS certificates automatically, but frankenstack defaults to conventional HTTP on :80 for better compatibility with common Docker tooling and reverse-proxy setups.

Use these variables to configure hostnames and opt into TLS behavior:

VariableDefault
SERVER_NAME:80
CADDY_TLS_MODEoff
CADDY_TLS_CERT_FILE-
CADDY_TLS_KEY_FILE-
CADDY_ACME_EMAIL-

Start with SERVER_NAME:

  • Keep :80 for local/development HTTP.
  • Set your real hostname (for example app.example.com) for production domains.

Then choose CADDY_TLS_MODE:

  • off: HTTP-only mode. This also disables Caddy automatic HTTPS.
  • auto: Caddy-managed certificates (typically ACME/Let’s Encrypt). Set SERVER_NAME to your domain, publish 80 and 443, and optionally set CADDY_ACME_EMAIL.
  • file: use certificate and key files from CADDY_TLS_CERT_FILE and CADDY_TLS_KEY_FILE. Both files are required and must be readable.

For more details on production custom-domain setups (Let’s Encrypt, Cloudflare Origin CA, and Cloudflare-only origin hardening), see Production Usage.