# Possible to change ServerURL in mender client during update?

**URL:** <https://hub.mender.io/t/possible-to-change-serverurl-in-mender-client-during-update/1976>\
**Category:** General Discussions\
**Created:** [May 27, 2020, 10:49pm UTC](https://hub.mender.io/t/possible-to-change-serverurl-in-mender-client-during-update/1976 "2020-05-27T22:49:21Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![markus4dev](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@markus4dev](https://hub.mender.io/u/markus4dev)\
**Post date:** [May 27, 2020, 10:49pm UTC](https://hub.mender.io/t/possible-to-change-serverurl-in-mender-client-during-update/1976/1 "2020-05-27T22:49:21Z")

</div>

Hi!

I am wondering if it is possible to change the mender server url during an ota update on the client side?

I am thinking of that the client receives an update from [mender1.example.com](http://mender1.example.com) and then after reporting the status back to the server on [mender1.example.com](http://mender1.example.com) a post script will run and change the the server url from [mender1.example.com](http://mender1.example.com) to [mender2.example.com](http://mender2.example.com) on the client?

Regards,  
Markus

---

<div class="post-metadata">

**Author:** ![oleorhagen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/oleorhagen/32/297_2.png) [@oleorhagen](https://hub.mender.io/u/oleorhagen)\
**Post date:** [May 28, 2020, 7:51am UTC](https://hub.mender.io/t/possible-to-change-serverurl-in-mender-client-during-update/1976/2 "2020-05-28T07:51:21Z")

</div>

[https://docs.mender.io/2.3/client-configuration/configuration-file/configuration-options#servers](https://docs.mender.io/2.3/client-configuration/configuration-file/configuration-options#servers)

A configuration file can have multiple servers. Hence, an update might not even be needed.

If `mender1.example.com` does not reply, the client will automaticlly try `mender2.example.com`. If `mender2` replies, the client is happy.

This could also be handled by having `mender1` return an error to the client, which will then try `mender2`.

I think this is better, than messing with the configuration file directly.

Does this make sense?

---

<div class="post-metadata">

**Author:** ![markus4dev](https://avatars.discourse-cdn.com/v4/letter/m/dec6dc/32.png) [@markus4dev](https://hub.mender.io/u/markus4dev)\
**Post date:** [May 28, 2020, 12:04pm UTC](https://hub.mender.io/t/possible-to-change-serverurl-in-mender-client-during-update/1976/3 "2020-05-28T12:04:58Z")

</div>

Great! That’s exactly the kind of solution what I was looking for.

Thanks!
