From 75c496e68f8327e505b6cb214d8507adcf42c9fb Mon Sep 17 00:00:00 2001 From: Joey Yakimowich-Payne Date: Thu, 15 Jan 2026 08:55:07 -0700 Subject: [PATCH] Add dns instructions --- docs/PRODUCTION.md | 72 ++++++++++++++++++++++++++++++++++++++++++++-- 1 file changed, 69 insertions(+), 3 deletions(-) diff --git a/docs/PRODUCTION.md b/docs/PRODUCTION.md index 0ce5b13..d9670c3 100644 --- a/docs/PRODUCTION.md +++ b/docs/PRODUCTION.md @@ -86,9 +86,75 @@ docker compose -f docker-compose.prod.yml -f docker-compose.caddy.yml ps ## Prerequisites - A Linux server with Docker and Docker Compose installed. -- Two registered domain names (e.g., `kaboot.example.com` and `auth.example.com`). -- DNS A records pointing both domains to your server. -- A Google Gemini API key. +- A registered domain name (e.g., `example.com`). +- DNS A records pointing your domains to your server (see below). +- A Google Gemini API key (optional, for AI quiz generation). + +## DNS Configuration + +You need two DNS records pointing to your server's IP address. You can use either: +- **Subdomains**: `kaboot.example.com` + `auth.example.com` (recommended) +- **Apex + subdomain**: `example.com` + `auth.example.com` + +### Finding Your Server's IP + +```bash +# On your server, run: +curl -4 ifconfig.me +``` + +### Namecheap Setup + +1. Log in to [Namecheap](https://www.namecheap.com/) and go to **Domain List** +2. Click **Manage** next to your domain +3. Go to the **Advanced DNS** tab +4. Add the following **A Records**: + +| Type | Host | Value | TTL | +|------|------|-------|-----| +| A Record | `kaboot` | `YOUR_SERVER_IP` | Automatic | +| A Record | `auth` | `YOUR_SERVER_IP` | Automatic | + +> **Note**: The "Host" field is the subdomain prefix only. For `kaboot.example.com`, enter just `kaboot`. + +### Cloudflare Setup + +1. Log in to [Cloudflare](https://dash.cloudflare.com/) and select your domain +2. Go to **DNS** → **Records** +3. Click **Add record** and create: + +| Type | Name | IPv4 address | Proxy status | +|------|------|--------------|--------------| +| A | `kaboot` | `YOUR_SERVER_IP` | DNS only (gray cloud) | +| A | `auth` | `YOUR_SERVER_IP` | DNS only (gray cloud) | + +> **Important**: Set proxy status to "DNS only" (gray cloud) for both records. Caddy handles SSL, and Cloudflare's proxy can interfere with certificate generation. + +### Other Providers (GoDaddy, Google Domains, etc.) + +The process is similar for most providers: + +1. Find the **DNS Management** or **DNS Settings** section +2. Add two **A Records**: + - **Name/Host**: `kaboot` → **Value/Points to**: `YOUR_SERVER_IP` + - **Name/Host**: `auth` → **Value/Points to**: `YOUR_SERVER_IP` +3. Set TTL to automatic or 300 seconds + +### Verify DNS Propagation + +After adding records, verify they're working (may take 5-30 minutes): + +```bash +# Check if DNS resolves to your server +dig kaboot.example.com +short +dig auth.example.com +short + +# Or use nslookup +nslookup kaboot.example.com +nslookup auth.example.com +``` + +Both should return your server's IP address. You can also use [dnschecker.org](https://dnschecker.org/) to verify global propagation. ## Architecture Overview