Prerequisites
- VPS with 2GB+ RAM (varies by preset)
- Ubuntu 22.04+ or Debian 11+ (recommended)
- Root or sudo access
- Public IP address
- SSH key authentication (recommended)
Server sizing guide
Choose a VPS size based on your preset:| Preset | RAM | CPU | Disk | Cost/month |
|---|---|---|---|---|
| Minimal | 1 GB | 1 vCPU | 25 GB | $5-10 |
| Creator | 2 GB | 2 vCPU | 50 GB | $10-20 |
| Researcher | 4 GB | 2 vCPU | 80 GB | $20-40 |
| DevOps | 4 GB | 2 vCPU | 80 GB | $20-40 |
| AI Playground | 8 GB | 4 vCPU | 160 GB | $40-80 |
| Full Stack | 8 GB | 4 vCPU | 160 GB | $40-80 |
Initial server setup
Docker deployment
Install Docker
Deploy stack
Configure environment
SSH into the server and edit Update:
.env:- Domain names
- API keys
- Database passwords
- Email settings (for Let’s Encrypt)
Bare-metal deployment
Install dependencies
DNS configuration
Point your domain to the VPS:Create CNAME for subdomains (optional)
For service-specific subdomains:
| Type | Name | Value | TTL |
|---|---|---|---|
| CNAME | grafana | example.com | 300 |
| CNAME | n8n | example.com | 300 |
SSL/TLS configuration
Caddy (automatic)
Caddy automatically provisions Let’s Encrypt certificates. No additional configuration needed. Verify:Traefik (automatic)
Traefik provisions certificates whentraefik.http.routers.<service>.tls.certresolver=letsencrypt is set.
Verify in Traefik dashboard:
Manual (Certbot)
For custom SSL setup:docker-compose.yml to mount certificates:
Security hardening
Disable root SSH
Enable automatic updates
Install fail2ban
Protect against brute-force attacks:Monitoring and maintenance
System monitoring
If you included Grafana and Prometheus in your stack:- Access Grafana at
https://grafana.example.com - Login with credentials from
.env - View pre-configured dashboards for system metrics
Log management
View service logs:Backup strategy
Update stack
Update services to latest versions:Scaling considerations
Vertical scaling
Increase VPS resources:- Resize VPS via provider dashboard
- Restart VPS
-
Verify new resources:
Horizontal scaling
For high availability, use:- Load balancer: Distribute traffic across multiple VPS instances
- Shared database: External PostgreSQL (e.g., AWS RDS, DigitalOcean Managed DB)
- Shared cache: External Redis (e.g., Redis Cloud, AWS ElastiCache)
- Object storage: External MinIO or S3-compatible storage
Troubleshooting
Services won’t start
Check logs:- Port conflicts:
lsof -i :<port> - Insufficient memory:
free -h - Missing environment variables:
cat .env
SSL certificate errors
Error: Certificate provisioning failed Solution:- Verify DNS points to server IP:
dig example.com +short - Ensure ports 80 and 443 are open:
ufw status - Check Caddy/Traefik logs:
docker compose logs caddy
Disk space issues
Check disk usage:Connection refused
Error: Cannot connect to services Solution:- Verify services are running:
docker compose ps - Check firewall rules:
ufw status - Test locally first:
curl http://localhost:3000 - Verify DNS:
dig example.com
Provider-specific guides
DigitalOcean
Hetzner
Vultr
Linode
Next steps
- Docker deployment for local development
- Dokploy deployment for easier management
- Coolify deployment for Vercel-like workflow