Forgotten password, new Docker install

Gramps 5.1.6
Gramps Web API 1.5.1
Gramps Web Frontend 24.1.2
locale: en
multi-tree: false
task queue: true

Fresh install of docker and gramps web. logged in fine. Added Gramps web to desktop and attempted to websync. Could not connect to server.

In Gramps Web, still logged in as the only user, cannot change password, message is “Error: not authorized”.

Not finding anything on initial search.

Probably easier all around if I just purge and reinstall. So, that’s
what I’ll do.

1 Like

Well this is just great. I don’t seem to be able to delete some portion of the Gramps docker instance completely.
Have tried these things:
docker stop $(docker ps -a -q)
docker rm $(docker ps -a -q)
docker system prune -a

Which did seem to delete “things”. But after I do
docker-compose up -d

it seems the same configuration of gramps web exists.

Can’t login, can’t create new users, can’t get a password reset accomplished, as, in a hurry to just “get familiar” with grampsweb, neglected to setup the email notification part.

Sigh.

We’ll probably have to wait for @DavidMStraub to say where the configuration files are that might not have been cleared for a re-install.

Where are you installing the Gramps Web docker image? Is it a local server, a Digital Ocean droplet, a GrampsHub instance, or somewhere else?

On a local server, a Linux VM. I could just reinstall the OS, I suppose, but that seems a bit extreme, even at this early stage.

I can wait a day or two if need be. Better to learn how, in the long run.

1 Like

Hi, from the docker system prune documentation:

By default, volumes aren’t removed to prevent important data from being deleted

So this is a feature, not a bug. Check there for how to delete volumes as well.

If you forgot your password, simply use the “reset password” link. If you haven’t set up e-mail properly, that will not work of course. Then you can still use the command line, as documented.

Edit: the link “command line” was added automatically by Discourse but is incorrect. Please use this link: User system - Gramps Web

Thanks for the leads.

I can’t get the command line to work, does not appear to be an option to change password. Efforts to add email address, for example, seem to want the existing password.

[+] Running 1/0
 ⠿ Container grampsweb_redis  Running                                                         0.0s
INFO  [alembic.runtime.migration] Context impl SQLiteImpl.
INFO  [alembic.runtime.migration] Will assume non-transactional DDL.
Usage: python3 -m gramps_webapi user add [OPTIONS] NAME PASSWORD
Try 'python3 -m gramps_webapi user add --help' for help.

Error: Missing argument 'PASSWORD'.

Tried some variations on the order of parameters and options, get various chastisements.

When attempting python3 -m gramps_webapi user add --help response is: :“: No module named gramps_webapi”, which one presumes is due to leaving off the “docker-compose”, etc. preamble.

Docs imply that an empty database will cause the initial screen to present, but, lacking knowledge of how to clear the database, I lean to repeating my attempts to reinstall gramps web adding the volume delete step.

edit: Yet, after “docker system prune -a” followed by “docker system prune --volumes” and another " docker-compose up -d", the web page presents a login view rather than an initial setup view.

I am clearly missing something.

Edit2: I was, however, able to add an administrative user and login.

Still, at the message when the command finished was a bit disconcerting:

“ERROR:gramps_webapi:Adding user joea99 …”

While having added a second administrative user, I have some observations:

  • not getting email for password reset, appears email is not being sent from gramps web. I find no way to add or edit any email delivery information. I can send test email from the command line of the (docker) host server.

  • Did not see a way to edit a user password via gramps web administrative actions.

  • there appears to be no way to delete a user via the web page.

Adding to this thread: the --help option works only in one case, not in the others:

Works
# python3 -m gramps_webapi --help

Does not work

# python3 -m gramps_webapi user --help 
# python3 -m gramps_webapi user add --help

actually after a bunch of warnings and a stack trace I see
ValueError: SECRET_KEY must be specified

@DavidMStraub I am trying to reset my Gramps Web install so it is a ‘clean’ install. Although I am an experienced Linux user I have never fully got my head around Docker other than being able to get containers up and running.

After executing docker compose down and have run docker system prune -a --volumes as per the documentation you referred to. This doesn’t seem to be enough as my existing Gramps Web data remains when I login.

Is there a quick command to remove all existing data from the Docker container to ‘start again’ as it were?

Hi,

that command does not delete named volumes. You need to delete those as well.

Thanks David

I figured this out.

For those also not Docker experts, I ran the following commands:

docker volume rm gramps_gramps_cache gramps_gramps_db gramps_gramps_index gramps_gramps_media gramps_gramps_secret gramps_gramps_thumb_cache gramps_gramps_tmp gramps_gramps_users
2 Likes