# Environment variables in service definitions don't seem to work

**URL:** <https://discourse.flox.dev/t/environment-variables-in-service-definitions-dont-seem-to-work/991>\
**Category:** Bug Reports\
**Created:** [November 24, 2024, 11:56am UTC](https://discourse.flox.dev/t/environment-variables-in-service-definitions-dont-seem-to-work/991 "2024-11-24T11:56:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![t0rx](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/t0rx/32/705_2.png) [@t0rx](https://discourse.flox.dev/u/t0rx)\
**Post date:** [November 24, 2024, 11:56am UTC](https://discourse.flox.dev/t/environment-variables-in-service-definitions-dont-seem-to-work/991/1 "2024-11-24T11:56:26Z")

</div>

I’m following the example in [Services - Flox Docs](https://flox.dev/docs/concepts/services/#defining-services) for how to set up a service, but the variables don’t seem to be passed through.

This doesn’t work:

```ini
[services.tomcat]
command = "catalina.sh jpda start"
vars.JPDA_ADDRESS = "5005"
vars.JPDA_TRANSPORT = "dt_socket"
is-daemon = true
shutdown.command = "catalina.sh stop"

```

But this does:

```ini
[services.tomcat]
command = "JPDA_ADDRESS=5005 JPDA_TRANSPORT=dt_socket catalina.sh jpda start"
is-daemon = true
shutdown.command = "catalina.sh stop"

```

Am I missing something obvious?

---

<div class="post-metadata">

**Author:** ![mkenigs](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.flox.dev/mkenigs/32/520_2.png) [@mkenigs](https://discourse.flox.dev/u/mkenigs)\
**Post date:** [November 25, 2024, 7:04pm UTC](https://discourse.flox.dev/t/environment-variables-in-service-definitions-dont-seem-to-work/991/2 "2024-11-25T19:04:25Z")

</div>

Nope that’s a bug, thanks for flagging! Tracking in [Service specific variables not working · Issue #2431 · flox/flox · GitHub](https://github.com/flox/flox/issues/2431)
