openproject-deploy
openproject-deploy copied to clipboard
Default admin password is not working
I am using TAG=14-slim (used TAG=14 as well) and cannot login with admin - admin password.
I get error:
Invalid user or password or the account is blocked due to multiple failed login attempts. If so, it will be unblocked automatically in a short time.
I tried to reset password using this instruction:
https://www.openproject.org/docs/installation-and-operations/operation/faq/
But it also doesn't work, I get error:
irb(main):004> u.save!
(irb):4:in `
I tried to add root user to docker containers a someone suggested - same result.
I have the same problem. :/ Instead of the stable/14 branch, I use stable/13. It is not up to date, but works for testing.
I have the same problem. :/ Instead of the stable/14 branch, I use stable/13. It is not up to date, but works for testing.
I found (think so) the root cause. In docker compose file they bind directories inside container to the directory on host, where user has no write permissions. I just created docker volumes instead and replaced assignment in docker compose file (also, it is possible to chown for that binded folder).
I have the same problem. :/ Instead of the stable/14 branch, I use stable/13. It is not up to date, but works for testing.
I found (think so) the root cause. In docker compose file they bind directories inside container to the directory on host, where user has no write permissions. I just created docker volumes instead and replaced assignment in docker compose file (also, it is possible to chown for that binded folder).
I experienced the same issue, and following the above solution worked for me too. Here are the steps I took:
- Run
cp .env.example .env. - Leave
PGDATA=andOPDATA=empty in the.envfile. This automatically creates Docker volumes, and the setup works smoothly.
this work for me,
To resolve the issue with administrator access in OpenProject when the default admin - admin login doesn’t work, follow these steps:
-
Create a user account in the OpenProject web application:
- Access OpenProject in your browser and create a new user account without administrator privileges. This account will serve as a base to grant administrative access.
-
Access the database container in Docker:
- Enter the PostgreSQL container that holds the OpenProject database:
docker exec -it openproject-db-1 psql -U postgres -d openproject
- Enter the PostgreSQL container that holds the OpenProject database:
-
Verify the account's administrator status:
- Run the following query to check if the account is set as an administrator:
SELECT id, login, admin, status FROM users WHERE login = 'your_username'; - Replace
'your_username'with the username you created in step 1.
- Run the following query to check if the account is set as an administrator:
-
Promote the account to administrator (if necessary):
- If the
adminfield is set tofalse(f), update it totrue(t) to grant administrator privileges:UPDATE users SET admin = true WHERE login = 'your_username';
- If the
-
Activate the account:
- Ensure the
statusfield is set to allow access (typically,status = 1indicates an active account in OpenProject). If thestatusis different, activate it with this query:UPDATE users SET status = 1 WHERE login = 'your_username';
- Ensure the
-
Confirm and exit:
- Confirm that the
adminstatus is set totrueand thatstatusis1. Then exit thepsqlsession:\q
- Confirm that the
With these steps, the account should now have administrator permissions and be fully activated, allowing you to access OpenProject with administrative privileges. This method enables you to manually create an administrator account without relying on the default admin - admin credentials.
Apparently the seeder is not creating the admin user. I've checked it directly via the ruby console in the web-worker:
open-project(prod)> User.all
=>
[#<AnonymousUser:0x00007fabf2b45898
id: 1,
login: "",
firstname: "",
lastname: "Anonymous",
mail: "",
admin: false,
status: "active",
last_login_on: nil,
language: "",
ldap_auth_source_id: nil,
created_at: "2025-10-29 19:59:42.614725000 +0000",
updated_at: "2025-10-29 19:59:42.614725000 +0000",
type: "AnonymousUser",
first_login: true,
force_password_change: false,
failed_login_count: 0,
last_failed_login_on: nil,
consented_at: nil,
webauthn_id: nil>]
open-project(prod)>
Workaround: Create admin user manually via Rails console
To access the Ruby console, execute on the docker-host system:
docker compose exec web bash
RAILS_ENV=production bundle exec rails c
Then create the user in the Ruby console:
user = User.new(
login: 'admin',
firstname: 'OpenProject',
lastname: 'Admin',
mail: '[email protected]',
admin: true,
status: 'active',
language: 'en'
)
user.password = user.password_confirmation = 'admin'
user.save!
The big advantage: you get datatype checks and value checks, so you can only add valid user-data.
Hi! Maybe my suggested solution will be helpful to someone. I only had one user named Anonymous in the users table, but that wasn't very helpful. On the login screen, I clicked on the “Create new account” link and created a new user. Then I logged into the database and changed the admin and status fields. The password has been already created in the ui when I created a new account.
Here my steps:
connect to db:
docker exec -it openproject-db-1 psql -U postgres -d openproject
change status and admin field
update users set status = 1 where login = 'myuser';
update users set admin = true where login = 'myuser';
Here you can find the password_hash:
select * from user_passwords;
I hope my method helps someone.