# Initiating the update from the client

**URL:** <https://hub.mender.io/t/initiating-the-update-from-the-client/2777>\
**Category:** General Discussions\
**Created:** [November 4, 2020, 10:29am UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777 "2020-11-04T10:29:12Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![amgedr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/amgedr/32/642_2.png) [@amgedr](https://hub.mender.io/u/amgedr)\
**Post date:** [November 4, 2020, 10:29am UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/1 "2020-11-04T10:29:13Z")

</div>

Hello,

Is there documentation on how to setup the server and client so that the client initiates the update process using the API instead of the server’s UI?

I use standalone updating to test the Yocto builds on our PCB. However, I would like to write a Python script that will check if there is an update available and another to download and install it.

Thanks.

---

<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:** [November 4, 2020, 11:03am UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/2 "2020-11-04T11:03:04Z")

</div>

> I use standalone updating to test the Yocto builds on our PCB. However, I would like to write a Python script that will check if there is an update available and another to download and install it.

My team used the following documentation to write our own client to do similar.

[https://docs.mender.io/api/2.5/#introduction](https://docs.mender.io/api/2.5/#introduction)

---

<div class="post-metadata">

**Author:** ![amgedr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/amgedr/32/642_2.png) [@amgedr](https://hub.mender.io/u/amgedr)\
**Post date:** [November 4, 2020, 12:17pm UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/3 "2020-11-04T12:17:45Z")

</div>

Thanks @dellgreen. Sorry I didn’t explain better. I meant do I just upload the artifact to the server and then on the client call the /device/deployments/next API endpoint periodically to check for updates? And is this process the same for production?

---

<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:** [November 4, 2020, 1:25pm UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/4 "2020-11-04T13:25:26Z")

</div>

I have to upload artifact to server, then create a deployment of that artifact for a list of already approved clients i want it deployed to, then I use our own client to check for updates and download the update if available. However I am only using the open-source version of mender-server, so I don’t know what other options are available to you under the other pricing plans.

---

<div class="post-metadata">

**Author:** ![amgedr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/amgedr/32/642_2.png) [@amgedr](https://hub.mender.io/u/amgedr)\
**Post date:** [November 4, 2020, 1:40pm UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/5 "2020-11-04T13:40:29Z")

</div>

That’s the part that is not clear to me. When I created deployments while testing the Raspberry Pi example it started deploying to all the approved devices immediately. So I thought I have to upload the artifact but not create a deployment. I guess I was wrong.

I’m also using the open source version for now because we are still in development.

---

<div class="post-metadata">

**Author:** ![drewmoseley](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/drewmoseley/32/47_2.png) [@drewmoseley](https://hub.mender.io/u/drewmoseley)\
**Post date:** [November 4, 2020, 2:20pm UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/6 "2020-11-04T14:20:13Z")

</div>

Hi @amgedr one option would be to disable Mender as a service until you want to actually check for updates and then simply do `systemctl start mender-client`.

Alternatively, you can just set the polling intervals extremely high and then use `mender check-update` in some scripting which will force an immediate check and download.

---

<div class="post-metadata">

**Author:** ![amgedr](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/amgedr/32/642_2.png) [@amgedr](https://hub.mender.io/u/amgedr)\
**Post date:** [November 4, 2020, 2:44pm UTC](https://hub.mender.io/t/initiating-the-update-from-the-client/2777/7 "2020-11-04T14:44:45Z")

</div>

Thanks @drewmoseley. The second option seems better in my case because we want our users to initiate the update from the app on the device.
