# How to handle common configuration settings

**URL:** <https://forums.suse.com/t/how-to-handle-common-configuration-settings/5374>\
**Category:** Rancher 1.x\
**Created:** [January 31, 2017, 11:22pm UTC](https://forums.suse.com/t/how-to-handle-common-configuration-settings/5374 "2017-01-31T23:22:11Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![nhumrich](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/nhumrich/32/344_2.png) [@nhumrich](https://forums.suse.com/u/nhumrich)\
**Post date:** [January 31, 2017, 11:22pm UTC](https://forums.suse.com/t/how-to-handle-common-configuration-settings/5374/1 "2017-01-31T23:22:12Z")

</div>

I currently use environment variables for all configuration settings in my containers.  
It works ok, but a lot of the configuration is copied, such as SERVICE\_DISCOVERY\_URL. I have that in almost every container. If I want to change the URL for whatever reason, it means I have to update every service one by one.

What do ya’ll use for configuration inside a container? Any recommendations?

---

<div class="post-metadata">

**Author:** ![vincent](https://sea2.discourse-cdn.com/flex022/user_avatar/forums.suse.com/vincent/32/7156_2.png) [@vincent](https://forums.suse.com/u/vincent)\
**Post date:** [February 1, 2017, 5:43am UTC](https://forums.suse.com/t/how-to-handle-common-configuration-settings/5374/2 "2017-02-01T05:43:32Z")

</div>

This is obviously Rancher-specific and there isn’t UI for it (for no particular reason), but one option is to use metadata on a certain service. You can store arbitrary key/values (from the API, or compose) and get them from any container with

`curl http://rancher-metadata/2016-07-29/stacks/<STACK>/services/<SERVICE>/metadata/<KEY>`

or all of it as JSON: `curl -H 'Accept: application/json' http://rancher-metadata/2016-07-29/stacks/<STACK>/services/<SERVICE>/metadata`
