I have created my Mastodon instance hosted on Digital Ocean through the One-Click app they offer. Due to so many security issues, I believe it’s time to upgrade for obvious security reasons. At this time the lasted version out is Mastodon version 4.0.2 and I am still on version 3.1.3 Is it possible to upgrade to my current (droplet) version without wiping out my existing instance? Any help, direction, or tutorials would be greatly appreciated. Thank you.
This textbox defaults to using Markdown to format your answer.
You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!
These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.
Enter your email to get $200 in credit for your first 60 days with DigitalOcean.
New accounts only. By submitting your email you agree to our Privacy Policy.
Hi friend,
I just did this very thing. I don’t know if it’s the best way, but it worked for me.
SSH into your droplet
Some of these steps could take a while to complete, you may want to consider persisting your session with screen or tmux, so you can come back to long-running processes if your ssh connection breaks.
Switch to the mastodon user
Move to the mastodon directory
Make sure you have the latest tag and check into it
The major version bump introduced an update to the Ruby version, you’ll have to install it. This will take quite a long time, go grab a a meal.
Install the gems for the new version
Run the new rails migrations in production mode
Install a fresh set of node packages
Build the JS bundle
Exit the mastodon user
Restart all the services
And done, you’re on the latest version of Mastodon.
Frustrating! I have followed instructions and even set a swap file and I am still stuck on version 3.1.3. Does anyone have insight as to why this will not upgrade? I am not a coder so I have little experience with that.
I found this and was able to successfully migrate thanks to this advice…
https://youtu.be/dJa6eAo7HcA
I had to do a git reset to accomplish this - which was the snag as I kept getting an Ambiguous result when I did the git checkout of v4.0.2.
THis subsequent article helped me overcome that hurdle.
https://www.freecodecamp.org/news/git-reset-origin-how-to-reset-a-local-branch-to-remote-tracking-branch/