Environment Variable Specifications

We like to customize our images on a per app basis using environment variables. Look below to see what variables are available and what their defaults are. You can easily override them in your own docker environments (see Docker's documentation).

Variable NameDescriptionUsed in variation
PUID
Default: 9999
User ID the webserver and PHP should run as.all
PGID
Default: 9999
Group ID the webserver and PHP should run as.all
WEBUSER_HOME
Default: /var/www/html
BETA: You can change the home of the web user if needed.all (except *-nginx)
PHP_DATE_TIMEZONE
Default: "UTC"
Control your timezone. (Official Docs)fpm,
fpm-nginx,
fpm-apache
PHP_DISPLAY_ERRORS
Default: Off
Show PHP errors on screen. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_DISPLAY_STARTUP_ERRORS
Default: Off
Even when display_errors is on, errors that occur during PHP's startup sequence are not displayed. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_ERROR_REPORTING
Default: "22527"
Set PHP error reporting level. Must be a number. Use this tool for help. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_MAX_EXECUTION_TIME
Default: "99"
Set the maximum time in seconds a script is allowed to run before it is terminated by the parser. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_MEMORY_LIMIT
Default: "256M"
Set the maximum amount of memory in bytes that a script is allowed to allocate. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_OPEN_BASEDIR
Default:$WEBUSER_HOME:/dev/stdout:/tmp
Limit the files that can be accessed by PHP to the specified directory-tree, including the file itself.fpm,
fpm-nginx,
fpm-apache
PHP_PM_CONTROL
Defaults:
fpm: dynamic
fpm-apache: ondemand
fpm-nginx: ondemand
Choose how the process manager will control the number of child processes. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_PM_MAX_CHILDREN
Default: "20"
The number of child processes to be created when pm is set to static and the maximum number of child processes to be created when pm is set to dynamic. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_PM_MAX_SPARE_SERVERS
Default: "3"
The desired maximum number of idle server processes. Used only when pm is set to dynamic. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_SESSION_COOKIE_SECURE
Default: 1 (true)
Specifies whether cookies should only be sent over secure connections. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_PM_MIN_SPARE_SERVERS
Default: "1"
The desired minimum number of idle server processes. Used only when pm is set to dynamic. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_PM_START_SERVERS
Default: "2"
The number of child processes created on startup. Used only when pm is set to dynamic. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_POOL_NAME
Default: "www"
Set the name of your PHP-FPM pool (helpful when running multiple sites on a single server).fpm,
fpm-nginx,
fpm-apache
PHP_POST_MAX_SIZE
Default: "100M"
Sets max size of post data allowed. (Official docs)fpm,
fpm-nginx,
fpm-apache
PHP_UPLOAD_MAX_FILE_SIZE
Default: "100M"
The maximum size of an uploaded file. (Official docs)fpm,
fpm-nginx,
fpm-apache
AUTORUN_ENABLED
Default: "true"
Enable or disable all autoruns. It's advised to set this to false in certain CI environments (especially during a composer install)fpm,
fpm-nginx,
fpm-apache
AUTORUN_LARAVEL_STORAGE_LINK
Default: "true"
Automatically run "php artisan storage:link" on container startfpm,
fpm-nginx,
fpm-apache
AUTORUN_LARAVEL_MIGRATION
Default: "false"
Requires Laravel v9.38.0 or higher. Automatically run "php artisan migrate --force --isolated" on container start.fpm,
fpm-nginx,
fpm-apache
MSMTP_RELAY_SERVER_HOSTNAME
Default: "mailhog"

🚨 IMPORTANT: Change this value if you want emails to work. (we set it to Mailhog so our staging sites do not send emails out)
Server that should relay emails for MSMTP. (Official docs)fpm-nginx,
fpm-apache
MSMTP_RELAY_SERVER_PORT
Default: "1025" (default port for Mailhog)
Port the SMTP server is listening on. (Official docs)fpm-nginx,
fpm-apache
DEBUG_OUTPUT
Default: (undefined, false)
Set this variable to true if you want to put PHP and your web server in debug mode.fpm-nginx,
fpm-apache
APACHE_DOCUMENT_ROOT
Default: "/var/www/html"
Sets the directory from which Apache will serve files. (Official docs)fpm-apache
APACHE_MAX_CONNECTIONS_PER_CHILD
Default: "0"
Sets the limit on the number of connections that an individual child server process will handle.(Official docs)fpm-apache
APACHE_MAX_REQUEST_WORKERS
Default: "150"
Sets the limit on the number of simultaneous requests that will be served. (Official docs)fpm-apache
APACHE_MAX_SPARE_THREADS
Default: "75"
Maximum number of idle threads. (Official docs)fpm-apache
APACHE_MIN_SPARE_THREADS
Default: "10"
Minimum number of idle threads to handle request spikes. (Official docs)fpm-apache
APACHE_RUN_GROUP
Default: "webgroup"
Set the username of what Apache should run as.fpm-apache
APACHE_RUN_USER
Default: "webuser"
Set the username of what Apache should run as.fpm-apache
APACHE_START_SERVERS
Default: "2"
Sets the number of child server processes created on startup.(Official docs)fpm-apache
APACHE_THREAD_LIMIT
Default: "64"
Set the maximum configured value for ThreadsPerChild for the lifetime of the Apache httpd process. (Official docs)fpm-apache
APACHE_THREADS_PER_CHILD
Default: "25"
This directive sets the number of threads created by each child process. (Official docs)fpm-apache
COMPOSER_ALLOW_SUPERUSER
Default: "1"
Disable warning about running as super-userall
COMPOSER_HOME
Default: "/composer"
The COMPOSER_HOME var allows you to change the Composer home directory. This is a hidden, global (per-user on the machine) directory that is shared between all projects.all
COMPOSER_MAX_PARALLEL_HTTP
Default: "24"
Set to an integer to configure how many files can be downloaded in parallel. This defaults to 12 and must be between 1 and 50. If your proxy has issues with concurrency maybe you want to lower this. Increasing it should generally not result in performance gains.all
S6_VERBOSITY
Default: "1"
Set the verbosity of "S6 Overlay" (the init system these images are based on). The default is "1" (print warnings and errors). The scale goes from 1 to 5, but the output will quickly become very noisy. If you're having issues, start here. You can also customize many other variables. (Official docs)all
SSL_MODE
Default: "full"
Configure how you would like to handle SSL. This can be "off" (HTTP only), "mixed" (HTTP + HTTPS), or "full" (HTTPS only). If you use HTTP, you may need to also change PHP_SESSION_COOKIE_SECURE.fpm-nginx,
fpm-apache