Unable to log in to Mastodon on Cloudron after installation
-
Hi everyone,
I’ve installed Mastodon through Cloudron, and everything seems to be running correctly — the app is healthy and accessible.
However, I’m unable to log in using the username and password that were created automatically by Cloudron during installation.I’ve tried multiple troubleshooting steps (checking the domain setup, restarting the app, verifying the .env variables, clearing browser cache, and even creating new users), but nothing works — it feels like something is blocking all logins entirely.
Has anyone encountered this issue before?
Could there be a specific configuration or Cloudron permission that prevents Cloudron users from logging into Mastodon directly?Thanks in advance for any help!
-
Hello @yossi6206
I have just installed the latest version of the Cloudron Mastodon app and while installation I chose the option
Allow all users from this Cloudron
.
After the app was running I was able to log in with my Cloudron account with no issues:
When choosing
Allow all users from this Cloudron
:@yossi6206 said in Unable to log in to Mastodon on Cloudron after installation:
However, I’m unable to log in using the username and password that were created automatically by Cloudron during installation.
There is no automatically created user.
To make sure, I installed the app again with the option
Leave user management to the app
.
To enable registration I need to enable this first according to the doc, but I need an account first.
So, create a user first and make him admin https://docs.cloudron.io/packages/mastodon/#adding-users/app/code/bin/tootctl accounts create james --email=james@cloudron.dev --approve
Which gave me the password
8b5dab43b9c4e88bbf3f8ce23818c7ac
and after confirming my account I was able to login.
-
Just to add. Unless you want to restrict your instance of Mastodon to ONLY your users, you probably don't want to integrate it with Cloudron login at all. (Things may have changed since we moved from LDAP to OIDC but certainly in the past) Cloudron login integration did not play well with public accounts at all (from memory, the latter were unable to successfully reset passwords, etc).
-
@james
Hi,First of all, thank you very much for taking the time to respond to my question and provide a solution to my issue — I really appreciate it!
In the end, I managed to log in to Mastodon by manually creating an admin user.
Here’s the command I used inside the Mastodon directory:RAILS_ENV=production bundle exec rails console << 'SCRIPT'
user = User.new(email: 'user@example.com', password: 'StrongPassword123!', password_confirmation: 'StrongPassword123!', agreement: true, confirmed_at: Time.now.utc)
user.account = Account.new(username: 'username')
user.save!
user.approve!
user.update(role: UserRole.find_by(name: 'Owner'))
puts "User created successfully: #{user.account.username} (#{user.email})"
SCRIPTOnly after creating the admin user this way, I was able to successfully access Mastodon.
Best regards,
Yossi