Unable to log in with default credentials
OS & Hardware VPS running Ubuntu 24 LTS
Version 0.22.1
Describe the bug Default credentials not working to log in
To Reproduce Steps to reproduce the behavior:
- Clean install using docker
- Go to https://domain.com/users/sign_in
- Enter default credentials ([email protected]/password)
- Login fails, Incorrect email or password
Expected behavior A clear and concise description of what you expected to happen.
Screenshots N/A
Logs N/A
Additional context N/A
Please provide logs
Please provide logs
Any logs in particular?
Please provide logs
Any logs in particular?
yes, logs from dawarich_app container at the time of the attempt to sign in
I'm having the same issue but there is nothing notable in the logs.
I, [2025-01-12T20:47:21.455054 #76] INFO -- : {"method":"GET","path":"/users/sign_in","format":"html","controller":"Devise::SessionsController","action":"new","status":200,"allocations":5804,"duration":25.42,"view":24.12,"db":0.0}
This is the request from the login attempt, which is the only entry that gets logged when trying to log in.
To add to this: The users table in the DB is empty. I assume this is the cause of the issue as long as the default user is not hardcoded.
Is there a workaround to create a new user manually from CLI or encrypt (hash?) a password manually to insert a new user manually.
Investigating further: The issue is/was the 'production' setup variant. The default user only gets created in non-production setups. I'd suggest to note this in the documentation since I'd assume having a 'production' setup, the other setup is just a 'demo'.
@philskents did you use the production setup too?
Investigating further: The issue is/was the 'production' setup variant. The default user only gets created in non-production setups. I'd suggest to note this in the documentation since I'd assume having a 'production' setup, the other setup is just a 'demo'.
@philskents did you use the production setup too?
The production environment, however counter-intuitive it might sound, is not a recommended environment to run Dawarich as of now and was clearly stated in the notes to one of the most recent releases and written here on Github before that.
To create a new user, run on the console:
User.create(email: '[email protected]', password: 'password', admin: true)
Thanks for the quck response!
I'm a 'new' user who just discovered dawarich. Neither the readme nor the documentation state anything about the production environment and personally I don't think it is intuitive to look into release notes of older versions to troubleshoot a bug that wasn't caused by upgrading from an older version.
To prevent other people from loosing time on debugging something like this (or not using dawarich at all), I'd still suggest to add a short note regarding the default login in either the documentation, readme or at least the 'production' docker compose file. Also because for me it is intuitive to have a default user or some sort of setup mechanism - even in a production environment.
Yeah my bad, read the docs, not the release notes
Yeah my bad, read the docs, not the release notes
You're right, it's not in the docs on the website, I'll add it soon. Thanks!
I have also had this problem during setup where the installation doesn't create any users is very confusing for non-technical users. The current solution that I found on other forums of logging into the ruby console and adding an 'admin' user is very confusing for non-technical users.
I have also had this problem during setup where the installation doesn't create any users is very confusing for non-technical users. The current solution that I found on other forums of logging into the ruby console and adding an 'admin' user is very confusing for non-technical users.
I'm assuming you're either running it on Unraid or in production environment.
The problem is whoever created the Unraid template, used docker-compose.production.yml while it's not intended for usage as of now.
Anyway, 0.22.4 version of Dawarich is now creating the default user even in production env, so I'm closing this.
In the future, I'd love to have contact with the person who's working on the Unraid template and have these issues to be posted there.