[Self-hosted] HTTP actions 404 + JWT parsing error (Clerk)
[Self-hosted] HTTP actions 404 + JWT parsing error (Clerk)
Hi all, I’m running Convex in a self-hosted setup (convex-local-backend binary, not Docker) with a Next.js + Clerk app, and I’m seeing two issues.
Summary
- Web app using
ConvexProviderWithClerk works: ctx.auth.getUserIdentity() returns the user.
- HTTP actions defined in convex/router.ts (e.g. /save, /links-list) always return 404.
- Using ConvexHttpClient.setAuth(clerkJwt) from a Next.js API route causes a JWT parsing error on the backend.
Environment
- Convex: self-hosted convex-local-backend (version: 1.29.3)
- Frontend: Next.js + TypeScript
- Auth: Clerk with auth.config.ts:
- domain: "https://clerk.usekalpa.com"
- applicationID: "convex"2 Replies
Thanks for posting in <#1088161997662724167>.
Reminder: If you have a Convex Pro account, use the Convex Dashboard to file support tickets.
- Provide context: What are you trying to achieve, what is the end-user interaction, what are you seeing? (full error message, command output, etc.)
- Use search.convex.dev to search Docs, Stack, and Discord all at once.
- Additionally, you can post your questions in the Convex Community's <#1228095053885476985> channel to receive a response from AI.
- Avoid tagging staff unless specifically instructed.
Thank you!
Details
1. HTTP actions 404
convex/router.ts contains routes like:
Calling https://<my-convex-host>/save (and similar paths like /links-list, /universes-list) returns 404.
Backend logs:
2. JWT via ConvexHttpClient fails
From a Next.js API route I do:
Backend log:
The same token looks valid on jwt.io and has iss/aud matching
auth.config.ts
Questions
- Is there extra configuration needed for HTTP actions to be wired up correctly on self-hosted?
- Is ConvexHttpClient.setAuth() expected to work with self-hosted + Clerk, or is this a known limitation/bug?
- Any recommended next steps to debug this further on a self-hosted deployment?
Thanks!