# Sharing mender update between multiple devices

**URL:** <https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231>\
**Category:** General Discussions\
**Tags:** yocto, warrior\
**Created:** [July 24, 2020, 2:44pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231 "2020-07-24T14:44:08Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![Austriker](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/austriker/32/511_2.png) [@Austriker](https://hub.mender.io/u/Austriker)\
**Post date:** [July 24, 2020, 2:44pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/1 "2020-07-24T14:44:08Z")

</div>

Hi,

Is it possible to manually copy a mender update directly on a device and then tell the mender client to use this update instead of an OTA ?

We have multiple devices on the same network. It’s like a cluster of machines. But downloading N times the same update kills our 4G connection.

First option I have in mind is to have one device download the update then share it with nfs to the other devices.

Is this possible ?

Second option would be to manually scp the update on the device like the standalone deployment (we don’t have an usb port available) using a external computer.

Best regards

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [July 24, 2020, 3:43pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/2 "2020-07-24T15:43:26Z")

</div>

i think the mender client “install” command accepts a local file path or a uri,  
also a https proxy might be a better option for you.

> [@Mender client HTTP proxy support](https://hub.mender.io/t/mender-client-http-proxy-support/1366/20):
>
> Yes, I was not checking the active environment for mender-client. The HTTPS\_PROXY is not added to the mender-client environment during the mender-convert process nor when the service launches. Also, to speed up testing i was launching the mender -daemon which does pull the current environment HTTPS\_PROXY. The Squid Proxy server setup added a little more confusion as well. Simply put the HTTPS\_PROXY needed to be manually added to the Environment of mender-client.service

---

<div class="post-metadata">

**Author:** ![Austriker](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/austriker/32/511_2.png) [@Austriker](https://hub.mender.io/u/Austriker)\
**Post date:** [July 24, 2020, 4:31pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/3 "2020-07-24T16:31:41Z")

</div>

Ok.

With a proxy can I say look at the other mender client for the update ? or should I try to handle something like this

> [@How to do a proxy deployment to an FRDM-K64F device connected to a Raspberry Pi 3 / 4](https://hub.mender.io/t/how-to-do-a-proxy-deployment-to-an-frdm-k64f-device-connected-to-a-raspberry-pi-3/1619):
>
> Introduction When designing products based on Linux, it is a common design pattern to have external MCU that handles real-time critical tasks. The external MCU could be mounted on the same PCB as the Linux SoC, or it could be an external component that is connected to the Linux capable device, e.g over USB or a serial line. The external MCU obviously then is another software component in the device system that should be possible to update over the lifetime of the product. In this tutorial we w…

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [July 24, 2020, 5:48pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/4 "2020-07-24T17:48:06Z")

</div>

personally I would try experimenting with adding a raspberry pi, NUC or VM running linux and squid proxy into your cluster network if you can to centralise the caching of the downloads, so that its pretty much invisible to your machine cluster and they don’t need to know about each other. The are probably alternatives to squid proxy that you could try also.

[https://elatov.github.io/2019/01/using-squid-to-proxy-ssl-sites/](https://elatov.github.io/2019/01/using-squid-to-proxy-ssl-sites/)

---

<div class="post-metadata">

**Author:** ![Austriker](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/austriker/32/511_2.png) [@Austriker](https://hub.mender.io/u/Austriker)\
**Post date:** [July 28, 2020, 8:10am UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/5 "2020-07-28T08:10:28Z")

</div>

Oh I see the main idea.  
Thank you for your proposal. I will try that.

---

<div class="post-metadata">

**Author:** ![Austriker](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/austriker/32/511_2.png) [@Austriker](https://hub.mender.io/u/Austriker)\
**Post date:** [July 28, 2020, 12:23pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/6 "2020-07-28T12:23:41Z")

</div>

@dellgreen doing a bit of thinking based on your proposal. Do I have to stage the update meaning I say to one device to start the update process then the rest ? Or with the proxy it will manage the caching and dispatch it ?

---

<div class="post-metadata">

**Author:** ![dellgreen](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/dellgreen/32/85_2.png) [@dellgreen](https://hub.mender.io/u/dellgreen)\
**Post date:** [July 28, 2020, 9:20pm UTC](https://hub.mender.io/t/sharing-mender-update-between-multiple-devices/2231/7 "2020-07-28T21:20:03Z")

</div>

the proxy, will cache the download, and how long it keeps it for is a config option. The proxy responds to your http requests from you client and checks the request to see what resource your are requesting and if its cached already returned the cached version rather than going out to the internet and getting it again.  
You will probably want to tune the config, because often the proxy will do a basic check to internet to see if resource has been updated. you probably don’t want that as your using versioned artifacts so there shouldn’t be a new artifact with the exact same version name.
