STING Local Domain System
Overview
STING uses a custom local domain system (.hive TLD) to provide:
- Consistent URLs across all services
- WebAuthn passkey compatibility across devices
- Unique machine-specific domains to prevent conflicts
- Zero-configuration network access (where mDNS is supported)
Why .hive?
We use .hive instead of .local because:
- macOS Compatibility:
.localis reserved by Bonjour/mDNS on macOS - Bee Theme: Fits with STING’s bee-themed ecosystem
- No Conflicts: Not a registered TLD, avoiding DNS issues
- Memorable: Easy to remember pattern:
machine-id.sting.hive
Domain Structure
{machine-id}.sting.hive
| | |
| | └── Custom TLD (avoids .local conflicts)
| └────────── Product namespace
└──────────────────── Unique 8-character machine identifier
Examples:
mac-a1b2c3d4.sting.hive(macOS)linux-12345678.sting.hive(Linux)my-dev.sting.hive(custom)
Setup
Quick Setup
./setup_local_domain.sh
Choose from:
- Automatic (Recommended) - Generates unique domain from hardware
- Custom - Choose your own prefix
- Simple - Use
sting.hive(may conflict) - Keep Current - No changes
How It Works
Domain Generation:
- macOS: Uses hardware UUID (first 8 chars)
- Linux: Uses
/etc/machine-id(first 8 chars) - Fallback: Hostname + MAC address
mDNS Registration (if available):
- macOS: Uses native
dns-sdcommand - Linux: Uses Avahi daemon
- Automatic network discovery
- macOS: Uses native
Configuration Updates:
- Updates all service configs
- Sets WebAuthn RP ID
- Regenerates environment files
- Updates CORS origins
Access Methods
With mDNS (Automatic Discovery)
Access from any device on your network:
https://mac-a1b2c3d4.sting.hive:8443
Without mDNS (Manual Configuration)
Add to /etc/hosts on client devices:
192.168.1.100 mac-a1b2c3d4.sting.hive
Service URLs
Once configured, access services at:
- Frontend:
https://{domain}:8443 - API:
https://{domain}:5050 - Kratos:
https://{domain}:4433 - Knowledge:
http://{domain}:8090
WebAuthn Benefits
Using a custom domain enables:
- ✅ Passkeys work across all devices on your network
- ✅ No more “localhost only” restrictions
- ✅ Consistent authentication experience
- ✅ Cross-device passkey roaming
Troubleshooting
Domain Not Resolving
Check mDNS service:
# macOS dns-sd -B _https._tcp # Linux avahi-browse -aVerify hosts file (if not using mDNS):
grep sting.hive /etc/hostsTest resolution:
ping mac-a1b2c3d4.sting.hive
Certificate Warnings
Self-signed certificates will show warnings. This is expected. Accept the certificate to proceed.
Changing Domains
To change your domain later:
./setup_local_domain.sh
# Select option 2 for custom domain
Technical Details
Machine ID Generation
# macOS
ioreg -d2 -c IOPlatformExpertDevice | \
awk -F\" '/IOPlatformUUID/{print $4}' | \
tr '[:upper:]' '[:lower:]' | cut -c1-8
# Linux
cat /etc/machine-id | cut -c1-8
mDNS Registration
# macOS (dns-sd)
dns-sd -R "STING CE" _https._tcp local 8443 \
"domain=mac-a1b2c3d4.sting.hive"
# Linux (Avahi)
avahi-publish -s "mac-a1b2c3d4" _https._tcp 8443 \
"domain=mac-a1b2c3d4.sting.hive"
Configuration Files Updated
/conf/config.yml- Base configuration/conf/kratos/kratos.yml- Authentication RP ID/env/*.env- Service environment files/.sting_domain- Domain persistence
Integration with Install Process
During installation, STING will:
- Detect if a domain is already configured
- If not, prompt for domain setup
- Configure all services automatically
- Display access URLs at completion
Best Practices
- Use Automatic Mode: Let STING generate a unique domain
- Document Your Domain: Save it for team members
- Network Access: Ensure devices are on same network
- Firewall Rules: Allow ports 8443, 5050, etc.