Skip to content

GoodKey configuring server environment

OlhaPeculiar edited this page Nov 19, 2024 · 4 revisions

By default, the GoodKey application operates with the production server. To use the canary server, you need to set a global environment variable GOODKEY_ENV with the value canary.

Setting the Environment Variable on MacOS

  1. Open Terminal:
    Launch the Terminal application from the Applications folder or by searching for it in Spotlight.

  2. Edit the Shell Profile:
    Depending on your shell, you need to edit the appropriate profile file. Use a text editor to open the file. For example, to edit with nano:

    • For bash: Edit ~/.bash_profile
    nano ~/.bash_profile
    • For zsh: Edit ~/.zshrc
    nano ~/.zshrc
  3. Add the Environment Variable:
    Add the following line to the file:

    export GOODKEY_ENV=canary

    Save the file and exit the editor.

  4. Apply the Changes:
    Run the following command in the terminal:

    source ~/.zshrc

Setting the Environment Variable on Windows

  1. Open System Properties:
    Press Win + Pause/Break to open System Properties, or right-click on This PC and select Properties.

  2. Advanced System Settings:
    Click on Advanced system settings on the left sidebar.

  3. Environment Variables:
    In the System Properties window, click on the Environment Variables button.

  4. Add New Variable:
    In the Environment Variables window, click on New under the System variables section. Enter the following details:

    • Variable name: GOODKEY_ENV
    • Variable value: canary
  5. Save and Apply:
    Click OK to save the new variable. Close all remaining windows by clicking OK.

Final Step: Restart Your Computer

After setting the environment variable, it is important to restart your computer for the changes to take effect.