Files
conversation-history/Conversations/2026-04-19-jacob-ssl-debug-session.md
T

3.6 KiB

Jacob.fetcherpay.com SSL & Auth Debug Session — 2026-04-19

Initial Problem

User was unable to access Jacob (DeerFlow AI agent) at https://jacob.fetcherpay.com:

  • Fake SSL cert being served (Kubernetes Ingress Controller Fake Certificate)
  • Basic auth not enforcing
  • nginx 404 errors

Root Cause Analysis

Port 443 Conflict

K8s nginx-ingress-controller runs with hostNetwork: true, binding directly to host port 443. Traefik (in Docker) could not compete for the same port. All HTTPS traffic was intercepted by K8s nginx-ingress, which had no Ingress rule for jacob.fetcherpay.com, so it served the default fake certificate.

Conclusion: Traefik was never receiving traffic for jacob.fetcherpay.com.

Fixes Applied

1. K8s Ingress for jacob.fetcherpay.com (Option A)

Created jacob-k8s-ingress.yaml in /home/garfield/hermes-mcp/:

  • Service + Endpoints pointing to DeerFlow nginx at host IP 104.190.60.129:2026
  • Secret for basic auth (boaz / strength)
  • Ingress with cert-manager.io/cluster-issuer: letsencrypt-prod

Initial issue: K8s blocks loopback (127.0.0.1) in Endpoints. Fixed by using host external IP.

Basic auth issue: $2b$ bcrypt prefix (OpenBSD) incompatible with nginx auth_basic. Regenerated with $2y$ via htpasswd -nbB.

Result: Valid Let's Encrypt cert issued and served. Basic auth working.

curl -u boaz:strength https://jacob.fetcherpay.com/health
{"status":"healthy","service":"deer-flow-gateway"}

2. Cleaned up dead Traefik labels

Removed orphaned Traefik labels from deer-flow/docker/docker-compose-dev.yaml (nginx service lines 79-87). These were dead code since Traefik never got port 443 traffic.

3. Fixed missing nginx API proxy route

DeerFlow frontend was calling /api/chat and /api/research but nginx had no proxy rule for them, causing 404s.

Added catch-all location /api/ block in deer-flow/docker/nginx/nginx.conf to proxy unmatched API routes to the gateway.

4. React hydration mismatch — cosmetic

Frontend showed Radix UI hydration mismatches (id attributes differed between SSR and client). This is benign in Next.js dev mode and does not block functionality.

5. AuthenticationError — Moonshot API key invalid

User was getting Console AuthenticationError when sending chat messages.

Root cause: Model selector was set to Kimi K2.5. DeerFlow routes Kimi to Moonshot API (api.moonshot.cn) via PatchedChatDeepSeek (OpenAI-compatible). The MOONSHOT_API_KEY in .env was invalid.

curl -H "Authorization: Bearer $MOONSHOT_API_KEY" https://api.moonshot.cn/v1/models
{"error":{"message":"Invalid Authentication"}}

Solution: Switch model in UI to Claude Opus 4.6 or Claude Sonnet 4.6 (Anthropic key is valid).

Key Files Modified

File Change
hermes-mcp/jacob-k8s-ingress.yaml New K8s Ingress manifest
deer-flow/docker/docker-compose-dev.yaml Removed dead Traefik labels
deer-flow/docker/nginx/nginx.conf Added location /api/ catch-all proxy

Configuration Verified Working

Component Status
SSL cert (LE R13) ✅ Valid
Basic auth ✅ Enforcing
K8s Ingress routing ✅ Active
API proxy (/api/models) ✅ Working
Claude models ✅ API key valid
Moonshot/Kimi ❌ API key invalid

Remaining Issue

  • Moonshot API key needs replacement if user wants to use Kimi K2.5 model
  • Get new key from https://platform.moonshot.cn
  • Update MOONSHOT_API_KEY in /home/garfield/deer-flow/.env
  • Recreate langgraph container: docker compose ... up -d --force-recreate langgraph

Session date: 2026-04-19