Hosting & Infrastructure¶
This document describes the hosting infrastructure for the Freeze Design webshop, including provider choices, cost breakdown, and scaling options.
Current Infrastructure¶
| Component | Provider | Details |
|---|---|---|
| VPS | Hetzner Cloud CX33 | 8 GB RAM, 4 vCPU, 80 GB NVMe, 20 TB traffic |
| Media storage | DigitalOcean Spaces | Amsterdam region, 250 GB storage, 1 TB transfer |
| Database backups | AWS S3 | Automated hourly pg_dump uploads |
| SSL | Let's Encrypt | Free, auto-renewed via certbot |
| CDN | Cloudflare | Free plan, see Cloudflare CDN |
| Monitoring | UptimeRobot + Sentry | Free tiers |
| Datacenter | Falkenstein, Germany | EU location for GDPR compliance |
The application runs as 7 Docker containers orchestrated by Docker Compose:
- nginx -- reverse proxy, SSL termination, static file serving
- backend -- Django/Gunicorn application server
- frontend -- Next.js server-side rendering
- db -- PostgreSQL 15 with production tuning
- redis -- session cache and Celery broker
- celery -- asynchronous task worker
- celery-beat -- periodic task scheduler
Provider Comparison¶
| Provider | Plan | vCPU | RAM | Storage | Traffic | Price/mo |
|---|---|---|---|---|---|---|
| Hetzner | CX33 | 4 | 8 GB | 80 GB NVMe | 20 TB | EUR 7.49 |
| Hetzner | CX23 | 2 | 4 GB | 40 GB NVMe | 20 TB | EUR 3.49 |
| DigitalOcean | Basic shared | 2 | 4 GB | 80 GB SSD | 4 TB | ~EUR 22 |
| Contabo | Cloud VPS S | 4 | 8 GB | 75 GB NVMe | Unlimited | EUR 4.99 |
Prices as of early 2026. DigitalOcean price estimated from USD 24/month.
Why Hetzner CX33¶
Technical Fit¶
8 GB RAM supports comfortable headroom for 7 containers. PostgreSQL alone benefits from generous memory allocation. The production configuration tunes PostgreSQL for the available RAM:
shared_buffers=1GB(dedicate 1 GB to PostgreSQL buffer cache)effective_cache_size=3GB(hint for query planner about OS cache)work_mem=8MB,maintenance_work_mem=256MBmax_connections=50
With 8 GB total, the remaining memory covers Django/Gunicorn workers, Next.js, Redis, Celery, Nginx, and Docker overhead without pressure.
20 TB/month traffic far exceeds expected demand for a custom apparel e-commerce site.
80 GB NVMe storage is sufficient because media files live on DigitalOcean Spaces and database backups go to S3. The VPS only stores application code, Docker images, and the PostgreSQL data directory.
Cost Advantage¶
- 3x cheaper than DigitalOcean for equivalent or better specs
- No hidden fees: IPv4 address included, firewall free, snapshots inexpensive
- Contabo offers similar specs at EUR 4.99, but Hetzner has a stronger track record for performance consistency and customer support
EU Compliance¶
- German datacenter locations (Falkenstein, Nuremberg) and Helsinki
- ISO 27001 certified
- Meets GDPR data residency requirements for EU-based customers
Full TCO Breakdown (Monthly)¶
| Service | Provider | Cost |
|---|---|---|
| VPS (8 GB / 4 vCPU / 80 GB) | Hetzner CX33 | EUR 7.49 |
| Volume (20 GB) | Hetzner | EUR 1.04 |
| Snapshot backups (10 GB est.) | Hetzner | EUR 0.12 |
| Domain (freezedesign.eu) | Yearly / 12 | ~EUR 0.75 |
| SSL certificates | Let's Encrypt | FREE |
| Monitoring | UptimeRobot + Sentry free tiers | FREE |
| CDN | Cloudflare free plan | FREE |
| Media storage | DigitalOcean Spaces | ~EUR 5.00 |
| Database backups | AWS S3 | ~EUR 0.50 |
| Total | ~EUR 14-15/month |
Annual cost: approximately EUR 170-180/year.
Pricing Notes¶
- Hetzner volumes: EUR 0.052/GB/month (20 GB = EUR 1.04)
- Hetzner snapshots: EUR 0.012/GB/month (10 GB = EUR 0.12)
- DigitalOcean Spaces: 250 GB storage + 1 TB transfer included for USD 5/month
- AWS S3 backup: minimal cost for periodic database dumps (~EUR 0.50/month estimated)
Database Strategy¶
Decision: PostgreSQL in Docker container (not managed).
Why Docker PostgreSQL¶
- Hetzner does not offer managed PostgreSQL. Keeping the database on the same VPS avoids cross-provider latency and simplifies the architecture.
- Already proven. The application was developed and tested with Docker PostgreSQL.
Production tuning parameters are baked into
docker-compose.prod.yml. - Automated backups. Hourly
pg_dumpto AWS S3 with retention policies, implemented in Phase 84. - No additional cost. Managed database services start at USD 15/month, which would more than double the TCO.
Configuration¶
- Image:
postgres:15-alpine(official PostgreSQL Docker image) - SSL/TLS: Enabled with certificates for container-to-container encryption
- Backups: Automated hourly dumps to AWS S3
- Health checks:
pg_isreadywith 30-second intervals
Managed Database Alternative¶
If future requirements demand managed PostgreSQL (automated failover, compliance mandates, database size exceeding VPS capacity):
| Provider | Plan | Starting Price |
|---|---|---|
| DigitalOcean Managed Database | 1 GB / 1 vCPU | ~USD 15/month |
| AWS RDS for PostgreSQL | db.t4g.micro | ~USD 15-20/month |
Migration path: standard pg_dump / pg_restore, then update DATABASE_URL in the
application environment.
Scaling Options¶
Vertical: Upgrade VPS Plan¶
The simplest scaling path. Hetzner allows live plan upgrades with brief downtime (5-10 minutes for VPS resize). No code changes required.
| Plan | vCPU | RAM | Storage | Price/mo |
|---|---|---|---|---|
| CX33 (current) | 4 | 8 GB | 80 GB | EUR 7.49 |
| CX43 | 8 | 16 GB | 160 GB | EUR 14.99 |
| CX53 | 16 | 32 GB | 320 GB | EUR 29.99 |
After upgrading, adjust PostgreSQL tuning parameters in docker-compose.prod.yml to
take advantage of the additional RAM.
Managed Database¶
Offload PostgreSQL to a managed service while keeping the application on Hetzner:
- Migrate to DigitalOcean Managed PostgreSQL or AWS RDS
- Update
DATABASE_URLenvironment variable - Estimated total: EUR 7.49 (Hetzner) + ~EUR 14 (managed DB) = ~EUR 22/month
Consider this when:
- Automated failover and high availability become requirements
- The database outgrows the VPS disk or memory
- Compliance mandates separation of compute and data
Horizontal: Multiple VPS Instances¶
For significant traffic growth:
- Hetzner Load Balancer (EUR 5.49/month) distributing across multiple application VPS instances
- Managed or dedicated database server
- Redis Cluster or managed Redis for shared session/cache state
- Cloudflare CDN already handles static asset distribution
This level of scaling is unlikely to be needed in the foreseeable future for a custom apparel e-commerce site.
Why DigitalOcean Spaces for Media¶
Media storage uses DigitalOcean Spaces rather than Hetzner Object Storage:
- Already configured. The Django storage backend (
django-storageswith S3-compatible API) was set up in Phase 79 and is working in production. - Amsterdam region. EU datacenter, consistent with GDPR requirements.
- Simple pricing. Flat USD 5/month for 250 GB storage and 1 TB outbound transfer. No per-request fees to worry about.
- Built-in CDN. Spaces includes a CDN endpoint, though we primarily serve media through Cloudflare for additional caching and DDoS protection.
Switching to Hetzner Object Storage would save approximately EUR 1-2/month but would require reconfiguring the storage backend and re-uploading all media files. Not worth the effort at current scale.