How do I set up environment-specific .qgtunnel files?

There are two ways to configure environment-specific .qgtunnel files to work.

A) You can download your configuration from the QG Dashboard and store it in an application environment variable “QGTUNNEL_CONFIG”.

B) Prior to adding option A, many people handled this with a launch script. Basically create a .qgtunnel.staging and a .qgtunnel.production file.

Then in the launch script do something like this:


if [ "$ENVIRONMENT" == "staging" ]; then
  cp .qgtunnel.staging .qgtunnel
  cp .qgtunnel.production .qgtunnel

bin/qgtunnel $@

Then save that as something like bin/qglaunch. Then change your startup code to call bin/qglaunch with all your program arguments instead of bin/qgtunnel.

Others have saved the full .qgtunnel file into an environment variable and in the launch script they create the .qgtunnel file from the environment variable.

If you are using transparent mode, be sure that vendor/nss_wrapper/ is also added to your repository.