# How to run Upgrade All from command line?

**URL:** https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949
**Category:** Support
**Created:** [January 18, 2019, 11:25pm UTC](https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949 "2019-01-18T23:25:15Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)
#### Post date: [January 18, 2019, 11:25pm UTC](https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949/1 "2019-01-18T23:25:15Z")

</div>

My high-level goal here is to run upgrades from the command line and minimize downtime when running those upgrades.

I understand that I can [separate web and data containers](https://meta.discourse.org/t/how-to-move-from-standalone-container-to-separate-web-and-data-containers/29413), but my hope is for something I can run on a stock install.

I have noticed that the “Upgrade All” button at `/admin/upgrade` does an upgrade that minimizes the downtime, so I’d to run whatever it runs at the command line. Anyone know how to do that?

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [January 31, 2019, 5:48pm UTC](https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949/2 "2019-01-31T17:48:45Z")

</div>

A two container install is pretty much a stock install. If what you want is

> [@yanokwa](#):
>
> to run upgrades from the command line and minimize downtime when running those upgrades.

Then a two-container install is what you want.

---

<div class="post-metadata">

### Author: ![yanokwa](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/yanokwa/32/105083_2.png) [@yanokwa](https://meta.discourse.org/u/yanokwa)
#### Post date: [February 28, 2019, 11:34pm UTC](https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949/3 "2019-02-28T23:34:23Z")

</div>

As of [a few days ago](https://github.com/discourse/docker_manager/pull/52), it’s now possible to do upgrades via API (and thus curl). Thanks to @Osama for helping me with this!

To upgrade all, run this command:

```plaintext
curl -X POST "https:/example.com/admin/docker/upgrade" \
-H "Content-Type: application/x-www-form-urlencoded;" \
-d "path=all" \
-d "api_key=1234" \
-d "api_username=system"

```

`path` can be an absolute link to the plugin repo’s location on disk. So if you want run this on the discourse-solved plugin, you’d set path to `/var/www/discourse/plugins/discourse-solved`

There’s a pretty good API at starting at [docker\_manager/manager-client/app/models/repo.js#L134](https://github.com/discourse/docker_manager/blob/master/manager-client/app/models/repo.js#L134) that lets you find the latest versions, upgrade, and check progress. Don’t forget to the call from POST to GET as necessary.

---

<div class="post-metadata">

### Author: ![system](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/system/32/443519_2.png) [@system](https://meta.discourse.org/u/system)
#### Post date: [April 6, 2022, 2:34am UTC](https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949/4 "2022-04-06T02:34:06Z")

</div>



---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [April 6, 2022, 9:24am UTC](https://meta.discourse.org/t/how-to-run-upgrade-all-from-command-line/106949/5 "2022-04-06T09:24:39Z")

</div>


