# Let user start update

**URL:** https://hub.mender.io/t/let-user-start-update/4178
**Category:** General Discussions
**Created:** [October 12, 2021, 2:11pm UTC](https://hub.mender.io/t/let-user-start-update/4178 "2021-10-12T14:11:07Z")
**Posts on this page:** 7
**Page:** 1

<div class="post-metadata">

### Author: ![oscarthorn](https://avatars.discourse-cdn.com/v4/letter/o/87869e/32.png) [@oscarthorn](https://hub.mender.io/u/oscarthorn)
#### Post date: [October 12, 2021, 2:11pm UTC](https://hub.mender.io/t/let-user-start-update/4178/1 "2021-10-12T14:11:07Z")

</div>

Hi!

I’m considering Mender for a project where we need the updates to be user initiated. I.e. something like the behavior of a smartphone or other system with a UI. What we need to achieve is something like this:

1. User clicks a “Check for Updates” button in the UI (a website served by a local webserver running on the device). Info is displayed about the update/if it is available.
2. User clicks start update. Update progress is displayed.

1 is optional it’s fine if the user just clicks update and then it updates if an update is available.

It’s also important that the user can update whenever they want. These devices are seldom connected to the internet and the user needs to be able to update even if the update was released 1 month ago.

Is this possible with Mender?

---

<div class="post-metadata">

### Author: ![azarubkin](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@azarubkin](https://hub.mender.io/u/azarubkin)
#### Post date: [October 12, 2021, 2:30pm UTC](https://hub.mender.io/t/let-user-start-update/4178/2 "2021-10-12T14:30:37Z")

</div>

I think you could set mender-client service to disabled, so that it doesn’t start manually, and then enable it whenever you want to update. Haven’t done it myself, but I would look in that direction.

---

<div class="post-metadata">

### Author: ![oscarthorn](https://avatars.discourse-cdn.com/v4/letter/o/87869e/32.png) [@oscarthorn](https://hub.mender.io/u/oscarthorn)
#### Post date: [October 12, 2021, 5:51pm UTC](https://hub.mender.io/t/let-user-start-update/4178/3 "2021-10-12T17:51:57Z")

</div>

Thanks for the suggestion! But unfortunately that seems a bit to hacky to use in a real product.

---

<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: [October 12, 2021, 6:45pm UTC](https://hub.mender.io/t/let-user-start-update/4178/4 "2021-10-12T18:45:33Z")

</div>

you have 2 options as i have been through this process for my companies product line.

1. use async state scripts to achieve what you need with the existing mender client
2. write you own client the uses the mender rest api

after a extensive review and testing process we went for the second option, but your requirements may be different.

---

<div class="post-metadata">

### Author: ![azarubkin](https://avatars.discourse-cdn.com/v4/letter/a/8edcca/32.png) [@azarubkin](https://hub.mender.io/u/azarubkin)
#### Post date: [October 12, 2021, 6:46pm UTC](https://hub.mender.io/t/let-user-start-update/4178/5 "2021-10-12T18:46:30Z")

</div>

Not at all, I remember a similar advice in Mender docs.  
[https://docs.mender.io/artifact-creation/standalone-deployment](https://docs.mender.io/artifact-creation/standalone-deployment)

---

<div class="post-metadata">

### Author: ![oscarthorn](https://avatars.discourse-cdn.com/v4/letter/o/87869e/32.png) [@oscarthorn](https://hub.mender.io/u/oscarthorn)
#### Post date: [October 13, 2021, 6:33am UTC](https://hub.mender.io/t/let-user-start-update/4178/6 "2021-10-13T06:33:49Z")

</div>

Using the rest api seems like a good option, thanks!

---

<div class="post-metadata">

### Author: ![kacf](https://yyz2.discourse-cdn.com/flex036/user_avatar/hub.mender.io/kacf/32/146_2.png) [@kacf](https://hub.mender.io/u/kacf)
#### Post date: [October 15, 2021, 8:06am UTC](https://hub.mender.io/t/let-user-start-update/4178/7 "2021-10-15T08:06:21Z")

</div>

> [@dellgreen](#):
>
> use async state scripts to achieve what you need with the existing mender client

Expanding a bit on this: Use a [`Sync` state script](https://docs.mender.io/development/artifact-creation/state-scripts) to check some condition. Usually it returns 1 to signal “do not proceed with update”. If the user clicks the button to update, change the condition and call `mender check-update` to trigger another execution of the script. When it returns 0, the update can continue.
