Skip to main content

Exposing Local Instance

There are situations when you would like to expose your local environment to external clients, for example:

  • Show your project to the manager.
  • Integrate with the new payment gateway, which requires a return URL.
  • Test the app deployed in the cloud.

To achieve that, you need a service for redirecting the traffic. Such service is delivered by ngrok and localtunnel. Both are great for our use case, and you can choose any of those services.

Using ngrok

  1. Append ngrok URL to ALLOWED_CLIENT_HOSTS environment variable.
  2. Start Saleor on your machine.
  3. Follow ngrok installation guide.
  4. Start a tunnel in your command line ngrok http 8000.
  5. Your server is now exposed under ngrok domain (for example: http://92832de0.ngrok.io). Copy that address.
  6. Enter ngrok URL at Site Settings configuration.