# Upgrade procedure self hosted

**URL:** <https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862>\
**Category:** Troubleshooting\
**Created:** [January 23, 2023, 11:24am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862 "2023-01-23T11:24:52Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![cube](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@cube](https://forum.mattermost.com/u/cube)\
**Post date:** [January 23, 2023, 11:24am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/1 "2023-01-23T11:24:52Z")

</div>

Dear Mattermost community.

I’m want to upgrade mattermost from version 6.5.0 to 7.7 (self hosted on UBUNTU Server). I have a question regarding

[Importan upgrade notes](https://docs.mattermost.com/upgrade/important-upgrade-notes.html)

There are several MySQL commands (since I’m using mySQL as database engine) or other config.json changes. Must I execute all this commands before the upgrade on the server, or is it done automatically during the upgrade by mattermost itself?

I will be appreciated for any hel regarding this topic.  
Best regards  
Jakub

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [January 23, 2023, 11:28am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/2 "2023-01-23T11:28:39Z")

</div>

Hi Jakub and welcome to the Mattermost forums!

You do not need to execute the queries before running the upgrade, Mattermost will do that on its own. With MySQL, unfortunately, some of the necessary schema migrations take quite some time and while they are running, Mattermost is not usable and therefore these queries are provided to be run manually before the upgrade steps in order to keep the downtime as short as possible.  
If you can afford a few minutes of downtime, you do not have to manually prepare your setup and just follow the upgrade guides.  
You also do not need to change anything in your `config.json` file, just make sure that after the upgrade, you login to your system console, change one setting and change it back and then click on save in order for the application to write a new config.json file adding potentially missing configuration options.

---

<div class="post-metadata">

**Author:** ![cube](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@cube](https://forum.mattermost.com/u/cube)\
**Post date:** [January 23, 2023, 11:36am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/3 "2023-01-23T11:36:54Z")

</div>

Thank you for you answer. I think all my doubts has been cleared now.

Best regards  
Jakub

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [January 23, 2023, 11:46am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/4 "2023-01-23T11:46:56Z")

</div>

You’re welcome! If you stumble upon any issues, let me know - here to help!

---

<div class="post-metadata">

**Author:** ![cube](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@cube](https://forum.mattermost.com/u/cube)\
**Post date:** [January 24, 2023, 5:33am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/5 "2023-01-24T05:33:49Z")

</div>

Hello,

The system is upgraded. I had problem with executing one command from this manual:  
[https://docs.mattermost.com/upgrade/upgrading-mattermost-server.html](https://docs.mattermost.com/upgrade/upgrading-mattermost-server.html)

```auto
administrator@mattermost:/opt$ sudo find mattermost/ mattermost/client/ -mindepth 1 -maxdepth 1 \! \( -type d \( -path mattermost/client -o -path mattermost/client/plugins -o -path mattermost/config -o -path mattermost/logs -o -path mattermost/plugins -o -path mattermost/data -o -path mattermost/yourFolderHere \) -prune \) | sort | sudo xargs rm
rm: missing operand

```

Can it be a problem?  
Best regards  
Jakub

---

<div class="post-metadata">

**Author:** ![agriesser](https://sea2.discourse-cdn.com/flex020/user_avatar/forum.mattermost.com/agriesser/32/5644_2.png) [@agriesser](https://forum.mattermost.com/u/agriesser)\
**Post date:** [January 24, 2023, 6:01am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/6 "2023-01-24T06:01:52Z")

</div>

Hey,

this is OK, IMHO the docs are not clear about that in some point. They will show you the command to run first in step 7 and will then detail the process again inside this step and when you followed all the commands, you’ve already deleted the folders directly at the beginning of step 7 and will then probably get the error when running the command directly above the `Using Bleve search` heading:

 ![grafik](https://us1.discourse-cdn.com/flex020/uploads/mattermost/original/2X/0/08d9b6fd526095cac8e59e436be92af278c5eae2.png)

---

<div class="post-metadata">

**Author:** ![cube](https://avatars.discourse-cdn.com/v4/letter/c/9fc348/32.png) [@cube](https://forum.mattermost.com/u/cube)\
**Post date:** [January 24, 2023, 9:32am UTC](https://forum.mattermost.com/t/upgrade-procedure-self-hosted/14862/7 "2023-01-24T09:32:24Z")

</div>

Thank you. At the moment everything is running and nobody complains.

I think the topic can be closed.
