The Schwarrisons

Upgrading to Mastodon 4.2

A quick how-to for those who find documentation too difficult to read
Upgrading to Mastodon 4.2

The mastodon documentation contains great information on how to upgrade your mastodon instance between one update and another, but if you want the quick and dirty for a basic setup, here is the process.

  1. Shortly you should be able to access your instance

Finally start all the mastodon services. You will need to exit from the mastodon service account

sudo systemctl restart mastodon-sidekiq.service
sudo systemctl restart mastodon-web.service
sudo systemctl restart mastodon-streaming.service

Upgrade the environment

bundle install
RAILS_ENV=production bundle exec rails db:migrate
rm -rf node_modules && yarn install
yarn build:production
RAILS_ENV=production bundle exec rails assets:precompile

Checkout the new version and make sure that we are using the correct local ruby version is installed

git fetch
git checkout v4.2.0
rbenv install $(cat .ruby-version) --verbose

switch to the mastodon user account

su - mastodon -s /bin/bash
cd ~/live

Connect to your server via ssh

systemctl stop mastodon-*
About the author
Stephen Schwetz

The Schwarrisons

Herping the derp!!

The Schwarrisons

Great! You’ve successfully signed up.

Welcome back! You've successfully signed in.

You've successfully subscribed to The Schwarrisons.

Success! Check your email for magic link to sign-in.

Success! Your billing info has been updated.

Your billing was not updated.