Reset the Sentry password

If you have locked yourself out of Sentry but still have ssh access to the server, you can reset the password in the shell

  1. Open the shell in the Sentry container:

    cd /data/grape/config/sentry
    docker-compose exec grapesentry-sentry bash
    
  2. Open the Sentry/Django shell:

    sentry shell
    
  3. Change the password (make sure to use a better password than 12345):

    from sentry.models import User
    user = User.objects.get(id=1)
    user.set_password("12345")
    user.save()
    
  4. Press Ctrl+D twice to exit