This tutorial explains step by step how to create and confirm a SuperAdmin user in Chatwoot after deployment when the initial user creation fails. It covers methods for Docker, Portainer, and local host setups.
🎥 YouTube Video Tutorial: Click here to watch
docker exec -it $(docker ps --filter name=srv-captain--chatwoot-web -q) /bin/sh
This command enters the Chatwoot container.
RAILS_ENV=production bundle exec rails c
SuperAdmin.create!(
email: '[email protected]',
password: 'Str0ngP@ssw0rd!',
name: 'Admin Chatwoot'
)
⚠️ Use a strong password with numbers, uppercase, lowercase, and special characters.
admin = SuperAdmin.find_by(email: '[email protected]')
admin.confirmed_at = Time.now
admin.confirmation_token = nil
admin.save!
exit
docker restart $(docker ps --filter name=srv-captain--chatwoot-web -q)
Now, access Chatwoot at:
https://your-domain.com/super_admin
- Open Portainer and navigate to your Chatwoot container.
- Click on Console and select /bin/sh.
- Inside the terminal, run:
RAILS_ENV=production bundle exec rails c
- Follow the same steps 3️⃣, 4️⃣, and 5️⃣ as in the Docker guide.
RAILS_ENV=production bundle exec rails c
SuperAdmin.create!(
email: '[email protected]',
password: 'Str0ngP@ssw0rd!',
name: 'Admin Chatwoot'
)
admin = SuperAdmin.find_by(email: '[email protected]')
admin.confirmed_at = Time.now
admin.confirmation_token = nil
admin.save!
sudo systemctl restart chatwoot
Now, access:
https://localhost:3000/super_admin
Check if the user exists:
SuperAdmin.all
If empty, create the user again.
Reset the password:
admin = SuperAdmin.find_by(email: '[email protected]')
admin.password = 'NewP@ssword123!'
admin.save!
Now, you have a working SuperAdmin in Chatwoot! 🚀 If you encounter issues, check the logs and ensure the database is running.
🔗 Watch the tutorial video here: Click here