# Self-upgrade architecture?

**URL:** https://meta.discourse.org/t/self-upgrade-architecture/135580
**Category:** Development
**Created:** [December 10, 2019, 5:28pm UTC](https://meta.discourse.org/t/self-upgrade-architecture/135580 "2019-12-10T17:28:43Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![tomsmyth1](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tomsmyth1/32/106978_2.png) [@tomsmyth1](https://meta.discourse.org/u/tomsmyth1)
#### Post date: [December 10, 2019, 5:28pm UTC](https://meta.discourse.org/t/self-upgrade-architecture/135580/1 "2019-12-10T17:28:43Z")

</div>

Is there anything written up about how Discourse’s self upgrade function works? If not, any pointers at where to look in the code?

Is it a suitable model for other Rails apps to follow? If not, are there better patterns out there? I haven’t come across any.

Thanks for considering!

---

<div class="post-metadata">

### Author: ![Falco](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/falco/32/179432_2.png) [@Falco](https://meta.discourse.org/u/Falco)
#### Post date: [December 10, 2019, 6:06pm UTC](https://meta.discourse.org/t/self-upgrade-architecture/135580/2 "2019-12-10T18:06:01Z")

</div>

> [@tomsmyth1](#):
>
> any pointers at where to look in the code?

It’s a self-contained Discourse plugin, and it lives at [GitHub - discourse/docker\_manager: Plugin for use with discourse docker image · GitHub](https://github.com/discourse/docker_manager). The magic happens mostly at [docker\_manager/lib/docker\_manager/upgrader.rb at main · discourse/docker\_manager · GitHub](https://github.com/discourse/docker_manager/blob/master/lib/docker_manager/upgrader.rb).

> [@tomsmyth1](#):
>
> Is it a suitable model for other Rails apps to follow?

It’s very user friendly and makes sense for Discourse since we try to conceal the complexity of running a modern web app in production, making non-tech users able to update their instances when needed.

Also there are thousands of instances out there and we need to take steps in order to minimize the support burden. You should be familiar with open source projects with thousands of open issues. We don’t want that.
