# Runtime Environment Variables

**URL:** <https://community.particle.io/t/runtime-environment-variables/69768>\
**Category:** Firmware\
**Tags:** boron\
**Created:** [July 1, 2025, 10:11pm UTC](https://community.particle.io/t/runtime-environment-variables/69768 "2025-07-01T22:11:35Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![drewcact](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@drewcact](https://community.particle.io/u/drewcact)\
**Post date:** [July 1, 2025, 10:11pm UTC](https://community.particle.io/t/runtime-environment-variables/69768/1 "2025-07-01T22:11:35Z")

</div>

Hi, looking for advice about how to pass values to the Particle runtime via the Cloud as is done with **environment variables** in other devices. This is key to deploying fleets of devices, each with same firmware but with device-specific keys, ID codes, locations, etc. Using this technique I can avoid having unique code for each device. Is "particle.variable()" the recommended method to use?

---

<div class="post-metadata">

**Author:** ![peekay123](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/peekay123/32/810_2.png) [@peekay123](https://community.particle.io/u/peekay123)\
**Post date:** [July 1, 2025, 11:15pm UTC](https://community.particle.io/t/runtime-environment-variables/69768/2 "2025-07-01T23:15:14Z")

</div>

@drewcact look at [Ledger](https://docs.particle.io/reference/device-os/api/ledger/) which is designed exactly for your purpose.

---

<div class="post-metadata">

**Author:** ![drewcact](https://avatars.discourse-cdn.com/v4/letter/d/f19dbf/32.png) [@drewcact](https://community.particle.io/u/drewcact)\
**Post date:** [July 3, 2025, 1:26am UTC](https://community.particle.io/t/runtime-environment-variables/69768/3 "2025-07-03T01:26:04Z")

</div>

I'll give Ledger a try. I am able to easily set the variables in the Console, but hunting through the docs to see how to access from the device code.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex026/uploads/particle/original/3X/3/2/3291e3c9351789fe8620ae5bcec8d3fec67ff221.png) [@system](https://community.particle.io/u/system)\
**Post date:** [January 1, 2026, 1:26pm UTC](https://community.particle.io/t/runtime-environment-variables/69768/4 "2026-01-01T13:26:59Z")

</div>

Closed on January 1, 2026, 1:26pm UTC

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.
