Repository navigation
Description
Deployment Method
- Installer
- Docker Development
- Docker Production
- Bare metal Development
- Bare metal Production
- Digital Ocean image
- Other (please provide a link
Steps to Reproduce
Describe the problem*
I am trying inventree for the first time and deployed a completely new docker-compose install on Ubuntu-24 following the directions given in https://docs.inventree.org/en/stable/start/docker_install/#docker-installation
After the initial db setup via invoke update all containers come up as expected. However all login attempts using the superuser account created either in the .env file or via the invoke superuser fail. The inventree-server container reports INVE-W12: Signup attempt blocked, because registration is disabled via setting LOGIN_ENABLE_REG. which should not matter, when attempting a sign-in with an existing account?
Steps to Reproduce
- Follow docs https://docs.inventree.org/en/stable/start/docker_install/#docker-installation to deploy with docker-compose.
- Run db initialization with
docker compose run --rm inventree-server invoke update. - Create a superuser account by either
a. Setting up the necessary variables in the.envfile (INVENTREE_ADMIN_USER,INVENTREE_ADMIN_PASSWORD,INVENTREE_ADMIN_EMAIL).
b. Running the superuser commanddocker compose run inventree-server invoke superuser. - Deploy the full container stack with
docker compose up -d - Navigate to the instance landing page
- Try to log in with the superuser credentails.
- The frontend shows Error 403:
Check your input and try again. - The backend logs can be found below.
Running the docker compose run inventree-server invoke superuser command again confirms, that the superuser account exists.
Relevant log output
inventree-server | 2026-06-19T11:23:46.378685Z [warning ] INVE-W12: Signup attempt blocked, because registration is disabled via setting LOGIN_ENABLE_REG. [inventree] ip=##.###.###.## request_id=bee88131-5414-4ca9-ba92-31086f4aac7f user_id=None
inventree-server | 2026-06-19 13:23:46,378 WARNING {'event': 'INVE-W12: Signup attempt blocked, because registration is disabled via setting LOGIN_ENABLE_REG.', 'request_id': 'bee88131-5414-4ca9-ba92-31086f4aac7f', 'user_id': None, 'ip': '##.###.###.##', 'timestamp': '2026-06-19T11:23:46.378685Z', 'logger': 'inventree', 'level': 'warning'}
inventree-server | 2026-06-19T11:23:46.402048Z [warning ] request_finished [django_structlog.middlewares.request] code=401 ip=##.###.###.## request='GET /api/auth/v1/auth/session' request_id=bee88131-5414-4ca9-ba92-31086f4aac7f user_id=None
inventree-server | 2026-06-19 13:23:46,402 WARNING {'code': 401, 'request': 'GET /api/auth/v1/auth/session', 'event': 'request_finished', 'request_id': 'bee88131-5414-4ca9-ba92-31086f4aac7f', 'user_id': None, 'ip': '##.###.###.##', 'timestamp': '2026-06-19T11:23:46.402048Z', 'logger': 'django_structlog.middlewares.request', 'level': 'warning'}
inventree-server | 2026-06-19 13:23:46,403 WARNING Unauthorized: /api/auth/v1/auth/session
inventree-server | ##.###.###.## - - [19/Jun/2026:13:23:46 +0200] "GET /api/auth/v1/auth/session HTTP/1.1" 401 120 "http://inventree.localhost/web/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0"
inventree-server | 2026-06-19 13:23:46,454 WARNING Forbidden (CSRF cookie not set.): /api/auth/v1/auth/login
inventree-server | 2026-06-19T11:23:46.455142Z [warning ] request_finished [django_structlog.middlewares.request] code=403 ip=##.###.###.## request='POST /api/auth/v1/auth/login' request_id=5c0c7039-2e7f-46f1-8201-be30d43eb695 user_id=None
inventree-server | 2026-06-19 13:23:46,455 WARNING {'code': 403, 'request': 'POST /api/auth/v1/auth/login', 'event': 'request_finished', 'request_id': '5c0c7039-2e7f-46f1-8201-be30d43eb695', 'user_id': None, 'ip': '##.###.###.##', 'timestamp': '2026-06-19T11:23:46.455142Z', 'logger': 'django_structlog.middlewares.request', 'level': 'warning'}
inventree-server | ##.###.###.## - - [19/Jun/2026:13:23:46 +0200] "POST /api/auth/v1/auth/login HTTP/1.1" 403 1773 "http://inventree.localhost/web/login" "Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:151.0) Gecko/20100101 Firefox/151.0"
Activity
SchrodingersGat commentedon Jun 20, 2026
@MartinHenselHLL the
INVW-W12warning here is a red-herrring.This is the real reason you cannot login:
The CSRF configuration is not setup correctly - refer to the following:
Have you configured your site URL to match the URL you are accessing the instance from?
MartinHenselHLL commentedon Jun 22, 2026
@SchrodingersGat Thanks for the quick answer.
INVENTREE_SITE_URLisconfigured and exactly the URL I access the login page from.INVENTREE_SITE_URL.INVENTREE_CORS_ORIGIN_ALLOW_ALL=Trueto reduce the chance of CORS rejection: No change in behavior.In the end it seems that a wrong CORS cookie or some other invalid part got stuck in my cache. The problems seem to be solved after a complete cache flush.
Thank you for the help @SchrodingersGat !