Supabase Database Setup
Supabase provides a managed PostgreSQL database for storing crawl site metadata and scheduling information.Create Supabase Project
Navigate to Supabase Dashboard
Create New Project
- Click “New Project”
- Select your organization (or create one)
- Configure project settings:
- Name:
llmstxt-generator - Database Password: Generate strong password (save securely)
- Region: Choose closest to your AWS region
- Pricing Plan: Free tier (sufficient for most use cases)
- Name:
- Click “Create new project”
Wait for Provisioning
Retrieve Supabase Credentials
Once your project is active:Navigate to Project Settings
Copy Project URL
SUPABASE_URL - save it for Terraform configuration.Copy Anon/Public Key
SUPABASE_KEY - save it for Terraform configuration.Run Database Migrations
Create thecrawl_sites table for tracking crawled websites.
Open SQL Editor
Create New Query
Paste Migration SQL
Run the Query
Ctrl+Enter (Windows/Linux) / Cmd+Enter (macOS).Verify Table Creation
crawl_sites table with 10 columns.crawl_sites table!Database Schema Overview
Thecrawl_sites table structure:
idx_crawl_sites_due index optimizes queries for finding sites that need recrawling based on last_crawled_at and recrawl_interval_minutes.Cloudflare R2 Storage Setup
Cloudflare R2 provides S3-compatible object storage for hosting generatedllms.txt files.
Create R2 Bucket
Navigate to R2 Dashboard
Purchase R2 (if needed)
- Click “Purchase R2”
- Review pricing (free tier: 10GB storage, 1M Class A ops/month)
- Click “Get Started”
Create Bucket
- Click “Create bucket”
- Bucket name:
llmstxt(or your preferred name) - Location: Automatic (recommended)
- Click “Create bucket”
Enable Public Access
- Open your newly created bucket
- Go to Settings tab
- Under Public access, enable:
- “Allow public access”
- Save changes
Generate R2 API Token
Navigate to API Tokens
Create API Token
- Click “Create API token”
- Configure token:
- Token name:
llmstxt-backend - Permissions: Read & Write
- Bucket: Select your bucket (
llmstxt) or “Apply to all buckets” - TTL: Leave empty (no expiration)
- Token name:
- Click “Create API Token”
Save Credentials
Get Public R2 Domain
Return to Bucket Settings
Copy Public R2.dev Domain
R2_PUBLIC_DOMAIN - files will be accessible at:
https://pub-xxxxx.r2.dev/your-file.txtOptional: Configure Custom Domain
Use your own domain for R2 bucket
Use your own domain for R2 bucket
Add Custom Domain
- Enter your domain:
files.yourdomain.com - Cloudflare will provide DNS records to add
Update DNS Records
- Records are added automatically
- Add CNAME record:
files.yourdomain.com→pub-xxxxx.r2.dev
Verify Configuration
Update Terraform Variable
terraform.tfvars:Test Storage Configuration
Upload Test File to R2
Verify R2 credentials work correctly:Test Supabase Connection
Verify Supabase credentials with a simple query:Credentials Summary
Before proceeding to Terraform, ensure you have all these values:Supabase Configuration
Supabase Configuration
Cloudflare R2 Configuration
Cloudflare R2 Configuration
Data Privacy Considerations
- Generated
llms.txtfiles are intentionally public (that’s their purpose) - Database records in Supabase are private (protected by row-level security)
- URLs in R2 are not guessable (contain random hashes)
- Consider implementing URL signing for additional security