Environment Variables
This page lists all environment variables that can be used to configure Shopware.
| Variable | Default Value | Description |
|---|---|---|
ADMIN_OPENSEARCH_URL | (empty) | OpenSearch URL for administration |
APP_BUILD_DIR | {projectRoot}/var/cache | Path to a temporary directory to create cache folder (since 6.6.8.0) |
APP_CACHE_DIR | {projectRoot}/var/cache | Path to a directory to store caches (since 6.6.8.0) |
APP_ENV | prod | Environment |
APP_LOG_DIR | {projectRoot}/var/log | Path to a directory to store logs (since 6.6.8.0) |
APP_SECRET | (empty) | Can be generated with openssl rand -hex 32 |
APP_URL | (empty) | Where Shopware will be accessible |
APP_URL_CHECK_DISABLED | false | Disable URL validation checks |
BLUE_GREEN_DEPLOYMENT | 0 | This needs super privilege to create trigger |
COMPOSER_HOME | /tmp/composer | Caching for the Plugin Manager |
COMPOSER_PLUGIN_LOADER | (empty) | When set to a non-empty value (e.g., 1 or true), enables the Composer plugin loader instead of the database plugin loader. All plugins defined in the root composer.json will be automatically active, regardless of database settings. |
DATABASE_PERSISTENT_CONNECTION | (empty) | When set to a non-empty value (e.g., 1), enables persistent database connections via PDO::ATTR_PERSISTENT. Useful for long-running worker processes to avoid repeated connection overhead. See Database connection options |
DATABASE_PROTOCOL_COMPRESSION | (empty) | When set to a non-empty value (e.g., 1), enables MySQL protocol compression (PDO::MYSQL_ATTR_COMPRESS) to reduce network traffic. See Database connection options |
DATABASE_SSL_CA | (empty) | Path to the SSL Certificate Authority file (PEM) for verifying a TLS database connection. Automatically applied by MySQLFactory — no manual Doctrine configuration needed. See Database SSL/TLS Setup. |
DATABASE_SSL_CERT | (empty) | Path to the SSL client certificate file (PEM) for mutual TLS. Automatically applied by MySQLFactory. See Database SSL/TLS Setup. |
DATABASE_SSL_DONT_VERIFY_SERVER_CERT | (empty) | When set to 1, skips server certificate verification (non-production only). Requires PHP 8.2+. Automatically applied by MySQLFactory. See Database SSL/TLS Setup. |
DATABASE_SSL_KEY | (empty) | Path to the SSL client private key file (PEM) for mutual TLS. Automatically applied by MySQLFactory. See Database SSL/TLS Setup. |
DATABASE_URL | (empty) | MySQL or MariaDB connection string as a DSN. Format: mysql://user:password@host:port/dbname. For TLS connections, use the DATABASE_SSL_* environment variables instead of query parameters. See Database SSL/TLS Setup. |
ENABLE_OPENSEARCH_FOR_ADMIN_API | (empty) | When set to 1, applies OpenSearch globally for supported Admin API searches and listings in Administration. Requires ADMIN_OPENSEARCH_URL and SHOPWARE_ADMIN_ES_ENABLED=1 to be configured. Experimental feature (since 6.7.9.0) |
ENABLE_SERVICES | auto | Determines if services are enabled, auto detects that based on APP_ENV, other possible values are true (or 1) and false (or 0). When set to 0, Shopware Services won't be installed on the system |
FASTLY_API_KEY | (empty) | API key for Fastly CDN integration. Keep this value secure and do not commit it to version control. |
GENERATE_SOURCEMAPS | (empty) | Set to true to emit JavaScript sourcemaps during production builds (NODE_ENV=production). Applies to the Storefront webpack build and all Vite builds (Administration core, Administration extension plugins, and Storefront components). Has no effect in non-production environments, where sourcemaps are always generated. Security note: sourcemaps may expose source code; enable only in trusted environments or configure your web server/CDN to not serve *.map files. (since 6.7.13.0) |
INSTANCE_ID | (empty) | Unique Identifier for the Store: Can be generated with openssl rand -hex 32 |
LOCK_DSN | flock | DSN for Symfony locking |
MAILER_DSN | null://localhost | Mailer DSN (Admin Configuration overwrites this) |
MESSENGER_TRANSPORT_DSN | (empty) | DSN for default async queue (example: amqp://guest:guest@localhost:5672/%2f/default) |
MESSENGER_TRANSPORT_FAILURE_DSN | (empty) | DSN for failed messages queue (example: amqp://guest:guest@localhost:5672/%2f/failure) |
MESSENGER_TRANSPORT_LOW_PRIORITY_DSN | (empty) | DSN for low priority queue (example: amqp://guest:guest@localhost:5672/%2f/low_prio) |
OPENSEARCH_URL | (empty) | Open Search Hosts |
REDIS_PREFIX | (empty) | Prefix for Redis keys |
REDIS_URL | (empty) | Redis connection URL for caching and sessions (example: redis://host:port) |
SHOPWARE_ADMIN_ES_ENABLED | (empty) | Enable Elasticsearch for administration |
SHOPWARE_ADMIN_ES_INDEX_PREFIX | sw-admin | Index prefix for administration Elasticsearch |
SHOPWARE_ADMIN_ES_INDEXING_BATCH_SIZE | 1000 | Batch size for administration Elasticsearch indexing (since 6.7.9.0) |
SHOPWARE_ADMIN_ES_REFRESH_INDICES | (empty) | Refresh administration indices |
SHOPWARE_ADMIN_ES_THROW_EXCEPTION | 1 | Whether to throw exceptions on administration Elasticsearch errors (1 to enable, 0 to disable). Mainly useful in local development for debugging (since 6.7.9.0) |
SHOPWARE_ADMINISTRATION_PATH_NAME | admin | Custom path name for administration interface |
SHOPWARE_DBAL_TIMEZONE_SUPPORT_ENABLED | 0 | Enable timezone support in DBAL |
SHOPWARE_DBAL_TOKEN_MINIMUM_LENGTH | 3 | Minimum token length for DBAL (@deprecated v6.8.0) |
SHOPWARE_DISABLE_UPDATE_CHECK | (empty) | Disable automatic update checks |
SHOPWARE_ES_DIMENSION_NORMALIZE | 0 | Normalizes dimensional notation in the technical-term analyzer chains so that spaced and joined forms match (for example 5 x 70 → 5x70). Disabled by default; enabling it requires a full reindex via bin/console es:index (since 6.7.12.0). |
SHOPWARE_ES_ENABLED | 0 | Open Search Support Enabled? |
SHOPWARE_ES_EXCLUDE_SOURCE | 0 | Exclude source from Elasticsearch |
SHOPWARE_ES_INDEX_PREFIX | (empty) | Open Search Index Prefix |
SHOPWARE_ES_INDEXING_BATCH_SIZE | 100 | Batch size for Elasticsearch indexing |
SHOPWARE_ES_INDEXING_ENABLED | 0 | Open Search Indexing Enabled? |
SHOPWARE_ES_NGRAM_MAX_GRAM | 5 | Maximum n-gram size for Elasticsearch |
SHOPWARE_ES_NGRAM_MIN_GRAM | 4 | Minimum n-gram size for Elasticsearch |
SHOPWARE_ES_THROW_EXCEPTION | 1 | Whether to throw exceptions on Elasticsearch errors (1 to enable, 0 to disable) |
SHOPWARE_ES_USE_LANGUAGE_ANALYZER | 1 | Controls whether language-specific analyzers (like sw_english_analyzer, sw_german_analyzer) are used for search queries. When set to 1, search queries use the same analyzer as the indexed field, providing broader, more fuzzy search results. When set to 0, search queries use sw_whitespace_analyzer instead, providing less fuzzy search results with fewer matches. |
SHOPWARE_HTTP_CACHE_ENABLED | 1 | Is HTTP Cache enabled? |
SHOPWARE_HTTP_DEFAULT_TTL | 7200 | Default TTL for HTTP Cache |