# How to set configuration parameters

**URL:** <https://discuss.tryton.org/t/how-to-set-configuration-parameters/667>\
**Category:** Developer\
**Tags:** docker\
**Created:** [August 22, 2018, 11:39am UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667 "2018-08-22T11:39:04Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)\
**Post date:** [August 22, 2018, 11:39am UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667/1 "2018-08-22T11:39:04Z")

</div>

I created my own docker image which ´pulls’ from Tryton/Tryton image but I wanted to change some configuration parameters. Do I just have to create my own Tryton.conf file and COPY over the top of the Tryton image configuration file?

---

<div class="post-metadata">

**Author:** ![albert](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/albert/32/21_2.png) [@albert](https://discuss.tryton.org/u/albert)\
**Post date:** [August 22, 2018, 12:43pm UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667/2 "2018-08-22T12:43:32Z")

</div>

No. You should be able to override the file using docker configs or volumes and replacing this way the file the image expects in “/etc/trytond.conf”.

Otherwise you can also create your own specific volume and also override the TRYTOND\_CONFIG variable.

---

<div class="post-metadata">

**Author:** ![pokoli](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/pokoli/32/22_2.png) [@pokoli](https://discuss.tryton.org/u/pokoli)\
**Post date:** [August 22, 2018, 3:24pm UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667/3 "2018-08-22T15:24:03Z")

</div>

Indeed there is a [proposal to allow to modify any configuration default value by using environment variables](https://bugs.tryton.org/issue7620).

This is specially usefull for the docker use case and prevents to create a custom image or use an specific volume for trytond.conf file

---

<div class="post-metadata">

**Author:** ![vincent](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/vincent/32/29_2.png) [@vincent](https://discuss.tryton.org/u/vincent)\
**Post date:** [August 22, 2018, 11:01pm UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667/4 "2018-08-22T23:01:43Z")

</div>

Thanks @albert and @pokoli I was able to find my solution. I already have to extend the image as I am importing other modules, and so I was simply able to COPY then the file over from my repository to overwrite the existing trytond.conf file.

---

<div class="post-metadata">

**Author:** ![ced](https://discuss-cdn.tryton.org/user_avatar/discuss.tryton.org/ced/32/1237_2.png) [@ced](https://discuss.tryton.org/u/ced)\
**Post date:** [August 23, 2018, 7:12am UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667/5 "2018-08-23T07:12:10Z")

</div>

Indeed I think there are not **one correct way**.  
But of course derived from the standard image just to change the configuration is not a very good solution because it requires to update the custom image each time the standard one is updated.  
Override the `trytond.conf` could be a good solution if you already derive the standard image to add custom modules. But I would say that it makes sense only for configuration always needed and which has low chance to change overtime and which is not liked to the docker setup (like connection to the DB, hostname etc.)  
For changing values, for now the best is to use, like @albert suggested, a volume and make trytond load it with `-c` option. I would not change the `TRYTOND_CONFIG` because it is good to keep `/etc/trytond.conf` loaded first.  
Finally once [issue7620](https://bugs.tryton.org/issue7620) is implemented, it will be better to use it for all configuration that may change overtime (like limits, timeout etc.).

---

<div class="post-metadata">

**Author:** ![system](https://discuss-cdn.tryton.org/uploads/default/original/1X/c6f8ec0a40525cdcd50058c734283450a4b3d38b.png) [@system](https://discuss.tryton.org/u/system)\
**Post date:** [August 23, 2018, 7:12pm UTC](https://discuss.tryton.org/t/how-to-set-configuration-parameters/667/6 "2018-08-23T19:12:11Z")

</div>

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