Deployment Targets
AuthHero is designed to run on multiple platforms. This guide covers deployment to different environments and their specific requirements.
Overview
AuthHero can be deployed to:
- Local Development - Node.js, Bun, or Deno
- Cloudflare Workers - Edge computing platform
- AWS - Lambda, ECS, or EC2
- Multi-Cloud - Run across multiple providers for resilience
Coming Soon
Documentation for additional platforms:
- Vercel
- Google Cloud Platform (GCP)
- Docker/Kubernetes
- Azure
- Railway, Render, Fly.io
Widget Assets
All deployment targets must serve the AuthHero widget assets. Learn more about widget asset configuration.
Quick Comparison
| Platform | Startup Time | Scaling | Cost Model | Best For |
|---|---|---|---|---|
| Local/Node | Instant | Manual | Fixed | Development, VPS |
| Cloudflare | ~0ms (warm) | Automatic | Pay-per-use | Global edge |
| AWS Lambda + SST | 100-500ms | Automatic | Pay-per-use | Serverless |
| AWS ECS | Instant | Manual/Auto | Fixed | Long-running |
Quick Start with create-authhero
The fastest way to get started is using the CLI:
bash
npx create-authhero my-auth-serverThen select your deployment target:
- Local (SQLite) - Development and VPS deployments
- Cloudflare Workers (D1) - Edge deployment
- AWS SST (Lambda + DynamoDB) - Serverless AWS deployment
Choosing a Deployment Target
Choose Cloudflare Workers if:
- Global user base with low latency requirements
- Pay-per-use cost model preferred
- Simple deployment desired
- Edge computing benefits needed
Choose AWS Lambda if:
- Already on AWS ecosystem
- Need complex AWS service integrations
- Variable traffic patterns
- Serverless architecture preferred
Choose AWS ECS/Fargate if:
- Long-running processes required
- Predictable, consistent traffic
- Need full control over environment
- Complex dependencies
Choose Local/VPS if:
- Self-hosted requirement
- Existing infrastructure
- Cost predictability important
- Simple deployment preferred
Database Considerations
Different platforms work best with different databases:
- Cloudflare Workers → Cloudflare D1 (SQLite-compatible)
- AWS → DynamoDB (via @authhero/aws adapter)
- Local/VPS → PostgreSQL, MySQL, SQLite (via Kysely/Drizzle adapters)
See Adapters for database integration details.
Next Steps
- Choose your deployment target from the menu
- Follow the platform-specific setup guide
- Configure widget assets for your platform
- Review security best practices