Fixing admin missing in Mastodon installation on DigitalOcean

An issue in the default marketplace image, makes it impossible to administer the server and configure all the site-wide settings through Mastodon's web UI

DigitalOcean recently updated its Marketplace image of Mastodon to 4.0.2. Unfortunately, at the time of this writing, there is a problem whereafter installing this onto a new droplet one will not be able to see the administration screen.

In other words, due to this issue, upon the first login to Mastodon's web UI after completing the setup it will not be possible to administer the server and configure all the various site-wide settings.

To fix this, upon completion of the setup, it's necessary to SSH to the droplet and manually set the initial user as an Owner. Note that the default user is named admin.

Below are the steps to fix the issue once connected to the droplet via SSH, assuming the initial user is named admin. Also, note that droplet is used generically here and will be a different word depending on the name of the actual droplet on DigitalOcean:

[email protected]:~# su - mastodon
[email protected]:~$ cd live
[email protected]:~/live$ RAILS_ENV=production bundle exec rails db:migrate
[email protected]:~/live$ exit
logout
[email protected]:~# sudo systemctl restart mastodon-web
[email protected]:~# sudo systemctl restart mastodon-streaming
[email protected]:~# sudo systemctl restart mastodon-sidekiq
[email protected]:~# su - mastodon
[email protected]:~$ cd live
[email protected]:~/live$ RAILS_ENV=production bin/tootctl accounts modify admin --role Owner
[email protected]:~/live$ exit
logout
[email protected]:~# sudo systemctl restart mastodon-web
[email protected]:~# sudo systemctl restart mastodon-streaming
[email protected]:~# sudo systemctl restart mastodon-sidekiq
[email protected]:~# exit