Question

Errors running tootctl after deploying Mastodon 1-Click

Hello all. After deploying the 1-Click Mastodon droplet from the Marketplace, the setup completes successfully, the web interface displays and all indications from the web look good. However, from the CLI I can’t run any of the tootctl commands.

For example:

RAILS_ENV=production bin/tootctl --version

responds with:

/home/mastodon/live/vendor/bundle/ruby/3.0.0/gems/activerecord-6.1.7/lib/active_record/connection_adapters/postgresql/database_statements.rb:19:in `exec': PG::UndefinedTable: ERROR:  relation "accounts" does not exist (ActiveRecord::StatementInvalid)
LINE 8:  WHERE a.attrelid = '"accounts"'::regclass

And any tootctl command responds similarly. I selected the option to “Add a managed Database Cluster to work with your Mastodon Droplet” in order to simplify the db connection, and the info looks accurate in the .env.production file.

Any ideas as to what’s causing the tootctl message? I’ve blown away and created two instances and have had the same result.

Thanks for your assistance.

Show comments

Submit an answer


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!

Sign In or Sign Up to Answer

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.

FYI - the answer can be found here: https://github.com/mastodon/mastodon/discussions/18137#discussioncomment-4480337

Specifically /etc/environment has the correct db host, username, password, but incorrect database set (defaultdb, instead of mastodon_production)

Try DigitalOcean for free

Click below to sign up and get $200 of credit to try our products over 60 days!

Sign up

card icon
Get our biweekly newsletter

Sign up for Infrastructure as a Newsletter.

Sign up
card icon
Hollie's Hub for Good

Working on improving health and education, reducing inequality, and spurring economic growth? We’d like to help.

Learn more
card icon
Become a contributor

You get paid; we donate to tech nonprofits.

Learn more
Welcome to the developer cloud

DigitalOcean makes it simple to launch in the cloud and scale up as you grow – whether you’re running one virtual machine or ten thousand.

Learn more ->
DigitalOcean Cloud Control Panel