Skip to content

Configuration

A shop has two kinds of settings:

  • apps/<shop>/magenx.config.ts: everything about the shop itself (store, features, brand, navigation, CMS blocks, SEO, layout). It is committed with the shop.
  • Environment variables: endpoints, keys and switches that differ per deployment.
SectionHolds
storeStore code, base URL, currency, page sizes, sort options.
taxPrice display: including or excluding tax.
shippingDelivery estimate and return days shown on the product page.
analyticsGoogle Tag Manager container.
featuresFeature flags (below).
cmsIdentifiers of Magento CMS blocks used on the home page, header, footer and category pages.
navigationHeader and footer links.
paymentWhich payment provider modules (Stripe, Mollie) are installed in Magento.
brand, seo, layoutName, logo, icons, metadata, grid columns.

Set in features. A flag for a companion-module feature must stay false on a Magento without that module.

FlagTurns on
wishlistServer-backed wishlist.
reviewsEnabledProduct reviews.
relatedProducts, crossSellsRelated products on the product page, cross-sells in the cart.
recentlyViewedRecently viewed products.
breadcrumbsBreadcrumbs on catalog pages.
blogThe blog.
productAttachmentsDownloadable attachments on the product page.
checkoutFieldsOrder comment and delivery date/time on checkout.
freeShippingThe free-shipping progress indicator.
vatValidationVAT number fields and reverse-charge notices.

The most common ones. All of them are in the environment reference. “Build” variables are baked into the bundle by next build: changing one needs a rebuild, not a restart.

VariableWhenPurpose
MAGENTO_GRAPHQL_ENDPOINTRuntimeInternal Magento GraphQL URL, for example http://nginx/graphql.
MAGENTO_GRAPHQL_BUILD_ENDPOINTBuildGraphQL URL used only while next build prerenders. Point it at the deployed site’s own /api/graphql. Never reuse the runtime value.
NEXT_PUBLIC_SITE_URLBuildCanonical storefront URL.
NEXT_PUBLIC_GTM_IDBuildGoogle Tag Manager container. Unset disables analytics.
NEXT_PUBLIC_TURNSTILE_SITE_KEYBuildRenders the Turnstile widget.
TURNSTILE_ENABLE, TURNSTILE_SECRET_KEY, TURNSTILE_HOSTNAMESRuntimeServer-side Turnstile enforcement.
NEXT_PUBLIC_SOCIAL_LOGIN_ENABLEDBuildShows “Continue with Google”.
AUTH_SECRET, AUTH_GOOGLE_ID, AUTH_GOOGLE_SECRET, MAGENX_SOCIAL_LOGIN_SECRETRuntimeGoogle sign-in and its bridge to Magento.
CACHE_WARM_ON_BOOTRuntimeRe-renders pages the build could not fill. 0 disables.
STORE_DRIFT_CHECKRuntimeLogs when Magento’s store views differ from the build’s snapshot. 0 disables.
OTEL_EXPORTER_OTLP_ENDPOINTRuntimeEnables OpenTelemetry export.
UCP_ENABLERuntimeEnables the UCP agentic-checkout API.

The storefront’s locale table comes from Magento, not from hand-edited config:

  1. At build, npm run sync:stores (also run before every build) asks Magento for its store views and writes apps/theme/src/generated/stores.json.
  2. In the config, each store view becomes one URL locale: de_DE becomes /de. The website’s default store view becomes the default locale. storeViews in magenx.config.ts can exclude a view or rename its locale.
  3. At boot, the running storefront compares the snapshot with Magento and logs [store-drift] when they differ.

A new locale also needs a messages file (apps/theme/src/i18n/messages/<locale>.json) and the locale lists in the nginx config of magenxcommerce-docker. A test fails until the messages file exists.

The storefront has no payment-method switch. The payment step shows exactly what Magento returns for the cart, so you enable methods in Stores > Configuration > Sales > Payment Methods. Stripe, Mollie, PayPal Express and the offline methods can all be on at once.

payment in magenx.config.ts only says which provider modules are installed in Magento. It never enables a method:

SettingSet it to true when
payment.stripe.enabledThe Stripe module (stripe/module-payments) is installed.
payment.mollie.enabledMollie Payments for Magento 2 (mollie/magento2) is installed.
payment.mollie.componentsMollie card details should be entered on the checkout page (Mollie Components) rather than on Mollie’s hosted page.

Leave a flag false on a Magento without that module: its GraphQL fields would make Magento reject the request. PayPal Express needs no flag: it uses Magento’s own PayPal module. How each provider works at checkout is on Payments.

Turnstile has two halves that must come from the same Cloudflare widget:

  • the public site key, a build variable;
  • the secret key, the enable flag and the allowed hostnames, runtime variables.

The /api/graphql proxy verifies each token with Cloudflare and checks its action and hostname. A token solved on the newsletter form can’t be replayed against sign-in.