ENABLE_SERVICES: the Shopware env var that quietly installs apps on your shop
Fabian Blechschmidt
I was grepping through vendor/shopware/core for the hidden-gems series and stumbled over Shopware\Core\Service\AllServiceInstaller. Two-argument constructor, twelve lines of logic, @internal. Nothing dramatic — until I read what it actually does: it installs apps on your shop. By itself. In production. Once a day. Unless you told it not to.
So this one isn’t going to be hidden-gem #25. It turns out ENABLE_SERVICESis in the docs — one row in the environment variables table:
ENABLE_SERVICES (default auto) — Determines if services are enabled, auto detects that based on APP_ENV. […] When set to 0, Shopware Services won’t be installed on the system.
Fair enough, documented. But that one line doesn’t tell you what gets installed, when, or that it happens automatically and repeatedly — so I kept reading.
What „auto“ actually means
AllServiceInstaller::install() (Service/AllServiceInstaller.php:37-49) starts like this:
// auto means not explicitly enabled, then we enable it based on the app environment
if ($this->enabled === self::AUTO_ENABLED) {
$enabled = $this->appEnv === 'prod';
} else {
$enabled = filter_var($this->enabled, \FILTER_VALIDATE_BOOLEAN);
}
if (!$enabled) {
return [];
}
Translation: if you never set ENABLE_SERVICES, and APP_ENV=prod, it’s on. I checked our own .env — no ENABLE_SERVICES line, APP_ENV=prod. So this has been quietly „on“ the whole time, and I’d never noticed.
„On“ means: fetch https://services.shopware.io/services.json (ServiceRegistryClient.php:26, URL configurable via SERVICE_REGISTRY_URL), diff it against apps already flagged selfManaged = true in your app table, and for everything new — install it. Not „notify me“ — install:
$this->appLifecycle->install(
$manifest,
new AppInstallParameters(activate: $serviceEntry->activateOnInstall),
Context::createDefaultContext()
);
That’s ServiceLifecycle::install() (Service/ServiceLifecycle.php:44-77), and activateOnInstall defaults to true in the registry entry itself (ServiceRegistryEntry.php) — so unless the registry says otherwise, a brand new „service“ doesn’t just land installed, it lands active.
And it runs on a loop
This isn’t a one-time bootstrap step. InstallServicesTask (Service/ScheduledTask/InstallServicesTask.php:14-17) registers itself as a scheduled task with getDefaultInterval() = self::DAILY. If your cron/worker runs scheduled-task:run like it’s supposed to, Shopware checks the registry and installs anything new every single day, for as long as the shop lives. There’s also a manual bin/console services:install if you want to trigger it yourself, but you don’t need to — the daily task already does it for you.
Why this exists
„Services“ here are Shopware’s own first-party apps — the kind Shopware itself operates and updates, distinct from the merchant-installed apps from the Store. The whole point of selfManaged is presumably to let Shopware ship and roll out its own integrations to every shop without merchants having to find and install them manually. That’s a reasonable thing to want. What surprised me is how little friction there is between „reasonable idea“ and „apps silently appearing and activating themselves in prod on a timer.“
What I’d actually do with this
Check whether your shop even has ENABLE_SERVICES set. If not, and you’re APP_ENV=prod, it’s on right now.
SELECT name, active, self_managed FROM app WHERE self_managed = 1; to see what, if anything, has already been auto-installed on your instance.
If you run agency infrastructure for shops you don’t want surprises on, ENABLE_SERVICES=false is one line in your deploy config, and it’s an explicit, supported value — not a hack.
If you do want it, know that it’s not „set once“ — it’s a daily job, so new services from Shopware show up on their schedule, not yours.
TL;DR
ENABLE_SERVICES (default auto → on whenever APP_ENV=prod) controls whether Shopware auto-installs and auto-activates its own „self-managed“ apps from services.shopware.io, and it does this once a day, forever, via a scheduled task — not just at setup. The flag itself is documented in one table row; the fact that it means daily, silent, auto-activating installs in production is not. If that’s not what you want on a client’s shop, set it to false.
Obscure enough that I hadn’t noticed my own production box has this switched on. Found anything installed on your shop that you didn’t put there? Drop me an email.
Found in Shopware 6.7.0.0: Service/AllServiceInstaller.php:37-49, Service/ServiceRegistryClient.php:26-80, Service/ServiceLifecycle.php:44-77, Service/ScheduledTask/InstallServicesTask.php:14-17 and InstallServicesTaskHandler.php, wiring in Service/DependencyInjection/services.xml:6-68. Docs status verified against a fresh pull of shopware/docs on 2026-07-14: only guides/hosting/configurations/shopware/environment-variables.md:33 mentions the flag; the install/activation/scheduling mechanism isn’t described anywhere in the docs repo.