Updating Mastodon and creating backups are important steps to ensure the security and stability of your instance. Here’s a comprehensive tutorial on how to update Mastodon, including making backups of the database and assets:
Note: Always perform updates on a test/staging instance before applying them to your live instance. This tutorial assumes you have some basic knowledge of the command line and server administration.
Click here for the backup steps. It basically comes down to a Database dump, a settings file backup and a Redis dump. If you wish to backup your assets like images and stuff (User-uploaded files), backup the folder named “public/system”. Keep in mind that this folder can be rather large. Actually, it can become rather massive.
You can always check the folder size by using NCDU, for which you can find the manual here. Also, installations may vary, but this is an example of my instance.
su - mastodon
git fetch --tags
git checkout [type the most recent version here, starting with the letter v. For example; v4.0.1
Command example: git checkout v4.0.1
If you don’t want to restart your server, use the following commands instead of “reboot now”:
systemctl restart mastodon-sidekiq
systemctl reload mastodon-web
The reload operation is a zero-downtime restart, also called a “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.
The streaming API server is also updated and requires a restart; doing so will result in all connected clients being disconnected, which can increase the load on your server:
Finally, there is an official Joomla (4.x) Docker made for unRAID. But it is not done well. As in, you will lose all your settings and data when you restart your docker. So you need to copy the data outside the docker into the appdata folder. (Or wherever you want it)
Inside the docker image, the Joomla folder resides here:
And this is the folder you need to make “external” by adding a path to the edit/install panel.
Since unraid forum is throwing a hissyfit with its captcha thing, I’ll just post it on my own website.
root@<containername>:/data# archivebox manage createsuperuser
[i] [2021-11-11 14:29:07] ArchiveBox v0.6.2: archivebox manage createsuperuser
[i] ArchiveBox should never be run as root!
For more information, see the security overview documentation:
This of course, made me extremely nervous. Luckily this only meant that my docker file got corrupted. It happened most likely while I was moving it while the docker service was still active. Yeah, it happens.
It’s fairly simple, but it takes a little bit of time.
Go to Settings -> Docker -> Enable Docker, and set to No, then click the Apply button (this disables Docker support)
Go to the location of your docker image and rename the file to docker.img.bak – The file may be in
I’m asking you to make a backup, because in all cases, safety first. “Why didn’t you have a backup in the first place?”, I hear you say. Yeah yeah, we all make mistakes every so often! D:
Go to Settings -> Docker -> Enable Docker, and set to Yes and this creates a fresh and empty Docker image. The docker service should now be started. You can see this as this on the docker settings page:
and on the dashboard you should now see an empty docker field.
Now go to the Apps Tab, Previous Apps Section. Then check off all of your previous applications and hit “Install”
I recommend to do it one by one so you can double-check the settings and clean up the unused templates after you’re done. If you want to make a copy of the templates, FTP into your server and go to
After you have restored your docker apps, you’re done. Check all the things and make a backup 😉