Upgrading to a new release
master
branch, while possible, is not recommended.Mastodon releases correspond to git tags. Before attempting an upgrade, look up the desired release on the GitHub releases page. The page will contain a changelog describing everything you need to know about what's different, as well as specific upgrade instructions.
To begin, switch to the mastodon
user:
su - mastodon
And navigate to the Mastodon root directory:
cd /home/mastodon/live
Download the releases’s code, assuming that the version is called v3.1.2
:
git fetch --tags
git checkout v3.1.2
Now execute the upgrade instructions that are included in that version's release notes on GitHub. Because different releases require different instructions, we do not include any instructions on this page.
After you have executed the instructions from the release notes, switch back to root:
exit
Restart background workers:
systemctl restart mastodon-sidekiq
And reload the web process:
systemctl reload mastodon-web
reload
operation is a zero-downtime restart, also called “phased restart”. As such, Mastodon upgrades usually do not require any advance notice to users about planned downtime. In rare cases, you can use the restart
operation instead, but there will be a (short) felt interruption of service for your users.Rarely, the streaming API server is also updated and requires a restart:
systemctl restart mastodon-streaming
Last updated February 28, 2020 · Improve this page
Also available in:
简体中文