mirror of
https://github.com/plankanban/planka.git
synced 2026-02-25 03:14:50 +03:00
After installation I can't login with the default demo credentials #424
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @heathxp2 on GitHub (Mar 7, 2024).
Originally assigned to: @daniel-hiller on GitHub.
I installed the application on a Windows environment.
Created the database, uncommented the4 lines for the default admin and password.
Started and restarted the app multiple times.
I still get a Invalid e-mail or username at the login screen.
warn: Invalid email or username: "demo"! (IP: ::1)
warn: Invalid email or username: "demo@demo.demo"! (IP: ::1)
What can be the issue?
DEFAULT_ADMIN_EMAIL=demo@demo.demo
DEFAULT_ADMIN_PASSWORD=demo
DEFAULT_ADMIN_NAME=Demo Demo
DEFAULT_ADMIN_USERNAME=demo
@meltyshev commented on GitHub (Mar 8, 2024):
Hi! As far as I understand, you are running Planka without Docker? If so, do I understand correctly that you are changing the environment variables in the
server/.envfile? It could also be that you didn't copy/rename theserver/.env.sampletoserver/.env. But it's just a guess, we need more information about the installation method and where you're changing the environment variables 🙂@heathxp2 commented on GitHub (Mar 8, 2024):
Running planka without Docker, correct. Followed the "Manual Installation" on Windows 11.
Correct, I copied the .env.sample to .env and made the changes in the .env file. Double and triple checked that the changes applied.
Would it give me this error if maybe it doesn't have a correct connection to the database?
This seams very similar to issue #536 which doesn't have a root cause identified.
@meltyshev commented on GitHub (Mar 10, 2024):
Hm, that's sound strange. We'll try to test a Windows installation to check if there's some bug when reading environment variables. Hopefully we'll be able to find Windows for testing quickly.
@daniel-hiller commented on GitHub (Mar 11, 2024):
Hi,
i have tested the manuel installation on Windows,
everything is working just fine
Login with the demo credentials is also working
Please recheck all your steps
Here's what i did
Nodejs: v18.19.1
Postgres: 15.6.1
@FrankenApps commented on GitHub (Mar 12, 2024):
I am having the exact same issue after the manual installation.
If I explicetly add an user in the
.envfile, I can see it being created in the database, but when I try to login, I always get the messageInvalid e-mail or username.I have already tried all lowercase characters, etc. All while first dropping the
plankatable and then re-initiating it vianpm run db:init.Also when I leave it blank, I see that no user is created in the database, but I am still not able to login with
demo,demo.Maybe this is related to the postgres version or something like this?
It works just fine when installed using Docker, though.
Nodejs: v20.11.0
Postgres: 16.2.1
@meltyshev commented on GitHub (Mar 12, 2024):
Thanks for confirming this! We're trying to figure out what the problem might be...
I have one small question, the documentation references version 1.14.2 (and this is bad and should be corrected to the latest one). Did you use the latest version when installing or the one listed there?
@FrankenApps commented on GitHub (Mar 12, 2024):
No, I did use Version 1.15.6. But after it did not work I also tried it with the exact version currently mentioned in the docs without any luck.
@meltyshev commented on GitHub (Mar 12, 2024):
Would it be possible for you to connect to the database (via pgAdmin) and see what the table with users (user_account) looks like? Is there email and username in lower case letters? We still can't reproduce it, but there is probably something wrong since it happened to two users at once.
@FrankenApps commented on GitHub (Mar 12, 2024):
I just tried it with Postgres: 15.6.1 and it works just fine now (in order to quickly test I simply uncommented the default demo account in the
.envand tried it with that).I see no difference in the
user_accounttable compared to earlier though.I also tried it with the same credentials as before now and while I can confirm, that the username and email must be lowercase (if they aren't this also leads to this exact error), I am pretty sure I also tried this earlier when it did not work with Postgres 16.2.1.
@meltyshev commented on GitHub (Mar 12, 2024):
Big thanks for testing! Then we should indicate in the documentation that not to use Postgres 16.
I'll try to change that now, so that the account is always created with lowercase email and username even if they are written with capital letters.
@daniel-hiller commented on GitHub (Mar 12, 2024):
Hi,
@meltyshev and I have testet the installation again.
Now we used nodejs 20 and Postgres 16
Same result everything is working
@heathxp2 commented on GitHub (Mar 13, 2024):
I confirm downgrading to 15.6.1 fixed the issue.
Hopefully the team here has a plan to test and make sure planka works on latest postgreSQL version. Thank you!
@svet-b commented on GitHub (Jul 25, 2024):
Was facing the same exact issue, running on macOS (M1). Just wanted to also confirm that after switching the Postgres container frompostgres:latest(v16) topostgres:15, things worked as expected.EDIT: Actually this turned out to be incorrect. What I hadn't appreciated was that the
DEFAULT_ADMIN_user defined in.envis created at the time of database initialization only (i.e.npm run server:db:initif running outside of Docker). In other words, editing.envafter initialization does not cause the admin credentials to be updated unless the database is explicitly reinitialized. Simply runningnpm startdoes not pick up and apply new credentials.Of course I'm not ruling out a Postgres v16-related issue in other cases, but that did not turn out to be the issue in my case.
@meltyshev commented on GitHub (May 13, 2025):
In v2, admin users can be created using the
db:create-admin-userscript: https://docs.planka.cloud/docs/configuration/admin-user/.@gremo commented on GitHub (May 15, 2025):
I'm using Planka 1 with Docker and I'm getting the same error:
Using postgress 15 as per comments. My default admin is burned into my
compose.yaml:How I'm I supposed to login then?