Search code examples
dockeropenproject

How to reset admin password in openproject dockerized


I installed openproject in CentOS 7 using docker. I changed the admin password and then I forgot it.

How can I reset it.?


Solution

  • For newer versions of OpenProject, Ulferts' solution seems not to work, but I was successfull using the information in this guide:

    1. Find out the container ID: docker ps.
    2. Connect to the docker container as root: docker exec -u root -it <CONTAINER ID> /bin/bash
    3. Change the users password with rails console:
      RAILS_ENV=production bundle exec rails c
      u = User.find_by_login "admin"
      u.password=u.password_confirmation='my new password'
      u.save
      
    4. (Hit Ctrl-D until you're back on your regular terminal.)