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.
- Connect to your server via sshclass="highlight">
1
systemctl stop mastodon-*
- switch to the mastodon user account
class="highlight">1 2
su - mastodon -s /bin/bash cd ~/live
- Checkout the new version and make sure that we are using the correct local ruby version is installed
class="highlight">1 2 3
git fetch git checkout v4.2.0 rbenv install $(cat .ruby-version) --verbose
- Upgrade the environment
class="highlight">1 2 3 4 5
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
- Finally start all the mastodon services. You will need to exit from the mastodon service account
class="highlight">1 2 3
sudo systemctl restart mastodon-sidekiq.service sudo systemctl restart mastodon-web.service sudo systemctl restart mastodon-streaming.service
- Shortly you should be able to access your instance
Mastodon Icon By Eugen Rochko & other Mastodon contributors - (https://blog.joinmastodon.org/), AGPL,
Related Posts
- switch to the mastodon user account