From 7f0a0ebaa5371ba923e798a2cf469d214b29aa0e Mon Sep 17 00:00:00 2001 From: Eugen Rochko Date: Wed, 26 Sep 2018 00:51:12 +0200 Subject: [PATCH] Add page about upgrading mastodon --- content/en/administration/upgrading.md | 51 ++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 content/en/administration/upgrading.md diff --git a/content/en/administration/upgrading.md b/content/en/administration/upgrading.md new file mode 100644 index 00000000..10ad726e --- /dev/null +++ b/content/en/administration/upgrading.md @@ -0,0 +1,51 @@ +--- +title: Upgrading to a new release +description: How to upgrade Mastodon to a newer version +menu: + docs: + parent: administration + weight: 5 +--- + +When a new version of Mastodon comes out, it appears on the [GitHub releases page](https://github.com/tootsuite/mastodon/releases). Please mind that running unreleased code from the `master` branch, while possible, is not recommended. + +Mastodon releases correspond to git tags. First, switch to the `mastodon` user: + +```sh +su - mastodon +``` + +And navigate to the Mastodon root directory: + +```sh +cd /home/mastodon/live +``` + +Download the releases's code, assuming that the version is called `v2.5.0`: + +```sh +git fetch --tags +git checkout v2.5.0 +``` + +The release page contains a changelog, and below it, upgrade instructions. This is where you would execute them, for example, if the release mentions that you need to re-compile assets, you would execute: + +```sh +RAILS_ENV=production bundle exec rails assets:precompile +``` + +After you have executed all special release-specific instructions, the last thing remaining is restarting Mastodon. *Usually* the streaming API is not updated, and therefore does not require a restart. Restarting the streaming API can lead to an unusually high load on the server, so it is advised to avoid it if possible. + +You would restart Sidekiq: + +```sh +systemctl restart mastodon-sidekiq +``` + +And you would reload the web process to avoid downtime: + +```sh +systemctl reload mastodon-web +``` + +**That's all!** You're running the new version of Mastodon now.