If you have any project questions, concerns, or contribution ideas, join our #pwa Slack channel. Find out how to create an account by visiting Community Resources

Environment variables

Connecting to a Magento store


Type: url

Example: https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/

Connect to an instance of Magento 2.3 by specifying its public domain name.

Image Optimizing Origin


Type: str

Default: onboard

Specify the origin to use for images in the UI. Set to `backend` when Fastly or another CDN is optimizing images, and the frontend will load images directly from the Magento instance at MAGENTO_BACKEND_URL. If no image optimization is running on the backend, then set to `onboard`, or leave blank,

Custom local origin


Type: bool

Default: true

Get or create a secure, unique hostname/port combination and a trusted SSL certificate for local development.


Type: bool

Default: true

Add a unique hash string to the custom origin, based on filesystem location. This naturally separates domains when running multiple project folders on one developer machine.


Type: str

Specify the subdomain prefix of the custom origin manually, instead of using the package name.


Type: str

Specify the exact domain of the custom origin manually.

Development server


Type: str

Specify the hostname the dev server should bind to. If this is set, it overrides the host chosen by custom origin settings.


Type: num

Specify the port the dev server should bind to. If this is set, it overrides the port chosen by custom origin settings.


Type: bool

Use a service worker in developer mode (PWADevServer), which are disabled in dev mode normally to simplify cache. Good for debugging.


Type: num

Set to a number greater than 0 to denote a polling interval in milliseconds. If this is greater than 0, the dev server will use filesystem polling instead of native filesystem events to watch for changes. Can increase CPU usage, but sometimes is the best option for exotic filesystems (e.g. NFS).

Staging server


Type: str

Specify the hostname the staging server should bind to. If this is set, it overrides the host chosen by custom origin settings.


Type: num

Specify the port the staging server should bind to. If this is set, it overrides the port chosen by custom origin settings.


Type: str

Specify the id which Buildpack will put in a comment above all generated bundle files and the index.html file

Onboard image optimization service


Type: str

Default: /img/

Example: /img/

Root path to mount the onboard image optimization service in the DevServer and staging server.


Type: str

Default: 1 hour

Example: 5 minutes

Lifetime of images in the local cache of resized images. Format is “[length] [unit]”, as in “10 minutes” or “1 day”.


Type: bool

Log image cache debug info to the console.


Type: str

To use a Redis instance instead of a local memory cache for persistence between server processes, set this variable to the socket or URL of the Redis instance.

UPWARD server settings


Type: str

Default: upward.yml

UPWARD configuration file to use for the PWADevServer and the “stage:venia” sample server.


Type: bool

Default: true

Upon launching the staging server, automatically attach to a local port and listen.


Type: bool

Default: true

Log the bound URL to stdout once the sever is listening. Useful in testing and discovery scenarios, but may be disabled in production.

Checkout and payment settings


Type: str

Default: sandbox_8yrzsvtm_s2bg8fs563crhqzk

Specify a Braintree API token token to direct the Venia storefront to communicate with your Braintree instance. You can find this value in Braintree’s Control Panel under Settings > API Keys > Tokenization Keys.

Google Maps


Type: str

Specify a Google Maps API token for instantiating a Maps instance for your Page Builder map content type.