I set up the project using the docker container, and I ran the command to generate the user.
But I can't get past the login prompt, even with entering the correct user and password I just created.
Using the master branch, latest commit 7afa90b
If you're comfortable enough with docker, do you think you could get a shell on one of the containers and take a look at the database?
Once you've got a shell, you just need to execute /usr/src/paperless/manage.py shell which will give you a Django shell, and from there, a few diagnostic commands:
Is your user even in there?
User.objects.all()
If yes, then try setting the password to something new:
user = User.objects.all().first()
user.set_password("my-password")
user.save()
And then try logging in.
If that doesn't work, I'd recommend just nuking your containers and trying again. Unless someone can reproduce this, I'm not ready to consider this a bug.
So it seems to be a Django issue because I have the exact same problem with another Django app (also running in a docker container).
I will investigate, but I'm leaning towards an issue on the client side rather than the server side. Thanks for the Django shell commands, I'll double check the password has been set correctly. I suspect it has because I must have started over 5 times to make sure.
Has there been any resolution to this? I too am running on a fresh install and getting the same issue.
I never took time to look into it. @wagesj45 did you try the steps suggested above?
Yes, I followed those suggested steps. Getting into the django command line as you suggested yielded no results.
>>> User.objects.all()
Traceback (most recent call last):
File "<console>", line 1, in <module>
NameError: name 'User' is not defined
I also don't see how erasing my containers will help, as I am working on a fresh install of the docker container per the instuctions on readthedocs.
I was able to find a work around. By entering an interactive shell in the docker instance, I was able to run ./manage.py createsuperuser manually. The default suggested superuser name was 'root' and not paperless. However, this superuser account was able to log in.
I think there may be a problem with the installation documentation, as the docker-compose run --rm webserver createsuperuser command seems to be targeting something else other than the intended docker instance.
Working with the master branch commit c83dc66
Have not tried switching to the lastest commit where pull request #441 is merged. Since above @coaxial is saying it could be a Djongo issue.
Running the './manage.py createsuperuser' mannually inside the docker container seams to do the trick.
Steps to fix this mannualy in your terminal:
docker exec -it paperless_webserver_1 /bin/bash ( access the docker container and run bash )./manage.py createsuperuserThe command docker-compose run --rm webserver createsuperuser removes the container after run, but should be ignored when running the container in detached mode. Which in this case is since you run docker-compose up -d.
@coaxial @wagesj45 Were you able to resolve your issues? I've been running Paperless in Docker for 6-8 months any did not encounter this problem when setting it up.
Anything change over the last two months or so? I'm just going through old issues in the repo to see what can potentially be worked on still or cleaned up.
I don't think I ever tried again, life got in the way. I suppose you can
close and someone will open an issue again if this is still happening?
@coaxial I can't close it as I don't have access writesrights to the repository but as you created the issue you should be able to close it out via the UI if you'd like. Thanks!
I got it
Just confirming I had the same issue when using the docker container today. Running "./manage.py createsuperuser" from the container allowed me to create a user that could login while
The instructions for docker in setup.rst did NOT work:
$ docker-compose run --rm webserver createsuperuser
Most helpful comment
Working with the master branch commit c83dc66
Have not tried switching to the lastest commit where pull request #441 is merged. Since above @coaxial is saying it could be a Djongo issue.
Running the './manage.py createsuperuser' mannually inside the docker container seams to do the trick.
Steps to fix this mannualy in your terminal:
docker exec -it paperless_webserver_1 /bin/bash( access the docker container and run bash )./manage.py createsuperuserThe command
docker-compose run --rm webserver createsuperuserremoves the container after run, but should be ignored when running the container in detached mode. Which in this case is since you rundocker-compose up -d.