Skip to content

docs(self-hosting): document docker webapp URL mismatch troubleshooting#28740

Draft
jeevan6996 wants to merge 2 commits intocalcom:mainfrom
jeevan6996:docs/28712-docker-webapp-url-mismatch
Draft

docs(self-hosting): document docker webapp URL mismatch troubleshooting#28740
jeevan6996 wants to merge 2 commits intocalcom:mainfrom
jeevan6996:docs/28712-docker-webapp-url-mismatch

Conversation

@jeevan6996
Copy link
Copy Markdown

Summary

  • clarify that custom-domain self-hosted Docker setups must use matching build-time values for NEXT_PUBLIC_WEBAPP_URL
  • add explicit troubleshooting guidance for WEBAPP_URL/ALLOWED_HOSTNAMES mismatch and OAuth redirect loops
  • document expected ALLOWED_HOSTNAMES format and a quick BUILT_NEXT_PUBLIC_WEBAPP_URL verification command

Why

Issue #28712 reports OAuth loops caused by hostname mismatch even when runtime env vars look correct. The missing piece is usually image build-time values, not runtime-only config.

Fixes #28712

Signed-off-by: jeevan6996 <jeevanpawar5890@gmail.com>
@github-actions github-actions bot added the 🐛 bug Something isn't working label Apr 4, 2026
Copy link
Copy Markdown
Contributor

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="docs/self-hosting/docker.mdx">

<violation number="1" location="docs/self-hosting/docker.mdx:153">
P2: New troubleshooting guidance conflicts with existing `NEXTAUTH_URL` guidance in the same doc, creating ambiguous OAuth/auth-loop configuration.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review, or fix all with cubic.

If OAuth loops and logs show messages like `Match of WEBAPP_URL with ALLOWED_HOSTNAMES failed`, verify all of the following:

1. `ALLOWED_HOSTNAMES` is comma-separated without JSON or extra quotes (for example, `ALLOWED_HOSTNAMES=cal.example.com,www.cal.example.com`).
2. `NEXT_PUBLIC_WEBAPP_URL` and `NEXTAUTH_URL` are set to your public domain.
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: New troubleshooting guidance conflicts with existing NEXTAUTH_URL guidance in the same doc, creating ambiguous OAuth/auth-loop configuration.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At docs/self-hosting/docker.mdx, line 153:

<comment>New troubleshooting guidance conflicts with existing `NEXTAUTH_URL` guidance in the same doc, creating ambiguous OAuth/auth-loop configuration.</comment>

<file context>
@@ -140,3 +144,19 @@ docker-calcom-1  | @calcom/web:start:   url: 'http://testing.localhost:3000/api/
+If OAuth loops and logs show messages like `Match of WEBAPP_URL with ALLOWED_HOSTNAMES failed`, verify all of the following:
+
+1. `ALLOWED_HOSTNAMES` is comma-separated without JSON or extra quotes (for example, `ALLOWED_HOSTNAMES=cal.example.com,www.cal.example.com`).
+2. `NEXT_PUBLIC_WEBAPP_URL` and `NEXTAUTH_URL` are set to your public domain.
+3. Your image was built with the same public domain values.
+
</file context>

@jeevan6996
Copy link
Copy Markdown
Author

Thanks! This docs PR is ready for full CI. Could a maintainer please add the run-ci label (external contributor trust gate) so all checks can run? I will address any feedback quickly.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🐛 bug Something isn't working size/S

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Docker self-host: OAuth loop + WEBAPP_URL mismatch despite correct env (BUILT_NEXT_PUBLIC_WEBAPP_URL stuck on localhost)

1 participant