# Changing Haproxy configuration in loadbalancer

**URL:** https://forums.suse.com/t/changing-haproxy-configuration-in-loadbalancer/10181
**Category:** General
**Created:** [April 26, 2018, 1:31pm UTC](https://forums.suse.com/t/changing-haproxy-configuration-in-loadbalancer/10181 "2018-04-26T13:31:39Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Aravind](https://avatars.discourse-cdn.com/v4/letter/a/e8c25b/32.png) [@Aravind](https://forums.suse.com/u/Aravind)
#### Post date: [April 26, 2018, 1:31pm UTC](https://forums.suse.com/t/changing-haproxy-configuration-in-loadbalancer/10181/1 "2018-04-26T13:31:39Z")

</div>

Hi,  
I am trying to change haproxy configuration in load balancer using haproxy custom config option. And also i edit the haproxy config file using container shell after restarting load balancer, container port get resetted to default port.  
How to configure this?

---

<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: [April 26, 2018, 4:24pm UTC](https://forums.suse.com/t/changing-haproxy-configuration-in-loadbalancer/10181/2 "2018-04-26T16:24:43Z")

</div>

The config is a combination of what’s generated based on the sources and targets for the balancer and the custom config field. Changing listening ports in the custom config will not have any useful effect because the new ports are not going to be directed to the container in the first place. And the config is generated any time something changes so you cannot just edit the file on disk in the container and expect it to persist.
