# Environment variable in suricata.yaml configuration

**URL:** <https://forum.suricata.io/t/environment-variable-in-suricata-yaml-configuration/3726>\
**Category:** Uncategorized\
**Created:** [July 20, 2023, 8:22am UTC](https://forum.suricata.io/t/environment-variable-in-suricata-yaml-configuration/3726 "2023-07-20T08:22:37Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![mikel95](https://avatars.discourse-cdn.com/v4/letter/m/94ad74/32.png) [@mikel95](https://forum.suricata.io/u/mikel95)\
**Post date:** [July 20, 2023, 8:22am UTC](https://forum.suricata.io/t/environment-variable-in-suricata-yaml-configuration/3726/1 "2023-07-20T08:22:37Z")

</div>

Hello,

I want to use an environment variable echo HOME\_NETWORK=[172.16.233.0/24] as HOME\_NET parameter in suricata.yaml file.

I have tried

```auto
HOME_NET: "${HOME_NETWORK}"
HOME_NET: ${HOME_NETWORK}
HOME_NET: $HOME_NETWORK
HOME_NET: "$HOME_NETWORK"

```

But I can’t get it to resolve it. Is there no way of doing this? I am doing this because suricata is running in a container and I would like to set this value from a compose file.

Thanks

---

<div class="post-metadata">

**Author:** ![Jeff\_Lucovsky](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.suricata.io/jeff_lucovsky/32/11_2.png) [@Jeff\_Lucovsky](https://forum.suricata.io/u/Jeff_Lucovsky)\
**Post date:** [July 20, 2023, 11:24am UTC](https://forum.suricata.io/t/environment-variable-in-suricata-yaml-configuration/3726/2 "2023-07-20T11:24:58Z")

</div>

Suricata won’t use environment variables in place of rule variables.

You should be able to handle this in your containers “start-suricata” step before launching Suricata
