Reference
Environment variable specification
Every setting in these images is an environment variable, so you can change PHP, the web server, and the Laravel automations without mounting config files.
Set them in your compose.yml:
compose.yml
services:
php:
image: serversideup/php:8.5-fpm-nginx
environment:
PHP_MEMORY_LIMIT: "512M"
PHP_OPCACHE_ENABLE: "1"
Search by name or setting, or pick a variation to see only the variables it reads, with its defaults. Select a variable for its accepted values, the official docs, and a line to copy into compose.yml. An empty default ("") leaves the setting off.
/
135 variables
- fpm-apache
/var/www/html/publicDirectory Apache serves files from. Set/var/www/htmlfor apps without apublic/folder. - fpm-apache
8080Port Apache listens on for HTTP inside the container. - fpm-apache
8443Port Apache listens on for HTTPS inside the container. - fpm-apache
0Connections an Apache process handles before it restarts.0never restarts. - fpm-apache
150Most requests Apache serves at once. - fpm-apache
75Most idle threads Apache keeps. - fpm-apache
10Fewest idle threads Apache keeps. - fpm-apache
www-dataThe group Apache runs as when started as root. Same build-time limit asAPACHE_RUN_USER. - fpm-apache
www-dataThe user Apache runs as when started as root. Written into/etc/apache2/envvarsat build time, so changing it at runtime has no effect. - fpm-apache
2Apache processes started at launch. - fpm-apache
64Upper limit forAPACHE_THREADS_PER_CHILD. - fpm-apache
25Threads each Apache process runs. - All variations
/var/www/htmlWhere your app lives in the container. If you change it, also changeNGINX_WEBROOT,APACHE_DOCUMENT_ROOT, orCADDY_SERVER_ROOT. - All variations Requires
AUTORUN_ENABLEDfalsePrint each automation step and theAUTORUN_*values it read, plus the database errors while it waits for the database.LOG_OUTPUT_LEVEL=debugprints the steps but not the database errors. - All variations
falseRun the Laravel automations (storage link, migrations, and caches) each time the container starts. They run whatever the container's command is, so turn them on for one service only, not your workers.DISABLE_DEFAULT_CONFIG=truealso turns them off. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan config:cacheso Laravel loads its config from one cached file. Once config is cached, Laravel stops reading.env, soenv()outside your config files only sees the container's environment variables. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan event:cacheso Laravel reads its event listeners from a cache instead of scanning yourListenersdirectory on every request. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan migrateat start-up, after clearing the config cache and waiting for the database.AUTORUN_LARAVEL_MIGRATION_MODEpicks the command, and the variables below add flags. - All variations Requires
AUTORUN_ENABLED""Connections to migrate, comma-separated, such asmysql,pgsql. Empty uses the default connection. - All variations Requires
AUTORUN_ENABLEDtrueAdd--forceso migrations run without the confirmation prompt Laravel shows whenAPP_ENV=production. A container can't answer it, so withfalsein production Laravel cancels the migration and the container stops. - All variations Requires
AUTORUN_ENABLEDfalseAdd--isolatedso only one container migrates at a time. Needs a default cache store that supports atomic locks, shared by every host that runs migrations, anddefaultmode; any other mode stops the container. Laravel older than 9.38.0 migrates without it, and the first deploy skips it until the migrations table exists. - All variations Requires
AUTORUN_ENABLEDdefaultPick the migrate command:default(migrate),fresh(migrate:fresh), orrefresh(migrate:refresh).freshandrefreshdrop every table, so use them only in development. - All variations Requires
AUTORUN_ENABLEDfalseAdd--seedto run your database seeders after migrating. They run on every start, so make them safe to repeat. - All variations Requires
AUTORUN_ENABLEDfalseMigrate right away instead of first waiting for the database to accept connections. - All variations Requires
AUTORUN_ENABLED30Seconds to wait for the database to accept connections before migrating, trying once a second. A host that never answers holds each try for the driver's connect timeout, so the wait can run much longer. If the database isn't ready in time, the container stops. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan optimize, which caches config, events, routes, and views in one command on Laravel 11 and newer. Turn one cache off with its variable below and the image leaves it out with--except(Laravel 11.38.0+) or runs the other*:cachecommands one by one. Withfalse, only the cache variables set totruerun. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan route:cacheso Laravel registers your routes from one cached file instead of loading every route file on each request. - All variations Requires
AUTORUN_ENABLEDfalseSkip without failing when there's no Laravel inAPP_BASE_DIR, such as before the firstcomposer install. Laravel counts as found whenartisanandvendor/both exist. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan storage:linkso files instorage/app/publicare served frompublic/storage. Skipped whenpublic/storagealready exists. - All variations Requires
AUTORUN_ENABLEDtrueRunphp artisan view:cacheto compile every Blade template at start-up, so no visitor waits for a page to compile. - frankenphp
offLet's Encrypt certificate profile.shortlivedissues certificates that last about six days and renew every few days; it's also needed for IP-address certificates. Any profile other thanoffdrops Caddy's ZeroSSL fallback, so the container needs reliable outbound access to Let's Encrypt. - frankenphp
offCaddy's admin API, which can reconfigure the server. Ignored under Laravel Octane, which turns it on for itself onlocalhost. - frankenphp
offWhether Caddy gets certificates and redirects HTTP to HTTPS on its own. - frankenphp
""Extra Caddy global options. Ignored under Laravel Octane, which overwrites it; use a file in/etc/frankenphp/caddyfile-global.d/instead. - frankenphp
8080Port Caddy listens on for HTTP inside the container. - frankenphp
http://Site address Caddy answers on for HTTP. The defaulthttp://answers any hostname. - frankenphp
8443Port Caddy listens on for HTTPS inside the container. - frankenphp
https://Site address Caddy answers on for HTTPS. Set your domain here, such ashttps://example.com. - frankenphp
autoFormat of Caddy's logs.autowrites JSON in a container and readable lines in a terminal. Every format redacts theauthorizationquery parameter. Leaveautounder Laravel Octane, which only parses JSON. - frankenphp
stderrWhere Caddy writes its access and runtime logs. Leavestderrunder Laravel Octane, which only relaysstderr. - frankenphp
""Extra directives inside thephp_serverblock. - frankenphp
localhostSet by Laravel Octane, so you don't set it. Host of the Caddy admin API thatoctane:status,octane:reload, andoctane:stopcall. - frankenphp
2019Set by Laravel Octane, so you don't set it. Port of the Caddy admin API, from Octane's--admin-portor derived from--port:--port=8080gives2099. - frankenphp
""Extra Caddyfile directives for your site. Laravel Octane overwrites it, so prefer a file in/etc/frankenphp/caddyfile-server.d/. See adding your own Caddyfile rules. - frankenphp
UnsetCaddy's log level. When unset, it followsLOG_OUTPUT_LEVEL. Under Laravel Octane, useoctane:start --log-levelinstead. - frankenphp
/var/www/html/publicDirectory Caddy serves files from. Set/var/www/htmlfor apps without apublic/folder. - frankenphp
""Set by Laravel Octane, so you don't set it. Holds thewatchdirectives from--watchand thewatchpaths inconfig/octane.php. - frankenphp
""Set by Laravel Octane, so you don't set it. Holds the worker settings from--workersfor theworkerblock that loadsfrankenphp-worker.php. - All variations
1Hide Composer's warning about running as root. - All variations
/composerComposer's global directory, shared by every project. It holds global config,auth.json, and globally required packages. - All variations
24Parallel Composer downloads,1to50. Composer's own default is12, and raising it further rarely helps. Lower it if your proxy struggles. - All variations
falsetrueskips the image's start-up scripts and automations, so you configure everything yourself. That includes the web server configuration, sofpm-nginxandfpm-apacheneed your own. Your own scripts in/etc/entrypoint.d/still run. - frankenphp
""Directives inside the globalfrankenphpblock, such asnum_threads. - frankenphp
cgocheck=0Go runtime settings for FrankenPHP.cgocheck=0skips Go's pointer checks on every call into PHP, like the official FrankenPHP images. - fpm-nginx · fpm-apache · frankenphp
/healthcheckPath the container health check requests, left out of access logs. The image answers/healthcheckitself; set an app route such as/upto check your app instead. - frankenphp
/etc/ssl/healthcheck/localhost.crtSelf-signed certificate for the health check onlocalhostwhenSSL_MODE=full. The image generates it at start-up wheneverSSL_MODEisn'toff. - frankenphp
/etc/ssl/healthcheck/localhost.keyPrivate key for the health check certificate. - frankenphp
0Set by Laravel Octane, so you don't set it. Octane passes1, which runsfrankenphp-worker.phpas a worker and turns on the admin API. If you set it yourself, only1and0work; anything else, such astrueor an empty string, stops FrankenPHP with a "File to import not found" error. See Laravel Octane. - All variations
warnHow much PHP, PHP-FPM, and the web server log.debugalso shows every PHP error and traces the entrypoint. FrankenPHP defaults toinfobecause Caddy logs requests at that level. - frankenphp
""Extra hub directives, one per line, such asanonymousorcors_origins. - frankenphp
HS256Algorithm for publisher tokens. A PEM key needs an asymmetric one, such asRS256. - frankenphp
UnsetShared secret or PEM public key that verifies publisher tokens. - frankenphp
HS256Algorithm for subscriber tokens. - frankenphp
UnsetShared secret or PEM public key that verifies subscriber tokens. - frankenphp
https://localhostTheissclaim tokens must carry, usually your app's URL. Tokens are verified only with the keys of the issuer they claim. - fpm-nginx
/dev/stdoutWhere NGINX writes access logs. The default sends them to the container log. - fpm-nginx
100MLargest request body NGINX accepts. Keep it in line withPHP_POST_MAX_SIZE. - fpm-nginx
/dev/stderrWhere NGINX writes errors. The default sends them to the container log. - fpm-nginx
8kBuffer for the first part of a PHP-FPM response, which holds the headers. Raise it if large headers cause502errors. - fpm-nginx
8 8kNumber and size of the buffers NGINX uses to read a response from PHP-FPM. Raise it if large responses get written to disk. - fpm-nginx
8080Port NGINX listens on for HTTP inside the container. - fpm-nginx
8443Port NGINX listens on for HTTPS inside the container. - fpm-nginx
allWhich IP versions NGINX listens on. Useipv4on hosts without IPv6. - fpm-nginx
offShow the NGINX version in theServerheader and on error pages. - fpm-nginx
/var/www/html/publicDirectory NGINX serves files from. Set/var/www/htmlfor apps without apublic/folder. - All variations
UTCDefault timezone for PHP date and time functions. - All variations
""PHP functions to turn off, comma-separated, such asexec,shell_exec. Empty by default because Laravel, Composer, and Symfony Process needproc_open. - All variations
OffShow PHP errors in the response. Keep itOffin production; errors still go to the log. - All variations
OffShow errors that happen while PHP starts, before your code runs. - All variations
/dev/stderrWhere PHP writes errors. The default sends them to the container log. - All variations
22527Which errors PHP reports, as a number.22527isE_ALL & ~E_DEPRECATED & ~E_STRICT: everything except deprecation and strict notices. This calculator works out other values. - All variations
OnAllow file uploads in HTTP requests. - fpm · fpm-nginx · fpm-apache
www-dataGroup PHP-FPM workers run as. Only used when the container runs as root. - fpm · fpm-nginx · fpm-apache
www-dataUser PHP-FPM workers run as. Only used when the container runs as root. - fpm · fpm-nginx · fpm-apache
dynamicHow PHP-FPM manages workers.statickeeps a fixed number running,dynamickeeps a few spare, andondemandstarts them as requests arrive. - fpm · fpm-nginx · fpm-apache
20Most PHP-FPM workers at once, which caps how many requests run in parallel. Withstatic, it's the exact number of workers. See PHP-FPM workers. - fpm · fpm-nginx · fpm-apache
0Requests a worker handles before it restarts, which limits memory leaks.0never restarts. - fpm · fpm-nginx · fpm-apache
3Most idle workers to keep. Only used withdynamic. - fpm · fpm-nginx · fpm-apache
1Fewest idle workers to keep. Only used withdynamic. - fpm · fpm-nginx · fpm-apache
2Workers started with PHP-FPM. Only used withdynamic. - fpm · fpm-nginx · fpm-apache
/statusURL path for the PHP-FPM status page. Thefpmvariation's health check reads/status, so changing it there fails the health check. - fpm · fpm-nginx · fpm-apache
wwwName of the PHP-FPM pool, shown in logs and on the status page. - fpm · fpm-nginx · fpm-apache
10sHow long workers get to react to a stop or reload signal from PHP-FPM before they are killed. - All variations
OnFormat displayed errors as HTML. Only affects errors shown on screen; PHP always turns it off for the CLI. - All variations
99Seconds a script may run before PHP stops it. On Linux, time spent waiting on the database, network, or other system calls doesn't count. - All variations
20Most files one request can upload. - All variations
-1Seconds PHP may spend reading request input, such as POST data and uploads.-1usesPHP_MAX_EXECUTION_TIMEand0removes the limit. The CLI always uses-1. - All variations
1000Most input variables PHP accepts per request, counted separately for query strings, POST data, and cookies. Raise it for very large forms. - All variations
256MMost memory one script may use, such as512M.-1removes the limit. - All variations
0Keep compiled PHP in memory so requests skip parsing and compiling. Set1in production. See production performance tuning. - All variations
1Use OPcache forphpcommands too. Only matters when OPcache is on.0keeps it to the web server, so a preload script doesn't run on everyphpcommand. - All variations
0Answerfile_exists(),is_file(), andis_readable()from the cache for files that are already cached. WithPHP_OPCACHE_VALIDATE_TIMESTAMPSoff, a file deleted after it was cached still looks present. - All variations
180Seconds to wait for a pending cache reset before OPcache kills the processes still holding the old cache. - All variations
32Memory, in MB, for storing repeated strings once. It comes out ofPHP_OPCACHE_MEMORY_CONSUMPTION. - All variations
offPHP's just-in-time compiler. To use it, settracingand a non-zeroPHP_OPCACHE_JIT_BUFFER_SIZE. - All variations
0Memory for JIT-compiled code, such as64M.0leaves the JIT off. Added on top ofPHP_OPCACHE_MEMORY_CONSUMPTION. - All variations
32531Most scripts OPcache can hold. PHP rounds up to a prime, and32531is one. - All variations
256Shared memory for the cache, in MB. It fills only as files are cached. - All variations
""Path to a script that loads classes into memory when PHP starts. Empty turns preloading off. It also runs on everyphpcommand unlessPHP_OPCACHE_ENABLE_CLI=0. See preloading. - All variations
""User the preload script runs as. Required to preload when the container runs as root. - All variations
2Seconds between checks for changed files. Only used whenPHP_OPCACHE_VALIDATE_TIMESTAMPS=1. - All variations
1Keep doc comments in the cache.0breaks code that reads PHPDoc annotations, such as Doctrine and PHPUnit. - All variations
0Check cached files for changes. With0, code changes need a container restart. Set1if you mount your code and keep OPcache on. - All variations
""Limit the files PHP can open to these directories, separated by:. It's a safety net, not a security boundary. Setting it turns off the realpath cache. - All variations
100MLargest request body PHP accepts. Keep it at least as large asPHP_UPLOAD_MAX_FILE_SIZE. - All variations
4096KMemory PHP uses to remember resolved file paths, which saves file system lookups on every request. Raise it for apps with a largevendor/directory. See realpath cache. - All variations
600Seconds PHP keeps a resolved file path in the cache.600follows Symfony's recommendation. - All variations
0Track upload progress in the session. Off because of PHP's October 23, 2026 advisory. Only set1if your app reads upload progress and never changessession.serialize_handlerat runtime. - All variations
100MLargest single file PHP accepts in an upload. - All variations
""Check scripts for a byte order mark to detect their encoding. Only used whenPHP_ZEND_MULTIBYTEis on. - All variations
OffParse scripts written in multibyte encodings such as Shift JIS. Most apps leave it off. - fpm-nginx · fpm-apache
2Stop the container if a start-up service fails. - fpm-nginx · fpm-apache
0Milliseconds to wait for services to start before giving up.0waits forever. - fpm-nginx · fpm-apache
1Pass the container's environment to every service. - fpm-nginx · fpm-apache
1How much S6 Overlay logs, from0to5.1prints warnings and errors. Raise it first when a service won't start. - All variations
truePrint the container information banner at start-up. - fpm-nginx · fpm-apache · frankenphp
/etc/ssl/private/self-signed-web.crtPath to the TLS certificate. WhenSSL_MODEisn'toffand neither this file nor the private key exists, the image generates a self-signed pair; if only one exists, the container stops. FrankenPHP ignores it whenCADDY_AUTO_HTTPS=on. - fpm-nginx · fpm-apache · frankenphp
offWhether the web server serves HTTP, HTTPS, or both.mixedserves both, andfullredirects HTTP to HTTPS. With native PHP sessions over HTTPS, also setPHP_SESSION_COOKIE_SECURE=true. - fpm-nginx · fpm-apache · frankenphp
/etc/ssl/private/self-signed-web.keyPath to the TLS private key. - fpm-nginx · fpm-apache · frankenphp
cloudflareWhich proxies may pass the visitor's real IP address to your app. - frankenphp
/configWhere Caddy saves its autosaved config. - frankenphp
/dataWhere Caddy stores certificates. Mount a volume here if Caddy issues certificates, so they survive restarts.