Skip to content

AzuraCast Settings

Environment Variables

There are 2 files with environment variables that can change different aspects of AzuraCast.

Remember to restart AzuraCast after changing values in these files via:

docker-compose down
docker-compose up -d

The .env File

The .env file is used by Docker itself to determine how certain parts of the infrastructure is set up.

The default .env file contains the following variables:

VariableDefault ValueDescription
COMPOSE_PROJECT_NAMEazuracastAn internal variable used by Docker Compose; this should not be changed.
AZURACAST_HTTP_PORT80The port used to serve insecure HTTP web traffic.
AZURACAST_HTTPS_PORT443The port used to serve secure HTTPS web traffic.
AZURACAST_SFTP_PORT2022The port used to listen for incoming SFTP connections (used for bulk file management).
NGINX_TIMEOUT1800The time limit (in seconds) that nginx will wait for a response from the PHP application. Corresponds with proxy_read_timeout on the proxy and fastcgi_read_timeout on the web container. This should match your longest timeout value in azuracast.env.
AZURACAST_PUID1000The effective User ID (UID) of the user inside Docker. Matching this to your host UID (id -u) can fix permission issues.
AZURACAST_PGID1000The effective Group ID (GID) of the user inside Docker. Matching this to your host GID (id -g) can fix permission issues.
AZURACAST_COMPOSE_PRIVILEGEDtrueUse privileged Docker settings that may not work in nested virtualization environments.

If you don’t want to manually edit this file, you can also change the HTTP, HTTPS and SFTP ports by running ./docker.sh change-ports.

The azuracast.env File

The default azuracast.env contains the following variables:

AzuraCast Customization

VariableDefault ValueDescription
APPLICATION_ENVproductionThe application environment.
Valid options: production, development, testing
LOG_LEVELnoticeThis allows you to log debug-level errors temporarily (for problem-solving) or reduce the volume of logs that are produced by your installation, without needing to modify whether your installation is a production or development instance.
Valid options: debug, info, notice, warning, error, critical, alert, emergency
COMPOSER_PLUGIN_MODEfalseEnable the composer “merge” functionality to combine the main application’s composer.json file with any plugins’ composer files. This can have performance implications, so you should only use it if you use one or more plugins with their own Composer dependencies.
Valid options: true, false
AUTO_ASSIGN_PORT_MIN8000The minimum port number to use when automatically assigning ports to a station. By default, this matches the first forwarded port on the “stations” container. You can modify this variable if your station port range is different. Be sure to also forward the necessary ports via docker-compose.yml (and nginx, if you want to use the built-in port-80/443 proxy)!

Database Configuration

VariableDefault ValueDescription
MYSQL_HOSTmariadbThe host to connect to. Leave this as the default value unless you’re connecting to an external database server.
MYSQL_PORT3306The port to connect to. Leave this as the default value unless you’re connecting to an external database server.
MYSQL_USERazuracastThe username AzuraCast will use to connect to the database.
MYSQL_PASSWORDazur4c457The password AzuraCast will use to connect to the database. By default, the database is not exposed to the Internet at all and this is only an internal password used by the service itself.
MYSQL_DATABASEazuracastThe name of the AzuraCast database.
MYSQL_RANDOM_ROOT_PASSWORDyesAutomatically generate a random root password upon the first database spin-up. This password will be visible in the mariadb container’s logs.
MYSQL_SLOW_QUERY_LOG0Log slower queries for the purpose of diagnosing issues. Only turn this on when you need to, by uncommenting this and switching it to 1. To read the slow query log once enabled, run: docker-compose exec mariadb slow_queries
MYSQL_MAX_CONNECTIONS100Set the amount of allowed connections to the database. This value should be increased if you are seeing the Too many connections error in the logs.

Redis Configuration

Uncomment these fields if you are using a third-party Redis host instead of the one provided with AzuraCast.

Do not modify these fields if you are using the standard AzuraCast Redis host.

VariableDefault ValueDescription
REDIS_HOSTredisName of the Redis host.
REDIS_PORT6379Port to connect to on the Redis host.
REDIS_DB1Database index to use on the Redis host.

Advanced Configuration

VariableDefault ValueDescription
PHP_MAX_FILE_SIZE25MPHP’s maximum POST body size and max upload filesize.
PHP_MEMORY_LIMIT128MPHP’s maximum memory limit.
PHP_MAX_EXECUTION_TIME30PHP’s maximum script execution time (in seconds).
SYNC_SHORT_EXECUTION_TIME600The maximum execution time (and lock timeout) for the 15-second, 1-minute and 5-minute synchronization tasks.
SYNC_LONG_EXECUTION_TIME1800The maximum execution time (and lock timeout) for the 1-hour synchronization task.
PHP_FPM_MAX_CHILDREN5Maximum number of PHP-FPM worker processes to spawn.
ADDITIONAL_MEDIA_SYNC_WORKER_COUNT0Create additional media sync worker processes. This setting can be used to increase the performance of the media sync process by creating additional worker processes to consume messages
PROFILING_EXTENSION_ENABLED0Enable the SPX profiling extension in the Docker container, allowing for performance analysis of each page load.