After installation I can't login with the default demo credentials #424

Closed
opened 2026-02-04 19:11:45 +03:00 by OVERLORD · 15 comments
Owner

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

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
Author
Owner

@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/.env file? It could also be that you didn't copy/rename the server/.env.sample to server/.env. But it's just a guess, we need more information about the installation method and where you're changing the environment variables 🙂

@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/.env` file? It could also be that you didn't copy/rename the `server/.env.sample` to `server/.env`. But it's just a guess, we need more information about the installation method and where you're changing the environment variables 🙂
Author
Owner

@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.

@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.
Author
Owner

@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.

@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.
Author
Owner

@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

cd C:\planka
>> curl https://github.com/plankanban/planka/releases/download/v1.15.6/planka-prebuild-v1.15.6.zip -o planka-prebuild.zip
>> Expand-Archive  -Force planka-prebuild.zip -DestinationPath C:\
>> rm planka-prebuild.zip
PS C:\planka> npm install

added 69 packages, removed 30 packages, and changed 73 packages in 6s

117 packages are looking for funding
  run `npm fund` for details
PS C:\planka> npm run db:init

> db:init
> node db/init.js

PS C:\planka> npm start --prod

> start
> nodemon

[nodemon] 3.0.1
[nodemon] to restart at any time, enter `rs`
[nodemon] watching path(s): *.*
[nodemon] watching extensions: js,mjs,cjs,json
[nodemon] starting `node app.js`

debug: It looks like your `sails.config.sockets.onlyAllowOrigins` array only includes
debug: references to the `localhost` origin.  This is completely valid, but be sure
debug: to add any other origins to this list that you'd like to accept socket
debug: connections from!
debug:

Nodejs: v18.19.1
Postgres: 15.6.1

@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 ``` cd C:\planka >> curl https://github.com/plankanban/planka/releases/download/v1.15.6/planka-prebuild-v1.15.6.zip -o planka-prebuild.zip >> Expand-Archive -Force planka-prebuild.zip -DestinationPath C:\ >> rm planka-prebuild.zip PS C:\planka> npm install added 69 packages, removed 30 packages, and changed 73 packages in 6s 117 packages are looking for funding run `npm fund` for details PS C:\planka> npm run db:init > db:init > node db/init.js PS C:\planka> npm start --prod > start > nodemon [nodemon] 3.0.1 [nodemon] to restart at any time, enter `rs` [nodemon] watching path(s): *.* [nodemon] watching extensions: js,mjs,cjs,json [nodemon] starting `node app.js` debug: It looks like your `sails.config.sockets.onlyAllowOrigins` array only includes debug: references to the `localhost` origin. This is completely valid, but be sure debug: to add any other origins to this list that you'd like to accept socket debug: connections from! debug: ``` Nodejs: v18.19.1 Postgres: 15.6.1
Author
Owner

@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 .env file, I can see it being created in the database, but when I try to login, I always get the message Invalid e-mail or username.
I have already tried all lowercase characters, etc. All while first dropping the planka table and then re-initiating it via npm 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

@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 `.env` file, I can see it being created in the database, but when I try to login, I always get the message `Invalid e-mail or username`. I have already tried all lowercase characters, etc. All while first dropping the `planka` table and then re-initiating it via `npm 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
Author
Owner

@meltyshev 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 .env file, I can see it being created in the database, but when I try to login, I always get the message Invalid e-mail or username. I have already tried all lowercase characters, etc. All while first dropping the planka table and then re-initiating it via npm 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

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?

@meltyshev 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 `.env` file, I can see it being created in the database, but when I try to login, I always get the message `Invalid e-mail or username`. I have already tried all lowercase characters, etc. All while first dropping the `planka` table and then re-initiating it via `npm 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 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?
Author
Owner

@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 .env file, I can see it being created in the database, but when I try to login, I always get the message Invalid e-mail or username. I have already tried all lowercase characters, etc. All while first dropping the planka table and then re-initiating it via npm 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

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?

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.

@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 `.env` file, I can see it being created in the database, but when I try to login, I always get the message `Invalid e-mail or username`. I have already tried all lowercase characters, etc. All while first dropping the `planka` table and then re-initiating it via `npm 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 > > > > 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? 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.
Author
Owner

@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.

@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.
Author
Owner

@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 .env and tried it with that).
I see no difference in the user_account table 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.

@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 `.env` and tried it with that). I see no difference in the `user_account` table 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.
Author
Owner

@meltyshev 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 .env and tried it with that). I see no difference in the user_account table compared to earlier though.

Big thanks for testing! Then we should indicate in the documentation that not to use Postgres 16.

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.

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.

@meltyshev 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 `.env` and tried it with that). I see no difference in the `user_account` table compared to earlier though. Big thanks for testing! Then we should indicate in the documentation that not to use Postgres 16. > 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. 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.
Author
Owner

@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

@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
Author
Owner

@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!

@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!
Author
Owner

@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 from postgres:latest (v16) to postgres: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 .env is created at the time of database initialization only (i.e. npm run server:db:init if running outside of Docker). In other words, editing .env after initialization does not cause the admin credentials to be updated unless the database is explicitly reinitialized. Simply running npm start does 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.

@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 from `postgres:latest` (v16) to `postgres: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 `.env` is created at the time of database initialization _only_ (i.e. `npm run server:db:init` if running outside of Docker). In other words, editing `.env` after initialization does not cause the admin credentials to be updated unless the database is explicitly reinitialized. Simply running `npm start` does 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.
Author
Owner

@meltyshev commented on GitHub (May 13, 2025):

In v2, admin users can be created using the db:create-admin-user script: https://docs.planka.cloud/docs/configuration/admin-user/.

@meltyshev commented on GitHub (May 13, 2025): In v2, admin users can be created using the `db:create-admin-user` script: https://docs.planka.cloud/docs/configuration/admin-user/.
Author
Owner

@gremo commented on GitHub (May 15, 2025):

I'm using Planka 1 with Docker and I'm getting the same error:

[W] Invalid email or username: "admin".

Using postgress 15 as per comments. My default admin is burned into my compose.yaml:

services:
        container_name: ${COMPOSE_PROJECT_NAME}-planka
        image: ghcr.io/plankanban/planka:latest
        volumes:
          - planka-user-avatars:/app/public/user-avatars
          - planka-project-background-images:/app/public/project-background-images
          - planka-attachments:/app/private/attachments
        environment:
            BASE_URL: https://${DOMAIN:?}
            DATABASE_URL: postgres://planka:${DB_PASSWORD:?}@db.local/planka
            DEFAULT_ADMIN_EMAIL: admin@admin.com
            DEFAULT_ADMIN_USERNAME: admin
            DEFAULT_ADMIN_PASSWORD: password

How I'm I supposed to login then?

@gremo commented on GitHub (May 15, 2025): I'm using Planka 1 with Docker and I'm getting the same error: > [W] Invalid email or username: "admin". Using postgress 15 as per comments. My default admin is burned into my `compose.yaml`: ```yaml services: container_name: ${COMPOSE_PROJECT_NAME}-planka image: ghcr.io/plankanban/planka:latest volumes: - planka-user-avatars:/app/public/user-avatars - planka-project-background-images:/app/public/project-background-images - planka-attachments:/app/private/attachments environment: BASE_URL: https://${DOMAIN:?} DATABASE_URL: postgres://planka:${DB_PASSWORD:?}@db.local/planka DEFAULT_ADMIN_EMAIL: admin@admin.com DEFAULT_ADMIN_USERNAME: admin DEFAULT_ADMIN_PASSWORD: password ``` How I'm I supposed to login then?
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/planka#424