Creating a User in Mastodon from the Interactive Ruby Shell
Why
I found myself wanting to create a bot account for my Mastodon installation.
But, I didn’t want to have to set up and configure an email and go through the whole account confirmation email.
These commands did it and let me log in and create an app and start posting.
At the time of writing this applies to at least Mastodon 4.0.6.
How
Enter the Ruby interactive shell as the mastodon
user.
1 | ~/live$ whoami |
Create the Account
record, followed by the User
record.
1 | account = Account.create!(username:'username_of_new_account') |
Take some actions to confirm the account, without needing to actually have an email and persist the records.
1 | user.confirm |
Go login to the account and do what you need to do.