# Arrêter correctement Discourse lorsque l'hôte s'éteint

**URL:** <https://meta.discourse.org/t/properly-shut-down-discourse-when-host-shuts-down/34493>\
**Category:** Product Support\
**Created:** [Octobre 14, 2015, 10:00 UTC](https://meta.discourse.org/t/properly-shut-down-discourse-when-host-shuts-down/34493 "2015-10-14T10:00:49Z")\
**Posts on this page:** 1\
**Showing post:** 1

<div class="post-metadata">

**Author:** ![fefrei](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/fefrei/32/119538_2.png) [@fefrei](https://meta.discourse.org/u/fefrei)\
**Post date:** [Octobre 14, 2015, 10:00 UTC](https://meta.discourse.org/t/properly-shut-down-discourse-when-host-shuts-down/34493/1 "2015-10-14T10:00:49Z")

</div>

About a year ago, @tobiaseigen asked how to properly shut down Discourse:

> [@tobiaseigen](#):
>
> Apologies for the newb question.
> 
> My preferred workflow has been to do a snapshot on the digitalocean dashboard before doing discourse updates, in case Bad Things Happen. As I am realizing now, just running `shutdown now -h` appears to not be enough and shuts down the server while docker is running. Do I need to run this instead?
> 
> ```
> cd /var/discourse && ./launcher stop app && shutdown now -h
> 
> ```
> 
> Is there a way to add this to a shutdown process so that the shutdown is clean? Or am I wrong in pinpointing this as the source of my woes? Is there another way my database could be getting corrupted?

The conclusion was that a `./launcher stop app` should now suffice. This is great, _but it still is a separate step_. It won’t help you if another sysadmin shuts down your system, or if `unattended-upgrades` decides that a reboot is due _now_.

Is there a way (on Ubuntu) to ensure that Discourse always shuts down properly if the system is rebooted?

---

_[View the full topic](https://meta.discourse.org/t/properly-shut-down-discourse-when-host-shuts-down/34493)._
