# \[FAQ\] Custom Environment Variables Not Accessible via iodesktop.env

**URL:** <https://community.interop.io/t/faq-custom-environment-variables-not-accessible-via-iodesktop-env/620>\
**Category:** io.Connect Desktop\
**Tags:** FAQs, iocd-9\
**Created:** [July 13, 2026, 3:34pm UTC](https://community.interop.io/t/faq-custom-environment-variables-not-accessible-via-iodesktop-env/620 "2026-07-13T15:34:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![toni.petrov](https://yyz2.discourse-cdn.com/flex028/user_avatar/community.interop.io/toni.petrov/32/17_2.png) [@toni.petrov](https://community.interop.io/u/toni.petrov)\
**Post date:** [July 13, 2026, 3:34pm UTC](https://community.interop.io/t/faq-custom-environment-variables-not-accessible-via-iodesktop-env/620/1 "2026-07-13T15:34:23Z")

</div>

## Problem

I’ve set custom environment variables in the `gilding.json` configuration file (9.x) and the platform log confirms the configuration file is read successfully. However, when I try to access the custom variables programmatically at runtime via the `iodesktop.env` object, they do not appear.

## Solution

An app must have `"allowEnvVars": true` in its app definition before the variables are exposed through `iodesktop.env`. Without this property, the `iodesktop.env` object will not contain the expected variables for that app.

Example app definition for adding `"allowEnvVars": true` to the `"details"` section.

```auto
{
    "name": "my-app",
    "title": "My App",
    "type": "window",
    "details": {
        "url": "https://example.com",
        "allowEnvVars": true
    }
}

```

After adding this property, all available environment variables, including custom ones defined via `"envVars"` \> `"set"` will be accessible on the `iodesktop.env` object for that specific app (see [Environment Variables – Configuration](https://docs.interop.io/desktop/capabilities/more/apis/index.html#environment_variables-configuration) in the official documentation).

To verify, open the developer console **of the specific app** whose definition contains `"allowEnvVars": true` and inspect `iodesktop.env`:

```auto
console.log(iodesktop.env);

```

## Where Custom Environment Variables Are Defined

### io.Connect Desktop 9.x

Custom environment variables are defined in the `gilding.json` configuration file using the `"envVars"` \> `"set"` property:

```auto
{
    "envVars": {
        "set": {
            "MY_APP_PROD": "https://my-app.com",
            "MY_APP_DEV": "https://dev.my-app.com"
        }
    }
}

```

### io.Connect Desktop 10.x

In the 10.x stream (starting **10.0**.3) custom environment variables are defined in the `system.json` system configuration file using the same `"envVars"` \> `"set"` property:

```auto
{
    "envVars": {
        "set": {
            "MY_APP_PROD": "https://my-app.com",
            "MY_APP_DEV": "https://dev.my-app.com"
        }
    }
}

```

The `gilding.json` file is relevant only for the 9.0 version stream.
