QuickDID is a high-performance AT Protocol identity resolution service written in Rust. It provides handle-to-DID resolution with Redis-backed caching and queue processing.
1# QuickDID Environment Configuration Template
2# Copy this file to .env and customize for your deployment
3
4# ============================================================================
5# REQUIRED CONFIGURATION
6# ============================================================================
7
8# External hostname for service endpoints (REQUIRED)
9# Examples:
10# - quickdid.example.com
11# - quickdid.example.com:8080
12# - localhost:3007
13HTTP_EXTERNAL=quickdid.example.com
14
15# ============================================================================
16# NETWORK CONFIGURATION
17# ============================================================================
18
19# HTTP server port (default: 8080)
20HTTP_PORT=8080
21
22# PLC directory hostname (default: plc.directory)
23# Use "plc.directory" for production
24PLC_HOSTNAME=plc.directory
25
26# HTTP User-Agent header (optional)
27# Default: quickdid/{version} (+https://github.com/smokesignal.events/quickdid)
28# USER_AGENT=quickdid/1.0.0 (+https://quickdid.example.com)
29
30# Custom DNS nameservers (optional, comma-separated)
31# Examples: 8.8.8.8,8.8.4.4 or 1.1.1.1,1.0.0.1
32# DNS_NAMESERVERS=
33
34# Additional CA certificates (optional, comma-separated paths)
35# CERTIFICATE_BUNDLES=
36
37# ============================================================================
38# CACHING CONFIGURATION
39# ============================================================================
40
41# Redis URL for caching (optional but recommended for production)
42# Examples:
43# - redis://localhost:6379/0
44# - redis://user:pass@redis.example.com:6379/0
45# - rediss://secure-redis.example.com:6380/0
46# REDIS_URL=redis://localhost:6379/0
47
48# TTL for in-memory cache in seconds (default: 600 = 10 minutes)
49# Lower = fresher data, higher = better performance
50# Range: 60-3600 recommended
51CACHE_TTL_MEMORY=600
52
53# TTL for Redis cache in seconds (default: 7776000 = 90 days)
54# Recommendations:
55# - 86400 (1 day) for frequently changing data
56# - 604800 (1 week) for balanced performance
57# - 7776000 (90 days) for stable data
58CACHE_TTL_REDIS=86400
59
60# ============================================================================
61# QUEUE CONFIGURATION
62# ============================================================================
63
64# Queue adapter type (default: mpsc)
65# Options:
66# - mpsc: In-memory queue (single instance)
67# - redis: Distributed queue (multi-instance)
68# - noop: Disable queue (testing only)
69QUEUE_ADAPTER=mpsc
70
71# Redis URL for queue operations (optional)
72# Falls back to REDIS_URL if not specified
73# Use when separating cache and queue Redis instances
74# QUEUE_REDIS_URL=
75
76# Redis key prefix for queues (default: queue:handleresolver:)
77# Useful for namespacing when sharing Redis
78QUEUE_REDIS_PREFIX=queue:handleresolver:
79
80# Redis blocking timeout in seconds (default: 5)
81# Lower = more responsive, higher = less polling
82QUEUE_REDIS_TIMEOUT=5
83
84# Worker ID for queue operations (optional)
85# Default: auto-generated UUID
86# Examples: worker-001, prod-us-east-1, $(hostname)
87# QUEUE_WORKER_ID=
88
89# Buffer size for MPSC queue (default: 1000)
90# Increase for high-traffic deployments
91QUEUE_BUFFER_SIZE=1000
92
93# ============================================================================
94# STATIC FILES CONFIGURATION
95# ============================================================================
96
97# Directory for serving static files (default: www)
98# This should contain:
99# - index.html (landing page)
100# - .well-known/atproto-did (service DID)
101# - .well-known/did.json (DID document)
102# Docker default: /app/www
103STATIC_FILES_DIR=www
104
105# ============================================================================
106# LOGGING
107# ============================================================================
108
109# Rust log level
110# Options: trace, debug, info, warn, error
111# Production: info or warn
112# Development: debug
113RUST_LOG=info
114
115# ============================================================================
116# DEVELOPMENT OVERRIDES (uncomment for local development)
117# ============================================================================
118
119# HTTP_EXTERNAL=localhost:3007
120# RUST_LOG=debug
121# CACHE_TTL_MEMORY=60
122# CACHE_TTL_REDIS=300