/ui/v2/login/login?authRequest=V2_345354842673250309 Bug when selfhosting

I am trying to self host Zitadel but on the browser when I try to access the following happens and I cant access /ui/v2/login/login?authRequest=V2_345354842673250309 #questions-help-bugs
18 Replies
Ask Inkeep
Ask Inkeep5d ago
Hi @Eliud M. (Mentor), I'm an AI assistant for ZITADEL. While a team member reviews this question, I'll see if I can find relevant sources for your question. Answer I wasn't able to find a direct answer, here are some relevant sources: 1. Connect your Self-Hosted Login UI to Zitadel | ZITADEL Docs : This guide covers how to set up the Login UI connection with proper PAT configuration and environment variables for self-hosted deployments (1) . 2. [Bug]: Self-Hosted: {"code":5, "message":"Not Found"} : This GitHub issue discusses the exact error you're experiencing with Login V2 redirects and provides workarounds including disabling Login V2 or properly configuring the login service (2) . ​ To learn more, see the sources I considered: [1] Connect your Self-Hosted Login UI to Zitadel | ZITADEL Docs [2] [Bug]: Self-Hosted: {"code":5, "message":"Not Found"} ​ Feel free to tag @Ask Inkeep with additional questions.
Capitán
Capitán5d ago
Hi @Eliud M. (Mentor) , Try setting ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED: false
AniketNS
AniketNS4d ago
I tried ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED: false
still i'm facing the same issue, why is that?
Capitán
Capitán4d ago
Can you give me bit info about your config? @AniketNS
AniketNS
AniketNS4d ago
I'm using Docker compose + Nginx + certbot http://zitadel.pacewisdom.in:8080/ Docker Compose: I've changed all localhost occurence to my domain in docker-compose file.
ZITADEL Console
Console Management Platform for ZITADEL IAM
AniketNS
AniketNS4d ago
still i'm getting that error, why it is getting forwarded to localhost for authentication I don't know
Capitán
Capitán4d ago
Can you send the screenshot of the issue
AniketNS
AniketNS4d ago
give me a sec
AniketNS
AniketNS4d ago
check this
AniketNS
AniketNS4d ago
first it loads the UI and then redirects to localhost
AniketNS
AniketNS4d ago
actually the site is secure
No description
Capitán
Capitán4d ago
Hi, Not sure about this as im not using zitadel login image
AniketNS
AniketNS4d ago
which one should i use?
AniketNS
AniketNS4d ago
ZITADEL Docs
This guide is the entrypoint for running the Zitadel platform locally for the first time.
AniketNS
AniketNS4d ago
i'm using this doc
Capitán
Capitán3d ago
zitadel:
image: ghcr.io/zitadel/zitadel:latest
container_name: test-zitadel
restart: unless-stopped
env_file:
- ./envs/zitadel.env
command: start-from-init --masterkeyFromEnv --tlsMode external
volumes:
- ./backup/zitadel:/zitadel-data
- .:/current-dir:delegated
ports:
- "8080:8080"
depends_on:
- db
networks:
- test
user: "0"

db:
restart: unless-stopped
image: postgres:17
env_file: ./envs/postgres.env
healthcheck:
test:
- CMD-SHELL
- pg_isready
- -d
- zitadel
- -U
- postgres
interval: 10s
timeout: 30s
retries: 5
start_period: 20s
networks:
- test
zitadel:
image: ghcr.io/zitadel/zitadel:latest
container_name: test-zitadel
restart: unless-stopped
env_file:
- ./envs/zitadel.env
command: start-from-init --masterkeyFromEnv --tlsMode external
volumes:
- ./backup/zitadel:/zitadel-data
- .:/current-dir:delegated
ports:
- "8080:8080"
depends_on:
- db
networks:
- test
user: "0"

db:
restart: unless-stopped
image: postgres:17
env_file: ./envs/postgres.env
healthcheck:
test:
- CMD-SHELL
- pg_isready
- -d
- zitadel
- -U
- postgres
interval: 10s
timeout: 30s
retries: 5
start_period: 20s
networks:
- test
This much should work
Cait M
Cait M3d ago
Hi, I'm a bit of a novice on Zitadel but am working in a similar setup of Docker Compose V4+ running the hosted login and navigating around the LOGIN_V2 UI. If you aren't intending on using the V2 login flow and are setting ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED to false, then you may be better not running the login service at all. We just use a subset of settings for our V2 configuration (and some planned OIDC config for later on).
ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED: false
ZITADEL_OIDC_DEFAULTLOGINURLV2: https://host.docker.internal:5081/login?authRequest=
ZITADEL_DEFAULTINSTANCE_FEATURES_LOGINV2_REQUIRED: false
ZITADEL_OIDC_DEFAULTLOGINURLV2: https://host.docker.internal:5081/login?authRequest=
We also expose the ZITADEL_EXTERNALDOMAIN on a non-default port. We had issues running on 8080, and now use 8000. So some relevant sections are:
ZITADEL_EXTERNALDOMAIN: host.docker.internal
ZITADEL_EXTERNALPORT: 8000
ZITADEL_EXTERNALSECURE: false
ZITADEL_TLS_ENABLED: false

ports:
- 8000:8080
ZITADEL_EXTERNALDOMAIN: host.docker.internal
ZITADEL_EXTERNALPORT: 8000
ZITADEL_EXTERNALSECURE: false
ZITADEL_TLS_ENABLED: false

ports:
- 8000:8080
Also check if your Nginx is doing any redirection or not doing any host header updates. I tried using Traefic and ran into a lot of errors that way. 😅 Good luck!
AniketNS
AniketNS17h ago
what about ./envs/zitadel.env file? Hey @Capitán , can u plz provide the the env files, i'm sure there will be lot of env's that i need to add

Did you find this page helpful?