Environment Variables

The Settings> Environment page is used to manage your instance environment variables. You can create, edit or delete local variables (double click on existing variable to modify or delete).

Environmental variables make it possible to use variables within your interfaces to differentiate between development, staging and production environments.

For instance say you configured an environmental variable like SERVER. This could point to a test database in your development servers and a production database in production.

Screen Shot 2024-02-06 at 4.50.27 PM.png

To access environmental variables in your scripts you would either use:

  • In Lua: os.getenv("SERVER") or

  • In a custom field: ${SERVER}

One can also change environmental variables that external command line tools might use. Keep in mind that the environmental variable changes only occur with the context of the Iguana X server instance - not the entire operating system.

Iguana stores all custom environment variables in the instance directory in IguanaEnv.txt.