[GH-ISSUE #401] Default login admin:admin for docker doesnt work #313

Closed
opened 2026-02-25 21:31:40 +03:00 by kerem · 6 comments
Owner

Originally created by @timowevel1 on GitHub (Jul 13, 2021).
Original GitHub issue: https://github.com/ciur/papermerge/issues/401

Originally assigned to: @ciur on GitHub.

Hello,

I deployed papermerge through docker on a completly new server. admin:admin doesnt work for login, it tells me it is wrong. I deployed it on another server, same issue.

You got an idea how I can login anyway?

Thanks

Originally created by @timowevel1 on GitHub (Jul 13, 2021). Original GitHub issue: https://github.com/ciur/papermerge/issues/401 Originally assigned to: @ciur on GitHub. Hello, I deployed papermerge through docker on a completly new server. admin:admin doesnt work for login, it tells me it is wrong. I deployed it on another server, same issue. You got an idea how I can login anyway? Thanks
kerem 2026-02-25 21:31:40 +03:00
  • closed this issue
  • added the
    bug
    label
Author
Owner

@julien-vu commented on GitHub (Jul 15, 2021):

Just updated the container and can't update at all, maybe it's linked

<!-- gh-comment-id:880562551 --> @julien-vu commented on GitHub (Jul 15, 2021): Just updated the container and can't update at all, maybe it's linked
Author
Owner

@iwconfig commented on GitHub (Jul 18, 2021):

Don't know for sure if this is related, but I did some changes to the papermerge config file and this occurred to me as well, after recreating the containers.

I solved it by removing everything with

docker-compose rm -sv
docker volume prune

then rebuilt the images before starting the containers by running

docker-compose up -d --build

and then admin:admin worked as it should again.


To fix admin password without rebuilding, do the following:

docker exec -it <container ID of eugenci/papermerge> /bin/bash
python3 manage.py shell

and in the python shell, paste the following

from django.contrib.auth import get_user_model
User = get_user_model()
user = User.objects.get(username='admin')
user.set_password('admin')
user.save()

and you're done.

<!-- gh-comment-id:881978804 --> @iwconfig commented on GitHub (Jul 18, 2021): Don't know for sure if this is related, but I did some changes to the papermerge config file and this occurred to me as well, after recreating the containers. I solved it by removing everything with docker-compose rm -sv docker volume prune then rebuilt the images before starting the containers by running docker-compose up -d --build and then admin:admin worked as it should again. --- To fix admin password without rebuilding, do the following: docker exec -it <container ID of eugenci/papermerge> /bin/bash python3 manage.py shell and in the python shell, paste the following from django.contrib.auth import get_user_model User = get_user_model() user = User.objects.get(username='admin') user.set_password('admin') user.save() and you're done.
Author
Owner

@timowevel1 commented on GitHub (Jul 25, 2021):

Thank you, worked!

<!-- gh-comment-id:886194149 --> @timowevel1 commented on GitHub (Jul 25, 2021): Thank you, worked!
Author
Owner

@iwconfig commented on GitHub (Jul 25, 2021):

Glad I could help!

Isn't this still considered a bug though? Maybe it's already reported in another open issue but if not I suggest reopening this again.

<!-- gh-comment-id:886195322 --> @iwconfig commented on GitHub (Jul 25, 2021): Glad I could help! Isn't this still considered a bug though? Maybe it's already reported in another open issue but if not I suggest reopening this again.
Author
Owner

@hillbicks commented on GitHub (Jan 12, 2022):

Since this issue is still open, let me chime in.

I was also unable to login, but in my case the admin didn't even exist, so the solution was simple. Just run python3 manage.py createsuperuser inside the container.

<!-- gh-comment-id:1011556083 --> @hillbicks commented on GitHub (Jan 12, 2022): Since this issue is still open, let me chime in. I was also unable to login, but in my case the admin didn't even exist, so the solution was simple. Just run python3 manage.py createsuperuser inside the container.
Author
Owner

@iwconfig commented on GitHub (Jan 13, 2022):

Yep, that's mentioned in the documentation as well, as part of the installation without using docker.

To run anything inside a container, do

docker exec -it <container ID of eugenci/papermerge> <command>

<command> can be /bin/bash if you want but it's not necessary as you can call the desired command directly without opening a bash session.

<!-- gh-comment-id:1012163784 --> @iwconfig commented on GitHub (Jan 13, 2022): Yep, that's mentioned in the documentation as well, as part of [the installation without using docker.](https://docs.papermerge.io/Installation/installation.html?highlight=createsuperuser) To run anything inside a container, do ``` docker exec -it <container ID of eugenci/papermerge> <command> ``` `<command>` can be `/bin/bash` if you want but it's not necessary as you can call the desired command directly without opening a bash session.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/papermerge#313
No description provided.