I want to setup PWA in localhost. I have tried in localhost but at last its giving dynamic staging server URL like below


How can we change it to our localhost server URL.

  • Not getting the point, it is connected with your localhost. The url that you obtained is the url of development server, you can see your changes there Commented Apr 1, 2019 at 5:24

3 Answers 3


alright you just need to update .env for variable CUSTOM_ORIGIN_EXACT_DOMAIN

 # vi .env
 # update value 
 # now run 
   yarn buildpack create-custom-origin ./
 # Acquired custom hostname and SSL cert for pwa.dev. Development server will run on port 8626 and staging server will run on port 9626
 # Run server again
   yarn watch 
 # Project is running at https://pwa.dev:8626/

Official pwa setup guide And Create custom origin guide

let me know if this works


If you checked the steps and results from PWA documentation: https://magento-research.github.io/pwa-studio/venia-pwa-concept/setup/ you will see that actually you got the local dev URL for your PWA development server. Check to add that URL to your hosts file in case that is not working for your setup.


Magento 2.3.1 PWA setup on local server


Nodejs > 10.14.1 installed

yarn > 1.13.0 installed

A running instance of Magento 2.3.1 or above

Steps to Setup PWA in local server

  • Clone the PWA studio repository in the development environment: git clone https://github.com/magento-research/pwa-studio.git

  • Install yarn from your pwa-studio root directory yarn install

  • Create the .env file at location pwa-studio\packages\venia-concept\ using following command

    MAGENTO_BACKEND_URL="https://master-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloud/" yarn buildpack create-env-file packages/venia-concept

  • Set the MAGENTO_BACKEND_URL. You can use the value provided in the example command or use your Magento instance url. This URL points to a cloud instance of Magento 2.3.1 with the Venia sample data installed.

  • Generate SSL Certificate using yarn buildpack create-custom-origin packages/venia-concept

  • Build artifacts for Venia using the following command from the project root directory

    yarn run build

  • Start the Venia development environment using the following command

    yarn run watch:venia

  • You can browse your PWA Magneto application at https://magento-venia-concept-j2188.local.pwadev:8119

Hope this solution will work for you.

  • From where these URL's coming , please provide specific and detailed reply Commented Sep 29, 2021 at 16:54

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.