Configuration Reference
Bootstrap Configuration
These configuration options are special configuration options only configurable through environment variables (e.g. through the .env file).
INFO
There are no corresponding configuration options for these values in the app/config definitions because they are applied before the application container (and configuration) is loaded.
FILES_PATH
A path (relative or absolute) to the directory in which you would like to list. This may even be a path outside of the application directory. When left unset, the root application directory (i.e. the folder where index.php is located) will be listed.
An absolute or relative file path (string)
COMPILE_CONTAINER
Whether or not the application container will be compiled. When set to false the container will not be compiled and cached. If left unset the container will be compiled and cached on first run and the cached container will be reused on subsequent requests. Disabling this comes with a (likely negligible) performance hit. Generally this should not be changed but might be necessary to modify when running Directory Lister on a read-only filesystem.
false or <unset>
Runtime Configuration
General application runtime configuration can be controlled through environment variables. This can be accomplished via an .env file located in the root of your application. An example file is provided as .env.example.
INFO
Advanced configuration can be accomplished via the app config located at app/config/app.php. However, changes to this file will need to be manually re-applied between upgrades. It is highly recommended to stick to environment variables for controlling app configuration unless absolutely necessary.
APP_DEBUG
Enable application debugging and display error messages.
DANGER
It is recommended that debug remains OFF unless troubleshooting an issue. Leaving this enabled WILL cause leakage of sensitive server information.
true or false
APP_LANGUAGE
The application's interface language.
See the app/translations folder for available translations.
DATE_FORMAT
The format used for rendering dates in the application views.
See the PHP date format documentation for possible values.
DIRECT_LINKS
Comma separated list of file matching patterns to be directly linked. Directly linked files will not be served by Directory Lister but handled by the web server directly.
WARNING
This setting has no effect when FILES_PATH is set or when used in the Docker container.
Example
To directly link all .htm, .html one or more folders deep and .php files in all folders and sub-folders.
DIRECT_LINKS=**/index.{htm,html},**.phpA comma separated list of file matching patterns.
DISPLAY_READMES
Parse and render README files on the page.
true or false
HIDDEN_FILES_LIST
File containing hidden file definitions. Will be merged with definitions from the 'hidden_files' configuration option.
INFO
See the Hiding Files page for additional info on hiding files.
A path (string) to a file
HIDE_APP_FILES
Hide application specific files/directories (i.e. index.php and the app folder).
true or false
HIDE_DOT_FILES
Hide dot files/directories from the listing.
true or false
HIDE_VCS_FILES
Hide the files Version Control Systems (i.e. Git and Mercurial) use to store their metadata.
true or false
HOME_TEXT
Text of the home link in the navigation breadcrumbs. If undefined or null will use the translated form of "home" from your selected language.
Any string
MAX_HASH_SIZE
The maximum file size (in bytes) that can be hashed. This helps to prevent timeouts for excessively large files.
WARNING
The larger a file is the longer it will take to calculate hashes for that file.
Any positive integer 0 - 9223372036854775807 (PHP_INT_MAX)
META_DESCRIPTION
Meta tag description (i.e. <meta name="description">) text.
Any string
READMES_FIRST
Show READMEs before the file listing.
true or false
REVERSE_SORT
When enabled, reverses the order of files (after sorting is applied).
true or false
SITE_TITLE
The title of your directory listing. This will be displayed in the browser tab/title bar along with the current path.
Any string
SORT_ORDER
Sorting order of files and folders. Can be one of several predefined values. Advanced sorting configuration can be achieved by using an anonymous function. See the sort_order configuration option documentation for more information.
type, natural, name, accessed, changed, modified, <anonymous function>
TIMEZONE
Time zone used for date formatting.
For a list of supported time zones see: https://www.php.net/manual/en/timezones.php.
ZIP_DOWNLOADS
Enable downloading of directories as a zip archive.
true or false
ZIP_COMPRESS
Compress Zip using Deflate. Enabling this option prevents file size estimation and it may prevent zip download resuming when paused.
true or false
Cache Configuration
Application cache configuration is also controlled through environment variables. This can be accomplished via an .env file located in the root of your application. An example file is provided as .env.example.
INFO
Advanced configuration can be accomplished via the cache config located at app/config/cache.php. However, changes to this file will need to be manually re-applied between upgrades. It is highly recommended to stick to environment variables for controlling cache configuration unless absolutely necessary.
CACHE_DRIVER
The application cache driver. Setting this value to array will disable the cache across requests. Additional driver-specific options may be required with certain values.
apcu, array, file, memcached, redis, php-file, valkey
CACHE_LIFETIME
The app cache lifetime (in seconds). Setting this value to 0 will cache indefinitely.
Any positive integer
CACHE_LOTTERY
Some cache drivers require manually pruning the cache periodically to remove expired items. This is the percentage chance (out of 100) of a request "winning" the lottery causing the cache to be pruned.
Any integer betweeen 1 and 100
MEMCACHED_HOST
The Memcached server hostname or IP address.
Any string
INFO
Advanced Memcached configuration is possible via the memcached_config option in app/config/cache.php
MEMCACHED_PORT
The Memcached server port.
Any valid port as an integer (0 to 65535)
INFO
Advanced Memcached configuration is possible via the memcached_config option in app/config/cache.php
REDIS_HOST
The Redis server hostname or IP address.
Any string
INFO
Advanced Redis configuration is possible via the redis_config option in app/config/cache.php
REDIS_PORT
The Redis server port.
Any valid port as an integer (0 to 65535)
INFO
Advanced Redis configuration is possible via the redis_config option in app/config/cache.php
VIEW_CACHE
Path to the view cache directory. Set to false to disable view caching entirely.
A directory path as a string or false to disable the view cache entirely
Icon Configuration
The icon config is located at app/config/icons.php. Here is where file types are mapped to their respective icons. The mapping is a PHP array where the array key is the file extension (without a preceding dot) and the array value is the desired Font Awesome class names.
return [
'icons' => [
'7z' => 'fas fa-file-archive',
'aac' => 'fas fa-music',
'accdb' => 'fas fa-database',
'ai' => 'fas fa-image',
'aif' => 'fas fa-music',
'apk' => 'fab fa-android',
'app' => 'fas fa-window',
'avi' => 'fas fa-video',
'bak' => 'fas fa-save',
'bat' => 'fas fa-terminal',
// etc...
],
];